-
Notifications
You must be signed in to change notification settings - Fork 246
Change API introduced in "cuda-python" #849
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
Conversation
b397119 to
e156074
Compare
|
|
||
|
|
||
| def call_cuda_function(function, *argv): | ||
| res = function(*argv) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you need to change this place? Seems like the difference is where the CUDA function actually gets called (inside v.s. outside call_cuda_function)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I only save my local changes, it's not real change.
I been testing locally and seeking for some specific output.
This is not a working change otherwise PR would be in open state.
src/python/library/tritonclient/utils/cuda_shared_memory/__init__.py
Outdated
Show resolved
Hide resolved
…t__.py Co-authored-by: Yingge He <157551214+yinggeh@users.noreply.github.com>
| call_cuda_function(cudart.cudaSetDevice, device_id) | ||
| device_ptr = call_cuda_function(cudart.cudaMalloc, byte_size) | ||
| cuda_shm_handle = call_cuda_function(cudart.cudaIpcGetMemHandle, device_ptr) | ||
| call_cuda_function(cuda_driver.cuInit(device_id)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From the documentation, it looks like we should pass the flags as parameters, not the device id?
https://docs.nvidia.com/cuda/cuda-driver-api/group__CUDA__INITIALIZE.html
| call_cuda_function(cuda_driver.cuInit(device_id)) | |
| call_cuda_function(cuda_driver.cuInit(0)) |
|
Closing this change it no longe relevant IMO |
No description provided.