-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Support numpy bridge (enabled by default in dygraph mode) #20983
Merged
phlrain
merged 15 commits into
PaddlePaddle:develop
from
songyouwei:support-numpy-bridge-dygraph
Nov 27, 2019
Merged
Support numpy bridge (enabled by default in dygraph mode) #20983
phlrain
merged 15 commits into
PaddlePaddle:develop
from
songyouwei:support-numpy-bridge-dygraph
Nov 27, 2019
Conversation
This file contains 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
test=develop
test=develop
test=develop
test=develop
songyouwei
force-pushed
the
support-numpy-bridge-dygraph
branch
from
November 4, 2019 08:11
ce54b5f
to
a647a57
Compare
songyouwei
changed the title
Support numpy bridge dygraph
Support numpy bridge (zero_copy)
Nov 4, 2019
songyouwei
changed the title
Support numpy bridge (zero_copy)
Support numpy bridge (zero_copy=True)
Nov 4, 2019
test=develop
songyouwei
force-pushed
the
support-numpy-bridge-dygraph
branch
from
November 4, 2019 08:46
6c1d007
to
07f055f
Compare
songyouwei
changed the title
Support numpy bridge (zero_copy=True)
Support numpy bridge (enabled by default in dygraph mode)
Nov 5, 2019
phlrain
reviewed
Nov 18, 2019
phlrain
previously approved these changes
Nov 22, 2019
heavengate
previously approved these changes
Nov 22, 2019
wanghaoshuang
previously approved these changes
Nov 22, 2019
sneaxiy
reviewed
Nov 22, 2019
test=develop
songyouwei
dismissed stale reviews from wanghaoshuang, heavengate, and phlrain
via
November 22, 2019 11:42
6017fa8
test=develop
test=develop
test=develop
sneaxiy
reviewed
Nov 27, 2019
test=develop
test=develop
sneaxiy
approved these changes
Nov 27, 2019
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.
LGTM.
phlrain
approved these changes
Nov 27, 2019
saxon-zh
approved these changes
Nov 27, 2019
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.
LGTM
seiriosPlus
pushed a commit
to seiriosPlus/Paddle
that referenced
this pull request
Dec 9, 2019
…le#20983) * add numpy bridge * fix template compile * add unittest, add default test=develop * fix unittest test=develop * fix unittest test=develop * zero_copy=True for to_variable, test=develop * bug fix test=develop * disable deprecated NumPy API test=develop * use better design of NumpyAllocator test=develop * fix Py_None check test=develop * reset c++ tracer when jump out dygraph guard test=develop * refine PADDLE_ENFORCE_xx format test=develop * bug fix of tracer switch test=develop * update decref test=develop
seiriosPlus
pushed a commit
to seiriosPlus/Paddle
that referenced
this pull request
Dec 9, 2019
…le#20983) * add numpy bridge * fix template compile * add unittest, add default test=develop * fix unittest test=develop * fix unittest test=develop * zero_copy=True for to_variable, test=develop * bug fix test=develop * disable deprecated NumPy API test=develop * use better design of NumpyAllocator test=develop * fix Py_None check test=develop * reset c++ tracer when jump out dygraph guard test=develop * refine PADDLE_ENFORCE_xx format test=develop * bug fix of tracer switch test=develop * update decref test=develop
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.
NumPy Bridge is used for zero-copy creation of a Tensor with a NumPy array.
zero_copy
is enabled by default when place is aCPUPlace
and is in dygraph mode.The created Tensor and NumPy array will share their underlying memory locations (only when working with
CPUPlace
), and change the numpy array will also change the corresponding Tensor.Example: