Skip to content

Conversation

@veyron95
Copy link
Contributor

@veyron95 veyron95 commented Feb 24, 2022

PR types

New features

PR changes

APIs

Describe

  1. Support GradientHook in Eager
  2. Support ReduceHook in Eager
  3. Expose 3 related Hook interface to python
    1. _register_grad_hook —— (GradientHook)
    2. _remove_grad_hook —— (Remove GradientHook)
    3. _register_backward_hook —— (ReduceHook)
  4. There is a DoubleGrad-related unit test left in the test_tensor_register_hook.py, which will be tested after the DoubleGrad supported in Eager.
@paddle-bot-old
Copy link

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

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.

check name

virtual void operator()() = 0;
};

class CppTensorHook : public TensorHook {
Copy link
Contributor

Choose a reason for hiding this comment

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

check name

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

@veyron95 veyron95 merged commit a456dda into PaddlePaddle:develop Feb 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants