stylegan2-pytorch
stylegan2-pytorch copied to clipboard
Errors regarding compilation of FusedLeakyRelu cuda kernels
Hi I get the following errors while trying to use the Fused activation.Do any one have an idea why?
Traceback (most recent call last): File "/is/ps2/pghosh/.virtualenvs/gif/lib/python3.6/site-packages/torch/utils/cpp_extension.py", line 960, in _build_extension_module check=True) File "/usr/lib/python3.6/subprocess.py", line 438, in run output=stdout, stderr=stderr) subprocess.CalledProcessError: Command '['ninja', '-v']' returned non-zero exit status 1.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "train.py", line 17, in
/is/cluster/work/pghosh/gif1.0/my_utils/op/fused_bias_act_kernel.cu(79): error: type name is not allowed
/is/cluster/work/pghosh/gif1.0/my_utils/op/fused_bias_act_kernel.cu(79): error: expected an expression
/is/cluster/work/pghosh/gif1.0/my_utils/op/fused_bias_act_kernel.cu(79): error: a pointer to a bound function may only be used to call the function
/is/cluster/work/pghosh/gif1.0/my_utils/op/fused_bias_act_kernel.cu(79): error: type name is not allowed
/is/cluster/work/pghosh/gif1.0/my_utils/op/fused_bias_act_kernel.cu(79): error: expected an expression
/is/cluster/work/pghosh/gif1.0/my_utils/op/fused_bias_act_kernel.cu(79): error: a pointer to a bound function may only be used to call the function
/is/cluster/work/pghosh/gif1.0/my_utils/op/fused_bias_act_kernel.cu(79): error: type name is not allowed
/is/cluster/work/pghosh/gif1.0/my_utils/op/fused_bias_act_kernel.cu(79): error: expected an expression
/is/cluster/work/pghosh/gif1.0/my_utils/op/fused_bias_act_kernel.cu(79): error: a pointer to a bound function may only be used to call the function
/is/cluster/work/pghosh/gif1.0/my_utils/op/fused_bias_act_kernel.cu(79): error: type name is not allowed
/is/cluster/work/pghosh/gif1.0/my_utils/op/fused_bias_act_kernel.cu(79): error: expected an expression
/is/cluster/work/pghosh/gif1.0/my_utils/op/fused_bias_act_kernel.cu(79): error: a pointer to a bound function may only be used to call the function
/is/cluster/work/pghosh/gif1.0/my_utils/op/fused_bias_act_kernel.cu(79): error: type name is not allowed
/is/cluster/work/pghosh/gif1.0/my_utils/op/fused_bias_act_kernel.cu(79): error: expected an expression
/is/cluster/work/pghosh/gif1.0/my_utils/op/fused_bias_act_kernel.cu(79): error: a pointer to a bound function may only be used to call the function
/is/cluster/work/pghosh/gif1.0/my_utils/op/fused_bias_act_kernel.cu(79): error: type name is not allowed
/is/cluster/work/pghosh/gif1.0/my_utils/op/fused_bias_act_kernel.cu(79): error: expected an expression
/is/cluster/work/pghosh/gif1.0/my_utils/op/fused_bias_act_kernel.cu(79): error: a pointer to a bound function may only be used to call the function
/is/cluster/work/pghosh/gif1.0/my_utils/op/fused_bias_act_kernel.cu(79): error: type name is not allowed
/is/cluster/work/pghosh/gif1.0/my_utils/op/fused_bias_act_kernel.cu(79): error: expected an expression
/is/cluster/work/pghosh/gif1.0/my_utils/op/fused_bias_act_kernel.cu(79): error: a pointer to a bound function may only be used to call the function
/is/cluster/work/pghosh/gif1.0/my_utils/op/fused_bias_act_kernel.cu(79): error: type name is not allowed
/is/cluster/work/pghosh/gif1.0/my_utils/op/fused_bias_act_kernel.cu(79): error: expected an expression
/is/cluster/work/pghosh/gif1.0/my_utils/op/fused_bias_act_kernel.cu(79): error: a pointer to a bound function may only be used to call the function
/is/cluster/work/pghosh/gif1.0/my_utils/op/fused_bias_act_kernel.cu(79): error: type name is not allowed
/is/cluster/work/pghosh/gif1.0/my_utils/op/fused_bias_act_kernel.cu(79): error: expected an expression
/is/cluster/work/pghosh/gif1.0/my_utils/op/fused_bias_act_kernel.cu(79): error: a pointer to a bound function may only be used to call the function
/is/cluster/work/pghosh/gif1.0/my_utils/op/fused_bias_act_kernel.cu(79): error: type name is not allowed
/is/cluster/work/pghosh/gif1.0/my_utils/op/fused_bias_act_kernel.cu(79): error: expected an expression
/is/cluster/work/pghosh/gif1.0/my_utils/op/fused_bias_act_kernel.cu(79): error: a pointer to a bound function may only be used to call the function
/is/cluster/work/pghosh/gif1.0/my_utils/op/fused_bias_act_kernel.cu(79): error: type name is not allowed
/is/cluster/work/pghosh/gif1.0/my_utils/op/fused_bias_act_kernel.cu(79): error: expected an expression
/is/cluster/work/pghosh/gif1.0/my_utils/op/fused_bias_act_kernel.cu(79): error: a pointer to a bound function may only be used to call the function
/is/cluster/work/pghosh/gif1.0/my_utils/op/fused_bias_act_kernel.cu(79): error: type name is not allowed
/is/cluster/work/pghosh/gif1.0/my_utils/op/fused_bias_act_kernel.cu(79): error: expected an expression
36 errors detected in the compilation of "/tmp/tmpxft_00004c5b_00000000-6_fused_bias_act_kernel.cpp1.ii". ninja: build stopped: subcommand failed.
You may need to update your gcc.
I encounter this issue, too. My platform is torch 1.1, CUDA 9.0, gcc 7.4.0.
@AtlantixJJ Could you try recent pytorch (I have tested with >=1.3) and CUDA 10?
I found the following while using windows:
- Your cuda version must be >= 10.1, otherwise it will not compile
- In order to compile it in windows, you must install the visualstudio compiler, and run the visualstudio developer comand line. I am using the cmd with native x64 tools.
- If you tried to compile it sometime, failed and is still giving compilation error, I found no other way rather than reinstalling pytorch to clear the compiler cache.
When using cuda >= 10.1, make sure that your code is compatible with pytorch > 1.2, in linux should be easier as you are not limited to use a particular command line env rather than the python environment.
@walbermr Hmm I think maybe you can remove compiler outputs in torch_extensions temp directories.
@AtlantixJJ你能试试最近的 pytorch(我用 >=1.3 测试过)和 CUDA 10 吗?
Excuse me, my GPU is NVIDIA rtx3090. I only use cuda11. How can I solve this problem.