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: debug=True conflates checking for exceptions and generating debug info #7169

Open
gmarkall opened this issue Jun 30, 2021 · 5 comments
Labels
CUDA CUDA related issue/PR feature_request

Comments

@gmarkall
Copy link
Member

From the docstring of the cuda.jit decorator:

debug: If True, check for exceptions thrown when executing the kernel. Since this degrades performance, this should only be used for debugging purposes. Defaults to False. (The default value can be overridden by setting environment variable NUMBA_CUDA_DEBUGINFO=1.)

This also enables the generation of debug information. Ideally there should be two separate flags, one for debuginfo, and one for checking for exceptions. Perhaps:

  • debuginfo: Set to True to enable debug info generation.
  • exception_check: Set to True to enable exception checking.

with debug=True implying that both of the above are True - this will provide consistent behavior with existing versions of Numba as well as providing more fine-grained control over debugging functionality.

@gmarkall gmarkall added CUDA CUDA related issue/PR feature_request good first issue A good issue for a first time contributor labels Jun 30, 2021
@gmarkall gmarkall added this to the Numba 0.55 RC milestone Jun 30, 2021
@gmarkall gmarkall removed the good first issue A good issue for a first time contributor label Jul 5, 2021
@gmarkall
Copy link
Member Author

gmarkall commented Jul 5, 2021

There is some alignment / improvement needed with the rest of Numba here (e.g. debug switching on boundscheck for the CPU target) so I'm removing the good first issue label as it requires some alignment / thinking about with Numba.

@gmarkall
Copy link
Member Author

This won't make it into 0.55, optimistically bumping to 0.56.

@gmarkall gmarkall modified the milestones: Numba 0.55 RC, Numba 0.56 RC Oct 21, 2021
@sklam sklam modified the milestones: Numba 0.56 RC, Numba 0.57 RC Jun 1, 2022
@gmarkall gmarkall added this to Imported in CUDA 0.57 overflow May 2, 2023
@gmarkall gmarkall removed this from the Numba 0.57 RC milestone May 2, 2023
@dlee992
Copy link
Contributor

dlee992 commented Feb 26, 2024

I feel this feature would be useful if we have. I will try to work on this and post feedback if I met some obstacles.

Anything I need to know before hacking? gentle cc @gmarkall

@gmarkall
Copy link
Member Author

I have this prototyped somewhere already, let me see if I can find it...

@gmarkall
Copy link
Member Author

It's in this branch: gmarkall/numba@cuda-decorator-refactor...gmarkall:numba:cuda-compilation-refactor

Which is based on this PR: #8773

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CUDA CUDA related issue/PR feature_request
Projects
Development

No branches or pull requests

3 participants