-
Notifications
You must be signed in to change notification settings - Fork 913
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] "import cudf" has changed the device ID #11386
Comments
Hi @wbo4958 - thanks for reporting! This looks like an issue with CUDA Python: In [7]: import cuda.cudart
In [8]: import cupy
In [9]: cupy.cuda.runtime.setDevice(1)
In [10]: cupy.cuda.runtime.getDevice()
Out[10]: 1
In [11]: cuda.cudart.cudaGetDeviceCount()
Out[11]: (<cudaError_t.cudaSuccess: 0>, 2)
In [12]: cupy.cuda.runtime.getDevice()
Out[12]: 0 While we investigate further, perhaps you could use the environment variable |
One way to work around this bug is to import If for some reason you cannot do that, yet another workaround involves calling In [1]: import cupy
In [2]: import cuda.cudart
In [3]: cuda.cudart.cudaGetDevice()
Out[3]: (<cudaError_t.cudaSuccess: 0>, 0)
In [4]: cupy.cuda.runtime.getDevice()
Out[4]: 0
In [5]: cupy.cuda.runtime.setDevice(1)
In [6]: cupy.cuda.runtime.getDevice()
Out[6]: 1
In [7]: import cudf
In [8]: cupy.cuda.runtime.getDevice()
Out[8]: 1
|
Thx @shwina |
This issue has been labeled |
@shwina is this something we need to follow up with the cuda-python team on? |
This is fixed by the changes in cuda-python that fixed NVIDIA/cuda-python#24, which are in v11.8. So should be resolved once we move there. |
Verified that this no longer occurs:
|
Looks like "import cudf" will change the device ID on 22.06 release
rapids 22.06
repro
The text was updated successfully, but these errors were encountered: