Open lovehuanhuan opened 3 years ago
I have meet the same question. And I have solved by this: vim ./csrc/mish_kernel.cu modify like this:
replace the file path by absolution path. Then rebuild And just enjoy it !
Thanks body,it works.
would be better to add this change note into the README of https://github.com/WongKinYiu/ScaledYOLOv4/tree/yolov4-large
/usr/local/cuda/bin/nvcc -Iexternal -I/opt/conda/lib/python3.6/site-packages/torch/include -I/opt/conda/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -I/opt/conda/lib/python3.6/site-packages/torch/include/TH -I/opt/conda/lib/python3.6/site-packages/torch/include/THC -I/usr/local/cuda/include -I/opt/conda/include/python3.6m -c -c /mish-cuda/csrc/mish_kernel.cu -o /mish-cuda/build/temp.linux-x86_64-3.6/csrc/mish_kernel.o -DCUDA_NO_HALF_OPERATORS -DCUDA_NO_HALF_CONVERSIONS -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options '-fPIC' --expt-extended-lambda -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=1 -gencode=arch=compute_61,code=sm_61 -gencode=arch=compute_75,code=sm_75 -gencode=arch=compute_60,code=sm_60 -gencode=arch=compute_80,code=sm_80 -gencode=arch=compute_70,code=sm_70 -gencode=arch=compute_80,code=compute_80 -gencode=arch=compute_52,code=sm_52 -std=c++14 /mish-cuda/csrc/mish_kernel.cu:3:10: fatal error: **CUDAApplyUtils.cuh: No such file or directory
include "CUDAApplyUtils.cuh"**
compilation terminated. ninja: build stopped: subcommand failed. Traceback (most recent call last): File "/opt/conda/lib/python3.6/site-packages/torch/utils/cpp_extension.py", line 1471, in _run_ninja_build check=True) File "/opt/conda/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 "setup.py", line 30, in
'build_ext': BuildExtension
File "/opt/conda/lib/python3.6/site-packages/setuptools/init.py", line 161, in setup
return distutils.core.setup(**attrs)
File "/opt/conda/lib/python3.6/distutils/core.py", line 148, in setup
dist.run_commands()
File "/opt/conda/lib/python3.6/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/opt/conda/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/opt/conda/lib/python3.6/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/opt/conda/lib/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/opt/conda/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/opt/conda/lib/python3.6/site-packages/setuptools/command/build_ext.py", line 87, in run
_build_ext.run(self)
File "/opt/conda/lib/python3.6/site-packages/Cython/Distutils/old_build_ext.py", line 186, in run
_build_ext.build_ext.run(self)
File "/opt/conda/lib/python3.6/distutils/command/build_ext.py", line 339, in run
self.build_extensions()
File "/opt/conda/lib/python3.6/site-packages/torch/utils/cpp_extension.py", line 633, in build_extensions
build_ext.build_extensions(self)
File "/opt/conda/lib/python3.6/site-packages/Cython/Distutils/old_build_ext.py", line 194, in build_extensions
self.build_extension(ext)
File "/opt/conda/lib/python3.6/site-packages/setuptools/command/build_ext.py", line 208, in build_extension
_build_ext.build_extension(self, ext)
File "/opt/conda/lib/python3.6/distutils/command/build_ext.py", line 533, in build_extension
depends=ext.depends)
File "/opt/conda/lib/python3.6/site-packages/torch/utils/cpp_extension.py", line 462, in unix_wrap_ninja_compile
with_cuda=with_cuda)
File "/opt/conda/lib/python3.6/site-packages/torch/utils/cpp_extension.py", line 1211, in _write_ninja_file_and_compile_objects
error_prefix='Error compiling objects for extension')
File "/opt/conda/lib/python3.6/site-packages/torch/utils/cpp_extension.py", line 1484, in _run_ninja_build
raise RuntimeError(message)
RuntimeError: Error compiling objects for extension
root@006c33c494ce:/mish-cuda#
Unable to find image 'nvcr.io/nvidia/pytorch:20.06-py3' locally
20.06-py3: Pulling from nvidia/pytorch 23884877105a: Pulling fs layer bc38caa0f5b9: Pulling fs layer 2910811b6c42: Pulling fs layer 36505266dcc6: Waiting b3160bd02226: Waiting 1854e99b6b01: Pulling fs layer 1854e99b6b01: Waiting 946388849428: Waiting 37b7becebba3: Waiting c375d2e174ca: Waiting 4978443c000b: Waiting 181b0b110ed9: Waiting fb0dd2917726: Waiting 43891d45480f: Waiting d5a7b1f52fad: Pulling fs layer 68cdd679c06e: Waiting d09af3b6a30d: Waiting 427aa2219a5c: Waiting 23edf8f627eb: Pulling fs layer 23edf8f627eb: Waiting f9a261ee19e5: Pulling fs layer 0c2852bbc5e6: Pulling fs layer 02e1eb53084b: Waiting a2acdcfe588b: Pulling fs layer f9a261ee19e5: Waiting 0c2852bbc5e6: Waiting cf5c4e384a9c: Pulling fs layer 055616a53b8d: Waiting c44d52d21edf: Waiting c3e2faefbf6c: Waiting c4979e3f6ef6: Waiting e90bbad973ce: Pull complete a1f688bf81ad: Pull complete 19e00825f910: Pull complete 4e5257186489: Pull complete 28e29532f45b: Pull complete bdd086d90934: Pull complete 992d5e510ca4: Pull complete e79cd3cbe2d6: Pull complete 761468de75c4: Pull complete 2b17d69a8948: Pull complete c819bad9fe4c: Pull complete a89c91edcb2e: Pull complete d190303a2ae1: Pull complete 58152c74466a: Pull complete 6bfe1ef731fb: Pull complete 0ca4f1c7264c: Pull complete 22b1c121e58c: Pull complete 481770fa1227: Pull complete 3c652ebd4e52: Pull complete 39cfad382034: Pull complete 29882039c1b5: Pull complete 9ecab4cec575: Pull complete 56b05df2798a: Pull complete 0a50c25972aa: Pull complete 284967003afa: Pull complete 9272a680c908: Pull complete 1f7957821bba: Pull complete 4f29d4fc8251: Pull complete 9b441e1a8fca: Pull complete Digest: sha256:c7cf8b9a93c092e3ec5fa027730a517e132bf742e0bfd034a3d44561a92cd508 Status: Downloaded newer image for nvcr.io/nvidia/pytorch:20.06-py3