Skip to content
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 Launch Failed when cudaDeviceSynchronize() #7

Closed
MurrayC7 opened this issue Jun 19, 2020 · 3 comments
Closed

CUDA Kernel Launch Failed when cudaDeviceSynchronize() #7

MurrayC7 opened this issue Jun 19, 2020 · 3 comments

Comments

@MurrayC7
Copy link

MurrayC7 commented Jun 19, 2020

Hello, thanks for the brilliant implementation on CUDA.
I have successfully built this library with these dependencies:

  • Ubuntu 16.04
  • CMake 3.14.5
  • OpenCV 3.4.6
  • python 3.6
  • Eigen 3.2.10
  • CUDA 10.0

When I use your code to generate surface normal with KITTI dataset, I have met the error below.
It seems the error is from cudaDeviceSynchronize().

I'm not good at CUDA :(
So, could u please tell me how to fix it.
Thank you very much!

multiprocessing.pool.RemoteTraceback:
"""
Traceback (most recent call last):
  File "/home/xxx/anaconda3/lib/python3.6/multiprocessing/pool.py", line 119, in worker
    result = (True, func(*args, **kwds))
  File "generate_normals.py", line 20, in _process
    normals_from_depth(*args)
RuntimeError: Kernel Launch Failed
File: /home/xxx/pycharm_remote/stereo_depth/surface-normal/src/surface_normal.cu
Line Number: 66
Reason: unspecified launch failure
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "generate_normals.py", line 61, in <module>
    generate_normals(sys.argv[1])
  File "generate_normals.py", line 54, in generate_normals
    for _ in tqdm(pool.imap_unordered(_process, process_args), total=len(process_args)):
  File "/home/xxx/anaconda3/lib/python3.6/site-packages/tqdm/std.py", line 1081, in __iter__
    for obj in iterable:
  File "/home/xxx/anaconda3/lib/python3.6/multiprocessing/pool.py", line 735, in next
    raise value
RuntimeError: Kernel Launch Failed
File: /home/xxx/surface-normal/src/surface_normal.cu
Line Number: 66
Reason: unspecified launch failure
@valgur
Copy link
Owner

valgur commented Jun 19, 2020

That error is rather vague, unfortunately, so I can't immediately say what went wrong there.

Pull the latest version and try the following:

mkdir build && cd build
cmake .. -DBUILD_TEST=y
make
cd ..
cuda-memcheck build/test

This SO answer has some more suggestions on how to potentially debug this.

@MurrayC7
Copy link
Author

OK, thanks. I will try first.

@valgur
Copy link
Owner

valgur commented Jul 1, 2020

@MurrayC7 Did you try cuda-memcheck and was it of any help?

@valgur valgur closed this as completed May 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants