Open BussanQ opened 5 years ago
Maybe there are some different steps between windows and linux when installing neural_renderer, you can try it on linux environment (recommend ubuntu16.04 )
I installed successfully with win10, only modified rasterize_cuda_kernel.cu, but the error is not the same, I don't understand but hope to help.
rasterize_cuda_kernel.cu
// for the older gpus atomicAdd with double arguments does not exist
// #if __CUDA_ARCH__ < 600 and defined(__CUDA_ARCH__)
// static __inline__ __device__ double atomicAdd(double* address, double val) {
// unsigned long long int* address_as_ull = (unsigned long long int*)address;
// unsigned long long int old = *address_as_ull, assumed;
// do {
// assumed = old;
// old = atomicCAS(address_as_ull, assumed,
// __double_as_longlong(val + __longlong_as_double(assumed)));
// // Note: uses integer comparison to avoid hang in case of NaN (since NaN != NaN) } while (assumed != old);
// } while (assumed != old);
// return __longlong_as_double(old);
// }
// #endif
#if !defined(__CUDA_ARCH__) || __CUDA_ARCH__ >= 600
#else
static __inline__ __device__ double atomicAdd(double *address, double val) {
unsigned long long int* address_as_ull = (unsigned long long int*)address;
unsigned long long int old = *address_as_ull, assumed;
if (val==0.0)
return __longlong_as_double(old);
do {
assumed = old;
old = atomicCAS(address_as_ull, assumed, __double_as_longlong(val +__longlong_as_double(assumed)));
} while (assumed != old);
return __longlong_as_double(old);
}
#endif
@GoooIce the same error after modified , but thank u .
@BussanQ
error: command 'C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\bin\nvcc.exe' failed with exit status 2 v10.1
Try with CUDA 10.0 , I successfully installed it on Windows 10 with that version, to my knowledge Pytorch isn't supposed to work with CUDA 10.1
@BussanQ
error: command 'C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\bin\nvcc.exe' failed with exit status 2 v10.1
Try with CUDA 10.0 , I successfully installed it on Windows 10 with that version, to my knowledge Pytorch isn't supposed to work with CUDA 10.1
I have CUDA 10.0 but I got same error on Windows10.
I install the Visual Studio 2017 then I fixed the code as @GoooIce suggested. Then problem is fixing.
I tried it on two separate computers with, respectively, cuda 10.0 and cuda 9.2. However different errors occurred but neither of them was like the ones mentioned above.
D:\written_programs\python\machine_learning\Exercise\venv\lib\site-packages\torch\utils\cpp_extension.py:184: UserWarning: Error checking compiler version for cl: [WinError 2] 系统找不到指定的文件。 warnings.warn('Error checking compiler version for {}: {}'.format(compiler, error)) C:\Apps\Microsoft\VisualStudio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -ID:\written_programs\python\machine_learning\Exercise\venv\lib\site-packages\torch\lib\include -ID:\written_programs\python\machine_learning\Exercise\venv\lib\site-packages\torch\lib\include\torch\csrc\api\include -ID:\written_programs\python\machine_learning\Exercise\venv\lib\site-packages\torch\lib\include\TH -ID:\written_programs\python\machine_learning\Exercise\venv\lib\site-packages\torch\lib\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.0\include" -ID:\written_programs\python\machine_learning\Exercise\venv\include -IC:\Apps\Microsoft\VisualStudio\Shared\Anaconda3_64\include -IC:\Apps\Microsoft\VisualStudio\Shared\Anaconda3_64\include -IC:\Apps\Microsoft\VisualStudio\2017\Community\VC\Tools\MSVC\14.16.27023\ATLMFC\include -IC:\Apps\Microsoft\VisualStudio\2017\Community\VC\Tools\MSVC\14.16.27023\include /EHsc /Tpneural_renderer/cuda/load_textures_cuda.cpp /Fobuild\temp.win-amd64-3.6\Release\neural_renderer/cuda/load_textures_cuda.obj -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=load_textures -D_GLIBCXX_USE_CXX11_ABI=0 load_textures_cuda.cpp C:\Apps\Microsoft\VisualStudio\2017\Community\VC\Tools\MSVC\14.16.27023\include\cstddef(7): fatal error C1083: 无法打开包括文件: “stddef.h”: No such file or directory error: command 'C:\Apps\Microsoft\VisualStudio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64\cl.exe' failed with exit status 2 This one comes from the one with cuda 10.0
Where is the file rasterize_cuda_kernel.cu? Why didn't I find it?@GoooIce
i also got some error while installing :
C:/Users/Administrator/AppData/Local/Programs/Python/Python36/lib/site-packages/torch/include\c10/util/flat_hash_map.h(1437): note: 参见对正在编译的类 模板 实例化“ska::flat_hash_map<K,V,H,E,A>”的引用 C:/Users/Administrator/AppData/Local/Programs/Python/Python36/lib/site-packages/torch/include\c10/util/flat_hash_map.h(1383): error C3203: “templated_iterator”: 未专用化的 类 模板 不能用 作 模板 变量,该变量属于 模板 参数“_Ty1”,应为 real 类型 C:/Users/Administrator/AppData/Local/Programs/Python/Python36/lib/site-packages/torch/include\c10/util/flat_hash_map.h(1391): error C3203: “templated_iterator”: 未专用化的 类 模板 不能用 作 模板 变量,该变量属于 模板 参数“_Ty1”,应为 real 类型 C:/Users/Administrator/AppData/Local/Programs/Python/Python36/lib/site-packages/torch/include\c10/util/flat_hash_map.h(1473): error C3203: “templated_iterator”: 未专用化的 类 模板 不能用 作 模板 变量,该变量属于 模板 参数“_Ty1”,应为 real 类型 C:/Users/Administrator/AppData/Local/Programs/Python/Python36/lib/site-packages/torch/include\c10/util/flat_hash_map.h(1510): note: 参见对正在编译的类 模板 实例化“ska::flat_hash_set<T,H,E,A>”的引用 C:/Users/Administrator/AppData/Local/Programs/Python/Python36/lib/site-packages/torch/include\c10/util/flat_hash_map.h(1478): error C3203: “templated_iterator”: 未专用化的 类 模板 不能用 作 模板 变量,该变量属于 模板 参数“_Ty1”,应为 real 类型 C:/Users/Administrator/AppData/Local/Programs/Python/Python36/lib/site-packages/torch/include\c10/util/flat_hash_map.h(1482): error C3203: “templated_iterator”: 未专用化的 类 模板 不能用 作 模板 变量,该变量属于 模板 参数“_Ty1”,应为 real 类型 C:/Users/Administrator/AppData/Local/Programs/Python/Python36/lib/site-packages/torch/include\c10/util/flat_hash_map.h(1486): error C3203: “templated_iterator”: 未专用化的 类 模板 不能用 作 模板 变量,该变量属于 模板 参数“_Ty1”,应为 real 类型 C:/Users/Administrator/AppData/Local/Programs/Python/Python36/lib/site-packages/torch/include\c10/util/flat_hash_map.h(1490): error C3203: “templated_iterator”: 未专用化的 类 模板 不能用 作 模板 变量,该变量属于 模板 参数“_Ty1”,应为 real 类型 error: command 'C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.2\bin\nvcc.exe' failed with exit status 2
windows10 ,cuda9.2 compiling this file nvcc.exe -c neural_renderer/cuda/load_textures_cuda_kernel.cu not the file "rasterize_cuda_kernel.cu" mentiond above
solved this error and finished the installing using the method mentioned in https://github.com/pytorch/pytorch/issues/19156
warp the error lines using #ifndef CUDACC and #endif
win10, cuda9.2, torch1.2.0
solved this error and finished the installing using the method mentioned in pytorch/pytorch#19156
warp the error lines using #ifndef CUDACC and #endif
win10, cuda9.2, torch1.2.0
请问具体怎么修改
solved this error and finished the installing using the method mentioned in pytorch/pytorch#19156
warp the error lines using #ifndef CUDACC and #endif
win10, cuda9.2, torch1.2.0
请问可以分享一下具体的修改方法吗?
I installed successfully with win10, only modified rasterize_cuda_kernel.cu, but the error is not the same, I don't understand but hope to help.
rasterize_cuda_kernel.cu
// for the older gpus atomicAdd with double arguments does not exist // #if __CUDA_ARCH__ < 600 and defined(__CUDA_ARCH__) // static __inline__ __device__ double atomicAdd(double* address, double val) { // unsigned long long int* address_as_ull = (unsigned long long int*)address; // unsigned long long int old = *address_as_ull, assumed; // do { // assumed = old; // old = atomicCAS(address_as_ull, assumed, // __double_as_longlong(val + __longlong_as_double(assumed))); // // Note: uses integer comparison to avoid hang in case of NaN (since NaN != NaN) } while (assumed != old); // } while (assumed != old); // return __longlong_as_double(old); // } // #endif #if !defined(__CUDA_ARCH__) || __CUDA_ARCH__ >= 600 #else static __inline__ __device__ double atomicAdd(double *address, double val) { unsigned long long int* address_as_ull = (unsigned long long int*)address; unsigned long long int old = *address_as_ull, assumed; if (val==0.0) return __longlong_as_double(old); do { assumed = old; old = atomicCAS(address_as_ull, assumed, __double_as_longlong(val +__longlong_as_double(assumed))); } while (assumed != old); return __longlong_as_double(old); } #endif
This fixed for me as well on Win10, cuda10.0, torch 1.4.0
I installed successfully with win10
Any hints? I have gotten a number of errors sorted but am stuck on:
ModuleNotFoundError: No module named 'neural_renderer.cuda'
Though as far as I can tell the folders are set up fine.
Sorry to necro, just frustrated with this repo
I installed successfully with win10
Any hints? I have gotten a number of errors sorted but am stuck on:
ModuleNotFoundError: No module named 'neural_renderer.cuda'
Though as far as I can tell the folders are set up fine.
Sorry to necro, just frustrated with this repo
Module not found errors can have a ton of reasons. This is kind of a shot in the dark, but I had the same type of error in a completely unrelated situation: try adding an empty __init__.py file in the same folder as neural_renderer.cuda
Otherwise, version mismatches could be an issue. Some questions would be: what's your python version, your CUDA version, your GPU, are you running with -m or not?
Thanks for following up, sorry for the delay in response. I tried for several hours after this and rebuilt my environment and worked out a number of errors but always more persist. I'm giving up. I already have IPERCore working, which is apparently a successor project from the same crew, but the demos of this looked like it actually generated better results. Possibly it's just cherry-picking of examples. Anyway, it generates no results for me, so I'll try to hone IPERCore.
Anyway, thanks for being wiling to help!
error info: D:/dev/app/Anaconda3/envs/pytorch/lib/site-packages/torch/include\c10/util/flat_hash_map.h(1490): error C3203: 'templated_iterator': unspecialized class template can't be used as a template argument for template parameter '_Ty1', expected a real type error: command 'C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\bin\nvcc.exe' failed with exit status 2