Skip to content

Conversation

@mc-nv
Copy link
Contributor

@mc-nv mc-nv commented Aug 16, 2025

No description provided.

@mc-nv mc-nv force-pushed the mchornyi/TPRD-1667/L0_batcher_cudashm branch from b397119 to e156074 Compare August 16, 2025 07:56
@mc-nv mc-nv requested review from krishung5, kthui and yinggeh August 16, 2025 16:39
@mc-nv mc-nv changed the title Mchornyi/tprd 1667/l0 batcher cudashm Change API introduced in "cuda-python" Aug 16, 2025


def call_cuda_function(function, *argv):
res = function(*argv)
Copy link
Contributor

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)

Copy link
Contributor Author

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.

…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))
Copy link
Contributor

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

Suggested change
call_cuda_function(cuda_driver.cuInit(device_id))
call_cuda_function(cuda_driver.cuInit(0))

@mc-nv
Copy link
Contributor Author

mc-nv commented Aug 19, 2025

Closing this change it no longe relevant IMO

@mc-nv mc-nv closed this Aug 19, 2025
@mc-nv mc-nv deleted the mchornyi/TPRD-1667/L0_batcher_cudashm branch November 4, 2025 17:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

5 participants