-
Notifications
You must be signed in to change notification settings - Fork 18.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cuda kernel failed. Error: invalid device function #138
Comments
You might not have the GPU correctly set up, since the kernel call is Yangqing On Fri, Feb 21, 2014 at 1:30 AM, caijinlong [email protected]:
|
Thanks Yangqing. The problem has been solved. It is GPU's setting. Jinlong |
@caijinlong would you mind posting what GPU settings were causing the problem? Or @Yangqing are there any features (e.g., compute mode, persistence mode) that I should be aware of when configuring the GPU? I'm having the same issue running on a K20; any code that runs a kernel gives an "Invalid Device Function" error. Thanks! |
Can you run any CUDA demo, such as the NVIDIA-bundled samples? When in doubt, updating one's CUDA driver is worth a shot. |
I can run the samples included in cuda 5.5, and my driver is at 319.37 which from reading other issues on here seems to be correct? Here's the output of deviceQuery (I'm running a K20 on AWS so I don't get access to fan speed for example)
and this is the output of
Thanks so much for the help! |
Can you try the device_query included in caffe/tools ? |
Thanks - applying information in netflix blog, although I think most of their issues were from direct calls to the nvidia performance primitive library, and caffe for me is getting stuck on custom cuda kernel calls. This is the output of the caffe device_query. Really appreciate the help!
|
@caijinlong Hi, could you share some thoughts about GPU setting please? I had exactly the same error. But I can run cuda samples successfully. Have no idea how to solve this. Thank you! |
On my system (GeForce GTX 750 Ti) I could solve the error by modifying the Makefile.config by changing CUDA_ARCH := -gencode arch=compute_20,code=sm_20 CUDA_ARCH := -gencode arch=compute_20,code=sm_20 |
@eendebakpt, Hi, could you tell me how to compute the capacity of GPU? I don't know how to add '-gencode arch=compute_50,code=sm_50' ? |
@caijinlong hi, i has some problem below: Solver scaffolding done. how to handle this problem? |
Hi, I even changed it to gencode arch=compute_50,code=sm_50 but even than i received this below error, can any body help in this regards? [----------] 5 tests from ConcatLayerTest/1, where TypeParam = double [----------] 3 tests from PaddingLayerUpgradeTest [----------] 1 test from GaussianFillerTest/0, where TypeParam = float [----------] 4 tests from TanHLayerTest/1, where TypeParam = double |
@eendebakpt Thank you, your anwser also helps me figure out another problem in Toolkit DeepNet |
@caijinlong could you share the solution? |
@ihsanafredi Have you figured out this problem ? |
My GPU was old. |
i did a simple: The problem was a changed GPU, Sources needed to be rebuild. |
I have solved the same problem. This problem occur when the version of cuda doesn't mach the caffe. # For CUDA < 6.0, comment the *_50 lines for compatibility.CUDA_ARCH := -gencode arch=compute_20,code=sm_20 if your cuda<6.0, then comment the last two lines. |
@dragontas ' solution worked for me as well. |
I'm running this error with
and
and
|
@dragontas 's solution worked for me as well! |
I am facing a similar error. using latest CUDA version (8.0) with enabled GPU Nvidia Geforce 820M . How to change the CUDA arch. [ RUN ] TanHLayerTest/2.TestTanH |
Has anyone with CUDA 8.0 solved this problem? |
I'm having problems with cuda 8, too
|
@lhk @balloch I solved CUDA 8.0 installation. By disabling CUDNN support. As Nvidia 820M compute capability is 2.1. To support CUDNN compute capability should be more than 3.0. (https://developer.nvidia.com/cuda-gpus) u can check your GPU compute capability. Disable it by commenting line in the makefile. If u face same error then follow this installation guide link. (http://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html#axzz4ajfl49uf). |
Thanks Sai!
…On Sat, May 6, 2017 at 4:49 AM, Sai Varun ***@***.***> wrote:
@lhk <https://github.com/lhk> @balloch <https://github.com/balloch> I
solved CUDA 8.0 installation. By disabling CUDNN support. As Nvidia 820M
compute capability is 2.1. To support CUDNN compute capability should be
more than 3.0.
(https://developer.nvidia.com/cuda-gpus) u can check your GPU compute
capability. Disable it by commenting line in the makefile.
If u face same error then follow this installation guide link. (
http://docs.nvidia.com/cuda/cuda-installation-guide-linux/
index.html#axzz4ajfl49uf).
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#138 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ACbyYtjDxdwCp831pBf6uYlrg1E4fpamks5r3DQOgaJpZM4BjyMO>
.
--
Jonathan Balloch
B.S. Physics, Mathematics
M.S.E. Robotics
|
I was having problems with Thrust on my Ubuntu box with CUDA 8.0. Then I found BVLC/caffe#138, which contained the solution. Apparently, I just needed to [upgrade the compute capability](BVLC/caffe#138 (comment)).
I have Nvidia NVS 5200M and OS Windows 10 pro 64 bit and CUDA Version 8.0. When i run darknet\x64 \darknet_web_cam_voc i am having this error : |
I have the following done already:
And I still have the problem, CUDA 9.0. Couldn't find any solution. Extremely frustrating. |
Hi Jinlong..gd day..could you please help what settings you changed in GPU and how? |
I have a similar error. How did you solve it? |
I met similar problem, the error is : And solve by change # Tell NVCC to add binaries for the specified GPUs
foreach(__arch ${__cuda_arch_bin})
if(__arch MATCHES "([0-9]+)\\(([0-9]+)\\)")
# User explicitly specified PTX for the concrete BIN
# list(APPEND __nvcc_flags -gencode arch=compute_${CMAKE_MATCH_2},code=sm_${CMAKE_MATCH_1})
list(APPEND __nvcc_flags -gencode arch=compute_${CMAKE_MATCH_2},code=[compute_${CMAKE_MATCH_2},sm_${CMAKE_MATCH_1}])
list(APPEND __nvcc_archs_readable sm_${CMAKE_MATCH_1})
else()
# User didn't explicitly specify PTX for the concrete BIN, we assume PTX=BIN
# list(APPEND __nvcc_flags -gencode arch=compute_${__arch},code=sm_${__arch})
list(APPEND __nvcc_flags -gencode arch=compute_${__arch},code=[compute_${__arch},sm_${__arch}])
list(APPEND __nvcc_archs_readable sm_${__arch})
endif()
endforeach()
# Tell NVCC to add PTX intermediate code for the specified architectures
foreach(__arch ${__cuda_arch_ptx})
list(APPEND __nvcc_flags -gencode arch=compute_${__arch},code=compute_${__arch})
list(APPEND __nvcc_archs_readable compute_${__arch})
endforeach() For more information see : https://github.com/yaofahua/InvalidDeviceFunction |
I have some errors like this when running the code. How to handle those problems?
F0221 16:54:21.855986 11564 im2col.cu:49] Cuda kernel failed. Error: invalid device function
*** Check failure stack trace: ***
@ 0x7f2556cc1b4d google::LogMessage::Fail()
@ 0x7f2556cc5b67 google::LogMessage::SendToLog()
@ 0x7f2556cc39e9 google::LogMessage::Flush()
@ 0x7f2556cc3ced google::LogMessageFatal::~LogMessageFatal()
@ 0x463bf2 caffe::im2col_gpu<>()
@ 0x452031 caffe::ConvolutionLayer<>::Forward_gpu()
@ 0x41288f caffe::Layer<>::Forward()
@ 0x41c9be caffe::ConvolutionLayerTest_TestSimpleConvolution_Test<>::TestBody()
@ 0x43becd testing::internal::HandleExceptionsInMethodIfSupported<>()
@ 0x42dab1 testing::Test::Run()
@ 0x42db97 testing::TestInfo::Run()
@ 0x42dcd7 testing::TestCase::Run()
@ 0x432bdf testing::internal::UnitTestImpl::RunAllTests()
@ 0x43ba7d testing::internal::HandleExceptionsInMethodIfSupported<>()
@ 0x42d0da testing::UnitTest::Run()
@ 0x40f774 main
@ 0x318ae1ecdd (unknown)
@ 0x40f4c9 (unknown)
/bin/sh: line 1: 11564 Aborted (core dumped) $testbin 0
The text was updated successfully, but these errors were encountered: