You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import os
import glob
import torch
from torch.utils.cpp_extension import CUDA_HOME
from torch.utils.cpp_extension import CppExtension
from torch.utils.cpp_extension import CUDAExtension
from setuptools import find_packages
from setuptools import setup
requirements = ["torch", "torchvision"]
def get_extensions():
this_dir = os.path.dirname(os.path.abspath(__file__))
extensions_dir = os.path.join(this_dir, "src")
main_files = glob.glob(os.path.join(extensions_dir, "*.c"))
source_cuda = glob.glob(os.path.join(extensions_dir, "cuda", "*.cu"))
os.environ["CC"] = "g++"
sources = main_files
extension = CppExtension
extra_compile_args = {"cxx": []}
define_macros = []
if torch.cuda.is_available() and CUDA_HOME is not None:
extension = CUDAExtension
sources += source_cuda
define_macros += [("WITH_CUDA", None)]
else:
#raise NotImplementedError('Cuda is not available')
pass
sources = [os.path.join(extensions_dir, s) for s in sources]
include_dirs = [extensions_dir]
ext_modules = [
extension(
"_ext",
sources,
include_dirs=include_dirs,
define_macros=define_macros,
extra_compile_args=extra_compile_args,
)
]
return ext_modules
setup(
name="PreciseRoIPooling",
version="1.0",
ext_modules=get_extensions(),
cmdclass={"build_ext": torch.utils.cpp_extension.BuildExtension},
)
but compile failed.
building output :
py setup.py build develop
running build
running build_ext
building '_ext' extension
creating D:\Research\Vision\Tracking\MixFormer\external\PreciseRoIPooling\pytorch\prroi_pool\build
creating D:\Research\Vision\Tracking\MixFormer\external\PreciseRoIPooling\pytorch\prroi_pool\build\temp.win-amd64-3.8
creating D:\Research\Vision\Tracking\MixFormer\external\PreciseRoIPooling\pytorch\prroi_pool\build\temp.win-amd64-3.8\Release
creating D:\Research\Vision\Tracking\MixFormer\external\PreciseRoIPooling\pytorch\prroi_pool\build\temp.win-amd64-3.8\Release\Research
creating D:\Research\Vision\Tracking\MixFormer\external\PreciseRoIPooling\pytorch\prroi_pool\build\temp.win-amd64-3.8\Release\Research\Vision
creating D:\Research\Vision\Tracking\MixFormer\external\PreciseRoIPooling\pytorch\prroi_pool\build\temp.win-amd64-3.8\Release\Research\Vision\Tracking
creating D:\Research\Vision\Tracking\MixFormer\external\PreciseRoIPooling\pytorch\prroi_pool\build\temp.win-amd64-3.8\Release\Research\Vision\Tracking\MixFormer
creating D:\Research\Vision\Tracking\MixFormer\external\PreciseRoIPooling\pytorch\prroi_pool\build\temp.win-amd64-3.8\Release\Research\Vision\Tracking\MixFormer\external
creating D:\Research\Vision\Tracking\MixFormer\external\PreciseRoIPooling\pytorch\prroi_pool\build\temp.win-amd64-3.8\Release\Research\Vision\Tracking\MixFormer\external\PreciseRoIPooling
creating D:\Research\Vision\Tracking\MixFormer\external\PreciseRoIPooling\pytorch\prroi_pool\build\temp.win-amd64-3.8\Release\Research\Vision\Tracking\MixFormer\external\PreciseRoIPooling\pytorch
creating D:\Research\Vision\Tracking\MixFormer\external\PreciseRoIPooling\pytorch\prroi_pool\build\temp.win-amd64-3.8\Release\Research\Vision\Tracking\MixFormer\external\PreciseRoIPooling\pytorch\prroi_pool
creating D:\Research\Vision\Tracking\MixFormer\external\PreciseRoIPooling\pytorch\prroi_pool\build\temp.win-amd64-3.8\Release\Research\Vision\Tracking\MixFormer\external\PreciseRoIPooling\pytorch\prroi_pool\src
Emitting ninja build file D:\Research\Vision\Tracking\MixFormer\external\PreciseRoIPooling\pytorch\prroi_pool\build\temp.win-amd64-3.8\Release\build.ninja...
Compiling objects...
Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N)
[1/1] cl /showIncludes /nologo /Ox /W3 /GL /DNDEBUG /MD /MD /wd4819 /wd4251 /wd4244 /wd4267 /wd4275 /wd4018 /wd4190 /EHsc -DWITH_CUDA -ID:\Research\Vision\Tracking\MixFormer\external\PreciseRoIPooling\pytorch\prroi_pool\src -IC:\Users\aligo\AppData\Local\Programs\Python\Python38\lib\site-packages\torch\include -IC:\Users\aligo\AppData\Local\Programs\Python\Python38\lib\site-packages\torch\include\torch\csrc\api\include -IC:\Users\aligo\AppData\Local\Programs\Python\Python38\lib\site-packages\torch\include\TH -IC:\Users\aligo\AppData\Local\Programs\Python\Python38\lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.3\include" -IC:\Users\aligo\AppData\Local\Programs\Python\Python38\include -IC:\Users\aligo\AppData\Local\Programs\Python\Python38\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt" -c D:\Research\Vision\Tracking\MixFormer\external\PreciseRoIPooling\pytorch\prroi_pool\src\prroi_pooling_gpu.c /FoD:\Research\Vision\Tracking\MixFormer\external\PreciseRoIPooling\pytorch\prroi_pool\build\temp.win-amd64-3.8\Release\Research\Vision\Tracking\MixFormer\external\PreciseRoIPooling\pytorch\prroi_pool\src\prroi_pooling_gpu.obj -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=_ext -D_GLIBCXX_USE_CXX11_ABI=0 /std:c++14
FAILED: D:/Research/Vision/Tracking/MixFormer/external/PreciseRoIPooling/pytorch/prroi_pool/build/temp.win-amd64-3.8/Release/Research/Vision/Tracking/MixFormer/external/PreciseRoIPooling/pytorch/prroi_pool/src/prroi_pooling_gpu.obj
cl /showIncludes /nologo /Ox /W3 /GL /DNDEBUG /MD /MD /wd4819 /wd4251 /wd4244 /wd4267 /wd4275 /wd4018 /wd4190 /EHsc -DWITH_CUDA -ID:\Research\Vision\Tracking\MixFormer\external\PreciseRoIPooling\pytorch\prroi_pool\src -IC:\Users\aligo\AppData\Local\Programs\Python\Python38\lib\site-packages\torch\include -IC:\Users\aligo\AppData\Local\Programs\Python\Python38\lib\site-packages\torch\include\torch\csrc\api\include -IC:\Users\aligo\AppData\Local\Programs\Python\Python38\lib\site-packages\torch\include\TH -IC:\Users\aligo\AppData\Local\Programs\Python\Python38\lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.3\include" -IC:\Users\aligo\AppData\Local\Programs\Python\Python38\include -IC:\Users\aligo\AppData\Local\Programs\Python\Python38\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt" -c D:\Research\Vision\Tracking\MixFormer\external\PreciseRoIPooling\pytorch\prroi_pool\src\prroi_pooling_gpu.c /FoD:\Research\Vision\Tracking\MixFormer\external\PreciseRoIPooling\pytorch\prroi_pool\build\temp.win-amd64-3.8\Release\Research\Vision\Tracking\MixFormer\external\PreciseRoIPooling\pytorch\prroi_pool\src\prroi_pooling_gpu.obj -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=_ext -D_GLIBCXX_USE_CXX11_ABI=0 /std:c++14
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\cstdint(21): error C2061: syntax error: identifier 'std'
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\cstdint(21): error C2059: syntax error: ';'
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\cstdint(21): error C2449: found '{' at file scope (missing function header?)
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\cstdint(89): error C2059: syntax error: '}'
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\xtr1common(19): error C2061: syntax error: identifier 'std'
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\xtr1common(19): error C2059: syntax error: ';'
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\xtr1common(19): error C2449: found '{' at file scope (missing function header?)
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\xtr1common(251): error C2059: syntax error: '}'
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\type_traits(334): error C4233: nonstandard extension used: '__is_union' keyword only supported in C++, not C
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\type_traits(337): error C4233: nonstandard extension used: '__is_union' keyword only supported in C++, not C
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\type_traits(341): error C4233: nonstandard extension used: '__is_class' keyword only supported in C++, not C
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\type_traits(344): error C4233: nonstandard extension used: '__is_class' keyword only supported in C++, not C
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\type_traits(355): error C4233: nonstandard extension used: '__is_convertible_to' keyword only supported in C++, not C
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\type_traits(360): error C4233: nonstandard extension used: '__is_convertible_to' keyword only supported in C++, not C
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\type_traits(364): error C4233: nonstandard extension used: '__is_enum' keyword only supported in C++, not C
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\type_traits(367): error C4233: nonstandard extension used: '__is_enum' keyword only supported in C++, not C
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\type_traits(515): error C4233: nonstandard extension used: '__is_pod' keyword only supported in C++, not C
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\type_traits(518): error C4233: nonstandard extension used: '__is_pod' keyword only supported in C++, not C
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\type_traits(522): error C4233: nonstandard extension used: '__is_empty' keyword only supported in C++, not C
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\type_traits(525): error C4233: nonstandard extension used: '__is_empty' keyword only supported in C++, not C
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\type_traits(529): error C4233: nonstandard extension used: '__is_polymorphic' keyword only supported in C++, not C
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\type_traits(532): error C4233: nonstandard extension used: '__is_polymorphic' keyword only supported in C++, not C
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\type_traits(536): error C4233: nonstandard extension used: '__is_abstract' keyword only supported in C++, not C
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\type_traits(539): error C4233: nonstandard extension used: '__is_abstract' keyword only supported in C++, not C
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\type_traits(543): error C4233: nonstandard extension used: '__is_final' keyword only supported in C++, not C
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\type_traits(546): error C4233: nonstandard extension used: '__is_final' keyword only supported in C++, not C
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\type_traits(550): error C4233: nonstandard extension used: '__is_standard_layout' keyword only supported in C++, not C
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\type_traits(553): error C4233: nonstandard extension used: '__is_standard_layout' keyword only supported in C++, not C
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\type_traits(558): error C4233: nonstandard extension used: '__is_literal_type' keyword only supported in C++, not C
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\type_traits(563): error C4233: nonstandard extension used: '__is_literal_type' keyword only supported in C++, not C
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\type_traits(569): error C4233: nonstandard extension used: '__is_trivially_constructible' keyword only supported in C++, not C
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\type_traits(569): error C4233: nonstandard extension used: '__is_trivially_copyable' keyword only supported in C++, not C
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\type_traits(574): error C4233: nonstandard extension used: '__is_trivially_constructible' keyword only supported in C++, not C
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\type_traits(574): error C4233: nonstandard extension used: '__is_trivially_copyable' keyword only supported in C++, not C
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\type_traits(585): error C4233: nonstandard extension used: '__is_trivially_copyable' keyword only supported in C++, not C
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\type_traits(590): error C4233: nonstandard extension used: '__is_trivially_copyable' keyword only supported in C++, not C
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\type_traits(594): error C4233: nonstandard extension used: '__has_virtual_destructor' keyword only supported in C++, not C
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\type_traits(599): error C4233: nonstandard extension used: '__has_virtual_destructor' keyword only supported in C++, not C
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\type_traits(622): error C4233: nonstandard extension used: '__is_constructible' keyword only supported in C++, not C
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\type_traits(627): error C4233: nonstandard extension used: '__is_constructible' keyword only supported in C++, not C
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\type_traits(631): error C4233: nonstandard extension used: '__is_constructible' keyword only supported in C++, not C
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\type_traits(636): error C4233: nonstandard extension used: '__is_constructible' keyword only supported in C++, not C
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\type_traits(640): error C4233: nonstandard extension used: '__is_constructible' keyword only supported in C++, not C
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\type_traits(645): error C4233: nonstandard extension used: '__is_constructible' keyword only supported in C++, not C
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\type_traits(662): error C4233: nonstandard extension used: '__is_constructible' keyword only supported in C++, not C
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\type_traits(667): error C4233: nonstandard extension used: '__is_constructible' keyword only supported in C++, not C
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\type_traits(671): error C4233: nonstandard extension used: '__is_assignable' keyword only supported in C++, not C
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\type_traits(674): error C4233: nonstandard extension used: '__is_assignable' keyword only supported in C++, not C
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\type_traits(679): error C4233: nonstandard extension used: '__is_assignable' keyword only supported in C++, not C
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\type_traits(684): error C4233: nonstandard extension used: '__is_assignable' keyword only supported in C++, not C
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\type_traits(690): error C4233: nonstandard extension used: '__is_assignable_no_precondition_check' keyword only supported in C++, not C
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\type_traits(694): error C4233: nonstandard extension used: '__is_assignable_no_precondition_check' keyword only supported in C++, not C
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\type_traits(706): error C4233: nonstandard extension used: '__is_assignable' keyword only supported in C++, not C
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\type_traits(711): error C4233: nonstandard extension used: '__is_assignable' keyword only supported in C++, not C
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\type_traits(716): error C4233: nonstandard extension used: '__is_assignable_no_precondition_check' keyword only supported in C++, not C
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\type_traits(719): error C4233: nonstandard extension used: '__is_assignable_no_precondition_check' keyword only supported in C++, not C
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\type_traits(731): error C4233: nonstandard extension used: '__is_destructible' keyword only supported in C++, not C
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\type_traits(736): error C4233: nonstandard extension used: '__is_destructible' keyword only supported in C++, not C
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\type_traits(741): error C4233: nonstandard extension used: '__is_trivially_constructible' keyword only supported in C++, not C
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\type_traits(746): error C4233: nonstandard extension used: '__is_trivially_constructible' keyword only supported in C++, not C
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\type_traits(751): error C4233: nonstandard extension used: '__is_trivially_constructible' keyword only supported in C++, not C
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\type_traits(756): error C4233: nonstandard extension used: '__is_trivially_constructible' keyword only supported in C++, not C
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\type_traits(761): error C4233: nonstandard extension used: '__is_trivially_constructible' keyword only supported in C++, not C
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\type_traits(766): error C4233: nonstandard extension used: '__is_trivially_constructible' keyword only supported in C++, not C
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\type_traits(770): error C4233: nonstandard extension used: '__is_trivially_constructible' keyword only supported in C++, not C
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\type_traits(775): error C4233: nonstandard extension used: '__is_trivially_constructible' keyword only supported in C++, not C
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\type_traits(779): error C4233: nonstandard extension used: '__is_trivially_assignable' keyword only supported in C++, not C
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\type_traits(784): error C4233: nonstandard extension used: '__is_trivially_assignable' keyword only supported in C++, not C
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\type_traits(789): error C4233: nonstandard extension used: '__is_trivially_assignable' keyword only supported in C++, not C
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\type_traits(794): error C4233: nonstandard extension used: '__is_trivially_assignable' keyword only supported in C++, not C
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\type_traits(799): error C4233: nonstandard extension used: '__is_trivially_assignable' keyword only supported in C++, not C
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\type_traits(804): error C4233: nonstandard extension used: '__is_trivially_assignable' keyword only supported in C++, not C
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\type_traits(808): error C4233: nonstandard extension used: '__is_trivially_destructible' keyword only supported in C++, not C
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\type_traits(813): error C4233: nonstandard extension used: '__is_trivially_destructible' keyword only supported in C++, not C
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\type_traits(818): error C4233: nonstandard extension used: '__is_nothrow_constructible' keyword only supported in C++, not C
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\type_traits(823): error C4233: nonstandard extension used: '__is_nothrow_constructible' keyword only supported in C++, not C
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\type_traits(828): error C4233: nonstandard extension used: '__is_nothrow_constructible' keyword only supported in C++, not C
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\type_traits(834): error C4233: nonstandard extension used: '__is_nothrow_constructible' keyword only supported in C++, not C
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\type_traits(839): error C4233: nonstandard extension used: '__is_nothrow_constructible' keyword only supported in C++, not C
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\type_traits(844): error C4233: nonstandard extension used: '__is_nothrow_constructible' keyword only supported in C++, not C
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\type_traits(848): error C4233: nonstandard extension used: '__is_nothrow_constructible' keyword only supported in C++, not C
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\type_traits(853): error C4233: nonstandard extension used: '__is_nothrow_constructible' keyword only supported in C++, not C
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\type_traits(857): error C4233: nonstandard extension used: '__is_nothrow_assignable' keyword only supported in C++, not C
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\type_traits(862): error C4233: nonstandard extension used: '__is_nothrow_assignable' keyword only supported in C++, not C
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\type_traits(867): error C4233: nonstandard extension used: '__is_nothrow_assignable' keyword only supported in C++, not C
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\type_traits(872): error C4233: nonstandard extension used: '__is_nothrow_assignable' keyword only supported in C++, not C
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\type_traits(877): error C4233: nonstandard extension used: '__is_nothrow_assignable' keyword only supported in C++, not C
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\type_traits(882): error C4233: nonstandard extension used: '__is_nothrow_assignable' keyword only supported in C++, not C
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\type_traits(886): error C4233: nonstandard extension used: '__is_nothrow_destructible' keyword only supported in C++, not C
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\type_traits(892): error C4233: nonstandard extension used: '__is_nothrow_destructible' keyword only supported in C++, not C
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\type_traits(1142): error C4233: nonstandard extension used: '__underlying_type' keyword only supported in C++, not C
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\type_traits(1185): error C4233: nonstandard extension used: '__is_base_of' keyword only supported in C++, not C
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\type_traits(1190): error C4233: nonstandard extension used: '__is_base_of' keyword only supported in C++, not C
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\iosfwd(178): warning C4157: pragma was ignored by C compiler
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\iosfwd(183): warning C4157: pragma was ignored by C compiler
C:\Users\aligo\AppData\Local\Programs\Python\Python38\lib\site-packages\torch\include\c10/macros/Macros.h(142): warning C4067: unexpected tokens following preprocessor directive - expected a newline
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\ostream(21): warning C4157: pragma was ignored by C compiler
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\ostream(589): warning C4157: pragma was ignored by C compiler
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\istream(21): warning C4157: pragma was ignored by C compiler
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\istream(675): warning C4157: pragma was ignored by C compiler
C:\Users\aligo\AppData\Local\Programs\Python\Python38\lib\site-packages\torch\include\c10/util/C++17.h(27): fatal error C1189: #error: You need C++14 to compile PyTorch
ninja: build stopped: subcommand failed.
Traceback (most recent call last):
File "C:\Users\aligo\AppData\Local\Programs\Python\Python38\lib\site-packages\torch\utils\cpp_extension.py", line 1740, in _run_ninja_build
subprocess.run(
File "C:\Users\aligo\AppData\Local\Programs\Python\Python38\lib\subprocess.py", line 516, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['ninja', '-v']' returned non-zero exit status 1.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "setup.py", line 61, in <module>
setup(
File "C:\Users\aligo\AppData\Local\Programs\Python\Python38\lib\site-packages\setuptools\__init__.py", line 153, in setup
return distutils.core.setup(**attrs)
File "C:\Users\aligo\AppData\Local\Programs\Python\Python38\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "C:\Users\aligo\AppData\Local\Programs\Python\Python38\lib\distutils\dist.py", line 966, in run_commands
self.run_command(cmd)
File "C:\Users\aligo\AppData\Local\Programs\Python\Python38\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\aligo\AppData\Local\Programs\Python\Python38\lib\distutils\command\build.py", line 135, in run
self.run_command(cmd_name)
File "C:\Users\aligo\AppData\Local\Programs\Python\Python38\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Users\aligo\AppData\Local\Programs\Python\Python38\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\aligo\AppData\Local\Programs\Python\Python38\lib\site-packages\setuptools\command\build_ext.py", line 79, in run
_build_ext.run(self)
File "C:\Users\aligo\AppData\Local\Programs\Python\Python38\lib\site-packages\cython-3.0.0a9-py3.8-win-amd64.egg\Cython\Distutils\old_build_ext.py", line 192, in run
_build_ext.build_ext.run(self)
File "C:\Users\aligo\AppData\Local\Programs\Python\Python38\lib\distutils\command\build_ext.py", line 340, in run
self.build_extensions()
File "C:\Users\aligo\AppData\Local\Programs\Python\Python38\lib\site-packages\torch\utils\cpp_extension.py", line 741, in build_extensions
build_ext.build_extensions(self)
File "C:\Users\aligo\AppData\Local\Programs\Python\Python38\lib\distutils\command\build_ext.py", line 449, in build_extensions
self._build_extensions_serial()
File "C:\Users\aligo\AppData\Local\Programs\Python\Python38\lib\distutils\command\build_ext.py", line 474, in _build_extensions_serial
self.build_extension(ext)
File "C:\Users\aligo\AppData\Local\Programs\Python\Python38\lib\site-packages\setuptools\command\build_ext.py", line 196, in build_extension
_build_ext.build_extension(self, ext)
File "C:\Users\aligo\AppData\Local\Programs\Python\Python38\lib\distutils\command\build_ext.py", line 528, in build_extension
objects = self.compiler.compile(sources,
File "C:\Users\aligo\AppData\Local\Programs\Python\Python38\lib\site-packages\torch\utils\cpp_extension.py", line 714, in win_wrap_ninja_compile
_write_ninja_file_and_compile_objects(
File "C:\Users\aligo\AppData\Local\Programs\Python\Python38\lib\site-packages\torch\utils\cpp_extension.py", line 1419, in _write_ninja_file_and_compile_objects
_run_ninja_build(
File "C:\Users\aligo\AppData\Local\Programs\Python\Python38\lib\site-packages\torch\utils\cpp_extension.py", line 1756, in _run_ninja_build
raise RuntimeError(message) from e
RuntimeError: Error compiling objects for extension
My environment :
Collecting environment information...
PyTorch version: 1.11.0+cu113
Is debug build: False
CUDA used to build PyTorch: 11.3
ROCM used to build PyTorch: N/A
OS: Microsoft Windows 10 Pro
GCC version: (GCC) 10.2.0
Clang version: Could not collect
CMake version: version 3.23.0-rc4
Libc version: N/A
Python version: 3.8.10 (tags/v3.8.10:3d8993a, May 3 2021, 11:48:03) [MSC v.1928 64 bit (AMD64)] (64-bit runtime)
Python platform: Windows-10-10.0.19043-SP0
Is CUDA available: True
CUDA runtime version: 11.3.109
GPU models and configuration: GPU 0: NVIDIA GeForce GTX 960M
Nvidia driver version: 511.79
cuDNN version: C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.3\bin\cudnn_ops_train64_8.dll
HIP runtime version: N/A
MIOpen runtime version: N/A
Versions of relevant libraries:
[pip3] efficientnet-pytorch==0.7.1
[pip3] numpy==1.22.3
[pip3] pytorch-msssim==0.2.1
[pip3] torch==1.11.0+cu113
[pip3] torch-scatter==2.0.9
[pip3] torchaudio==0.11.0+cu113
[pip3] torchfile==0.1.0
[pip3] torchinfo==1.6.5
[pip3] torchmetrics==0.7.1
[pip3] torchsummary==1.5.1
[pip3] torchvision==0.12.0+cu113
The text was updated successfully, but these errors were encountered:
C:\Users\aligo\AppData\Local\Programs\Python\Python38\lib\site-packages\torch\include\c10/util/C++17.h(27): fatal error C1189: #error: You need C++14 to compile PyTorch
I create setup.py for toech version like this:
but compile failed.
building output :
My environment :
The text was updated successfully, but these errors were encountered: