-
Notifications
You must be signed in to change notification settings - Fork 5.9k
[DLPACK] Support from_dlpack with shared memory #67927
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
Merged
HydrogenSulfate
merged 40 commits into
PaddlePaddle:develop
from
HydrogenSulfate:support_dlpack
Sep 19, 2024
Merged
Changes from all commits
Commits
Show all changes
40 commits
Select commit
Hold shift + click to select a range
b7d04aa
Merge pull request #230 from PaddlePaddle/develop
HydrogenSulfate 2fd9dc0
Merge branch 'develop' of https://github.com/HydrogenSulfate/Paddle i…
HydrogenSulfate 4c5afe2
Merge branch 'develop' of https://github.com/HydrogenSulfate/Paddle i…
HydrogenSulfate 056d19b
Merge branch 'develop' of https://github.com/HydrogenSulfate/Paddle i…
HydrogenSulfate c022e44
Merge branch 'develop' of https://github.com/HydrogenSulfate/Paddle i…
HydrogenSulfate d723c27
Merge branch 'develop' of https://github.com/HydrogenSulfate/Paddle i…
HydrogenSulfate 04664b8
Merge branch 'develop' of https://github.com/HydrogenSulfate/Paddle i…
HydrogenSulfate 2f2777c
Merge branch 'develop' of https://github.com/HydrogenSulfate/Paddle i…
HydrogenSulfate 36efc60
Merge branch 'develop' of https://github.com/HydrogenSulfate/Paddle i…
HydrogenSulfate 6d3d314
Merge pull request #268 from PaddlePaddle/develop
HydrogenSulfate 8eed6d0
Merge branch 'develop' of https://github.com/HydrogenSulfate/Paddle i…
HydrogenSulfate f6815d3
Merge branch 'develop' of https://github.com/HydrogenSulfate/Paddle i…
HydrogenSulfate 1b3a43b
Merge branch 'develop' of https://github.com/HydrogenSulfate/Paddle i…
HydrogenSulfate 9550534
Merge branch 'develop' of https://github.com/HydrogenSulfate/Paddle i…
HydrogenSulfate 0053ffb
Merge branch 'develop' of https://github.com/HydrogenSulfate/Paddle i…
HydrogenSulfate 928d668
Merge branch 'develop' of https://github.com/HydrogenSulfate/Paddle i…
HydrogenSulfate 2cb8a3c
support shared memory via dlpack tensor format
HydrogenSulfate c0d6fd4
remove deleter
HydrogenSulfate e2b0d9c
update todlpack code
HydrogenSulfate 1047fc9
Merge branch 'develop_new' into support_dlpack
HydrogenSulfate 31f918c
fix for other dtype
HydrogenSulfate 09336d4
add type check for dlpack
HydrogenSulfate 10a34a0
add data_ptr consistency unitest
HydrogenSulfate a18afea
remove cuda_runtime.h and remove redundant annotation
HydrogenSulfate b65b74c
update ref doc
HydrogenSulfate d8cadb4
restore
HydrogenSulfate 3db178a
use map and mutex instead of std::function
HydrogenSulfate 79cf661
polish annotation
HydrogenSulfate 342768b
fix for cpu tensor
HydrogenSulfate b5d777b
add data_ptr consistency unitest
HydrogenSulfate 72e85f9
update thirdpary/dlpack to v0.8 to support Tensor of bool dtype
HydrogenSulfate f64e0ce
move std::is_same<T, bool> before std::is_unsigned<T>
HydrogenSulfate 5f8c202
restore overloaded version of TensorFromDLPack
HydrogenSulfate 3169050
restore overload version of GetDstPtrByDLDataType and update dlpack d…
HydrogenSulfate 3783f74
fix unitest
HydrogenSulfate 741f078
reduce matrix size and loop time in test_dlpack
HydrogenSulfate de95c8a
support directly converting from object that has '__dlpack__' attribute
HydrogenSulfate 1eecb4e
Merge branch 'develop' into support_dlpack
HydrogenSulfate 1163d33
support CUDAPinnedPlace, add unitest for place consistency check, rem…
HydrogenSulfate 2dc07e1
Merge branch 'develop' into support_dlpack
HydrogenSulfate File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里的改动是等价的么?
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
原先的strides计算方法应该是有问题的,没有考虑x是non-contiguous的情况,而是直接根据shape算strides,这会导致转化后的dlpack张量一定是contiguous。参考pytorch的做法,应该直接使用原张量的strides即可https://github.com/pytorch/pytorch/blob/db80b98ec460ca5b2fd84c1dfb6426925f64c8cc/aten/src/ATen/DLConvertor.cpp#L267-L276。
根据你说的我测了下这个PR转换前后的strides,好像from_dlpack对strides的处理还有点问题,我需要再修改一下,并再加一个strides单测。