Skip to content

[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
cattidea:tvm-ffi/bump-tvm-ffi-to-0-1-10
May 3, 2026
Merged

[TVM FFI] Bump tvm ffi to 0.1.10 in unittests and run checks in separate function to avoid lifecycle issue#78871
SigureMo merged 8 commits intoPaddlePaddle:developfrom
cattidea:tvm-ffi/bump-tvm-ffi-to-0-1-10

Conversation

@SigureMo
Copy link
Copy Markdown
Member

@SigureMo SigureMo commented May 2, 2026

PR Category

Execute Infrastructure

PR Types

Devs

Description

参考 apache/tvm-ffi#128,另外额外加 keep_module_alive,尝试避免函数返回的 object 在 mod 之前析构导致段错误

这在之前表现为只要升级为 0.1.6+ Windows 上 CI 就会段错误

是否引起精度变化

This PR is co-authored with @copilot (gpt-5.4 xhigh)

SigureMo and others added 2 commits May 2, 2026 21:39
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 2, 2026 13:43
@paddle-bot
Copy link
Copy Markdown

paddle-bot Bot commented May 2, 2026

你的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.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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-ffi in Python unittest dependencies from 0.1.5 to 0.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.

@SigureMo SigureMo requested a review from gouzil May 3, 2026 12:51
@SigureMo SigureMo merged commit aee5b3c into PaddlePaddle:develop May 3, 2026
84 of 85 checks passed
@SigureMo SigureMo deleted the tvm-ffi/bump-tvm-ffi-to-0-1-10 branch May 3, 2026 13:26
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