Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix to_dlpack #50138

Merged
merged 5 commits into from Feb 6, 2023
Merged

Fix to_dlpack #50138

merged 5 commits into from Feb 6, 2023

Conversation

DesmonDay
Copy link
Contributor

@DesmonDay DesmonDay commented Feb 1, 2023

PR types

Bug fixes

PR changes

Others

Describe

  1. Fix issue to_dlpack for 循环报错 #50120
  2. Fix reference count -> use Struct to refer original tensor

@paddle-bot
Copy link

paddle-bot bot commented Feb 1, 2023

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

@@ -475,20 +475,14 @@ void BindTensor(pybind11::module &m) { // NOLINT
[](phi::DenseTensor &self) {
DLPackTensor dlpack_tensor(self, 1);
DLManagedTensor *dmt = dlpack_tensor.ToDLManagedTensor();
auto capsule = py::capsule(
auto capsule = pybind11::capsule(
Copy link
Collaborator

Choose a reason for hiding this comment

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

pr 内容栏补充一下 问题原因,修复策略吧

@DesmonDay DesmonDay changed the title Fix to_dlpack for loop Fix to_dlpack Feb 6, 2023
@DesmonDay DesmonDay merged commit 35ce2bd into develop Feb 6, 2023
@ZHUI ZHUI deleted the fix_dlpack_for branch February 6, 2023 04:00
@ZHUI ZHUI restored the fix_dlpack_for branch February 6, 2023 04:00
DesmonDay added a commit that referenced this pull request Feb 6, 2023
* fix to_dlpack for loop

* fix reference count
@DesmonDay DesmonDay deleted the fix_dlpack_for branch February 7, 2023 08:16
jzhang533 pushed a commit that referenced this pull request Feb 7, 2023
* Fix to_dlpack (#50138)

* fix to_dlpack for loop

* fix reference count

* fix conflicts
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.

None yet

4 participants