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

[BUG] RMMNumbaManager broken when Numba is using NV CUDA bindings #1003

Closed
brandon-b-miller opened this issue Mar 22, 2022 · 0 comments · Fixed by #1004
Closed

[BUG] RMMNumbaManager broken when Numba is using NV CUDA bindings #1003

brandon-b-miller opened this issue Mar 22, 2022 · 0 comments · Fixed by #1004
Assignees
Labels
2 - In Progress Currently a work in progress bug Something isn't working

Comments

@brandon-b-miller
Copy link
Contributor

Describe the bug
Numba can switch back and forth between use of its own ctypes bindings for cuda objects, and the new cuda python bindings. When in the latter "mode" it needs to be passed differently constructed objects through RMMNumbaManager.memalloc. Numba expects to deal entirely with one or the other situation at once, so if RMM doesn't "follow", there will be various internal breakages when trying to launch numba kernels.

Steps/Code to reproduce bug

The following should be run with NUMBA_CUDA_USE_NVIDIA_BINDING=1:

import rmm
from numba import cuda

cuda.set_memory_manager(rmm.RMMNumbaManager)
devary = cuda.device_array(shape=(3,), dtype="int32")

@cuda.jit
def f(x):
    pass

f.forall(3)(devary)

Should error with

ValueError: invalid literal for int() with base 10: b'\x00\x00\x00\xefE\x7f\x00\x00' 

Expected behavior
This kernel should launch and execute successfully, and do nothing.

Environment details (please complete the following information):

  • Environment location: [Bare-meta]
  • Method of RMM install: [source]

Additional context
relevant numba issue:
numba/numba#7929

@brandon-b-miller brandon-b-miller added ? - Needs Triage Need team to review and classify bug Something isn't working labels Mar 22, 2022
@harrism harrism added 2 - In Progress Currently a work in progress and removed ? - Needs Triage Need team to review and classify labels Mar 22, 2022
@rapids-bot rapids-bot bot closed this as completed in #1004 Apr 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2 - In Progress Currently a work in progress bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants