[TVM FFI] Bump tvm ffi to 0.1.10 in unittests and run checks in separate function to avoid lifecycle issue#78871
Merged
SigureMo merged 8 commits intoPaddlePaddle:developfrom May 3, 2026
Conversation
…arate function to avoid lifecycle issue
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
你的PR提交成功,感谢你对开源项目的贡献! |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the TVM FFI test dependency and adjusts one regression test to avoid a module/object lifetime problem during inline FFI module teardown. It fits into Paddle's Python test infrastructure by keeping the test_tvm_ffi.py suite compatible with newer apache-tvm-ffi releases.
Changes:
- Bump
apache-tvm-ffiin Python unittest dependencies from0.1.5to0.1.10. - Wrap the alloc-tensor FFI assertion path in a nested function so returned objects are destroyed before the inline module is unloaded.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
test/legacy_test/test_tvm_ffi.py |
Updates the alloc-tensor test to isolate object lifetime from module lifetime during teardown. |
python/unittest_py/requirements.txt |
Raises the TVM FFI package version used by Python unittest environments. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
gouzil
approved these changes
May 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Category
Execute Infrastructure
PR Types
Devs
Description
参考 apache/tvm-ffi#128,另外额外加
keep_module_alive,尝试避免函数返回的 object 在 mod 之前析构导致段错误这在之前表现为只要升级为 0.1.6+ Windows 上 CI 就会段错误
是否引起精度变化
否