Skip to content

[FFI] Record stream and device type for Paddle context#18293

Closed
SigureMo wants to merge 1 commit intoapache:mainfrom
cattidea:ffi/record-stream-and-device-type-for-paddle-context
Closed

[FFI] Record stream and device type for Paddle context#18293
SigureMo wants to merge 1 commit intoapache:mainfrom
cattidea:ffi/record-stream-and-device-type-for-paddle-context

Conversation

@SigureMo
Copy link
Copy Markdown
Contributor

@SigureMo SigureMo commented Sep 9, 2025

Record device context when user installed PaddlePaddle. The API used in this PR, paddle._C._cuda_getCurrentRawStream, was introduced in PaddlePaddle/Paddle#75153, so this only runs on the latest develop branch (the latest released version 3.2.0 does not work).

If you have any questions, feel free to reach out — I’m happy to help and will actively support any further adaptation work.

@tqchen
Copy link
Copy Markdown
Member

tqchen commented Sep 9, 2025

Thanks @SigureMo , i am thinkning about more scalable ways to add support without doing specific switch case. One idea is to enable functions like tensor.__tvm_ffi_env_stream__ for stream getter in current tensor.

@tqchen
Copy link
Copy Markdown
Member

tqchen commented Sep 9, 2025

#18295 should implement this

@SigureMo
Copy link
Copy Markdown
Contributor Author

SigureMo commented Sep 9, 2025

Thanks @tqchen! That's indeed a more elegant solution. I will try to push this protocol forward within PaddlePaddle as soon as possible (maybe PaddlePaddle/Paddle#75193).

@tqchen tqchen closed this Sep 9, 2025
@SigureMo SigureMo deleted the ffi/record-stream-and-device-type-for-paddle-context branch September 9, 2025 18:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants