Skip to content

Conversation

@SigureMo
Copy link
Member

@SigureMo SigureMo commented Sep 9, 2025

PR Category

Execute Infrastructure

PR Types

New features

Description

Add __tvm_ffi_env_stream__ protocol support. This interface was proposed at apache/tvm#18293 and implemented at apache/tvm#18295 to enable TVM FFI to retrieve stream context from Tensor.

This PR has been tested on https://github.com/apache/tvm/blob/485a309dcdd9044d252b52aee81c07fa1c62dfa7/ffi/examples/quick_start/run_example.py#L54

@paddle-bot
Copy link

paddle-bot bot commented Sep 9, 2025

你的PR提交成功,感谢你对开源项目的贡献!
请关注后续CI自动化测试结果,详情请参考Paddle-CI手册
Your PR has been submitted. Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

gouzil
gouzil previously approved these changes Sep 10, 2025
else:
# TODO: Add XPU and custom device support.
raise RuntimeError(
"Currently, the __tvm_ffi_env_stream__ method is only supported for GPU tensors."
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GPU --> CUDA?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HIP 应该也支持?

@SigureMo SigureMo merged commit 65cbe54 into PaddlePaddle:develop Sep 11, 2025
209 of 224 checks passed
@SigureMo SigureMo deleted the tvm-ffi/support-tvm-ffi-env-stream-protocol branch September 11, 2025 00:58
zrr1999 pushed a commit to zrr1999/Paddle that referenced this pull request Sep 11, 2025
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.

3 participants