Skip to content

Conversation

@SigureMo
Copy link
Member

@SigureMo SigureMo commented Oct 2, 2025

PR Category

Execute Infrastructure

PR Types

New features

Description

Implement C functions for speed dlpack exchange and stream handling and bump DLPack to v1.2. Refer to https://github.com/apache/tvm-ffi/blob/main/python/tvm_ffi/_optional_torch_c_dlpack.py and dmlc/dlpack#174

TODOs

@paddle-bot
Copy link

paddle-bot bot commented Oct 2, 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.

@SigureMo SigureMo marked this pull request as draft October 2, 2025 06:26
@SigureMo SigureMo changed the title [DLPack] Implement C functions exchange API [DLPack] Bump DLPack to v1.2 and implement C functions exchange API Oct 11, 2025
@SigureMo SigureMo marked this pull request as ready for review October 12, 2025 06:18
@codecov-commenter
Copy link

Codecov Report

❌ Patch coverage is 30.76923% with 9 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (develop@bac79fe). Learn more about missing BASE report.

Files with missing lines Patch % Lines
paddle/fluid/framework/dlpack_tensor.cc 18.18% 9 Missing ⚠️

❌ Your patch status has failed because the patch coverage (30.76%) is below the target coverage (90.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@            Coverage Diff             @@
##             develop   #75650   +/-   ##
==========================================
  Coverage           ?   30.76%           
==========================================
  Files              ?        2           
  Lines              ?       13           
  Branches           ?        0           
==========================================
  Hits               ?        4           
  Misses             ?        9           
  Partials           ?        0           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

zyfncg
zyfncg previously approved these changes Oct 14, 2025
DrRyanHuang
DrRyanHuang previously approved these changes Oct 14, 2025
Comment on lines +775 to +777
} catch (const std::exception &e) {
PyErr_SetString(PyExc_RuntimeError, e.what());
return -1;
Copy link
Contributor

Choose a reason for hiding this comment

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

这里只需要管 std::exception,不需要管其他的异常吗?类似这样的?

try {
    // 代码
} catch (const std::exception& e) {
    // 处理标准异常
} catch (...) {
    // 处理所有其他异常
}

Copy link
Member Author

@SigureMo SigureMo Oct 14, 2025

Choose a reason for hiding this comment

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

协议模板,这里不应该动

dmlc/dlpack#175 (comment)

@SigureMo SigureMo dismissed stale reviews from DrRyanHuang and zyfncg via 567c660 October 14, 2025 14:00
@SigureMo SigureMo changed the title [DLPack] Bump DLPack to v1.2 and implement C functions exchange API [DLPack][CINN] Bump DLPack to v1.2 and implement C functions exchange API Oct 14, 2025
@SigureMo SigureMo changed the title [DLPack][CINN] Bump DLPack to v1.2 and implement C functions exchange API [DLPack] Bump DLPack to v1.2 and implement C functions exchange API Oct 15, 2025
@SigureMo SigureMo merged commit 6f808ba into PaddlePaddle:develop Oct 15, 2025
78 of 84 checks passed
@SigureMo SigureMo deleted the dlpack/implement-c-functions-exchange-api branch October 15, 2025 03:20
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.

5 participants