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

what's the differences between numba.cuda.jit and numba.jit? #4971

Closed
WhatAShot opened this issue Dec 16, 2019 · 2 comments
Closed

what's the differences between numba.cuda.jit and numba.jit? #4971

WhatAShot opened this issue Dec 16, 2019 · 2 comments
Labels
question Notes an issue as a question

Comments

@WhatAShot
Copy link

I'm new at numba. What's the difference between numba.cuda.jit and numba.jit?
If not, why not unify them?

@stuartarchibald
Copy link
Contributor

Thanks for the question. numba.cuda.jit targets NVIDIA CUDA supporting GPUs, numba.jit targets CPUs, numba.roc.jit targets AMD ROCm supporting GPUs. There are some elements of these targets which can be unified and at some point they will be, however, the programming model for GPU vs CPU is quite different, and the tool chains needed are also different (CPU uses a slightly customised LLVM from LLVM mainline, CUDA using NVIDIA's LLVM fork, ROCm has a special shim library https://github.com/numba/roctools built against the ROCm fork of LLVM) so total unification is not really feasible. For certain constrained cases, like @vectorize and @guvectorize, it's possible to use the same kernels on each target by simply changing the target kwarg http://numba.pydata.org/numba-doc/latest/reference/jit-compilation.html#vectorized-functions-ufuncs-and-dufuncs.

@stuartarchibald stuartarchibald added the question Notes an issue as a question label Dec 16, 2019
@WhatAShot
Copy link
Author

Thanks for replying and thanks for your contribution to communities.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Notes an issue as a question
Projects
None yet
Development

No branches or pull requests

2 participants