Skip to content

Conversation

@veyron95
Copy link
Contributor

@veyron95 veyron95 commented Nov 3, 2021

PR types

New features

PR changes

APIs

Describe

1. Exposed interface for VarBase

  • _slice
  • _share_buffer_with
  • _clear
  • _offset

2. VarBase provides a '_to' interface that copies the current varbase to target device and dtype

  • _to

3. Varbase's gradient supports rewriting a new piece of memory

  • _copy_gradient_from

4. Exposed numel interface to get the number of elements

  • _numel

5. varbase supports construction through Tensor and Device

  • InitVarBaseFromTensorWithArg

@paddle-bot-old
Copy link

paddle-bot-old bot commented Nov 3, 2021

Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

@veyron95 veyron95 force-pushed the support_varbase_expose_func branch from c1e2174 to fe60c02 Compare November 9, 2021 08:51
Copy link
Contributor

@JiabinYang JiabinYang left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@ForFishes ForFishes left a comment

Choose a reason for hiding this comment

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

LGTM

@JiabinYang JiabinYang merged commit 5264566 into PaddlePaddle:develop Nov 11, 2021
@veyron95 veyron95 deleted the support_varbase_expose_func branch November 12, 2021 03:48
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.

4 participants