-
Notifications
You must be signed in to change notification settings - Fork 6.8k
[FEATURE] Add feature of attach_grad to nonleaf variables in HybridizedBlock. #21091
base: master
Are you sure you want to change the base?
Conversation
|
Hey @KexinFeng , Thanks for submitting the PR
CI supported jobs: [website, clang, miscellaneous, sanity, windows-cpu, edge, windows-gpu, centos-cpu, unix-cpu, unix-gpu, centos-gpu] Note: |
|
@mxnet-bot run ci [unix-cpu, unix-gpu, windows-gpu] |
|
Jenkins CI successfully triggered : [windows-gpu, unix-cpu, unix-gpu] |
4170b23 to
251a644
Compare
251a644 to
bbb258a
Compare
5be12f7 to
49f9036
Compare
49f9036 to
5a87a0c
Compare
|
@mxnet-bot run ci [edge, unix-gpu] |
|
Jenkins CI successfully triggered : [unix-gpu, edge] |
|
@mxnet-bot run ci [unix-gpu] |
|
Jenkins CI successfully triggered : [unix-gpu] |
|
@mxnet-bot run ci [unix-gpu] |
|
Jenkins CI successfully triggered : [unix-gpu] |
Description
This is the same as this #20559. The PR adds the support for fetching the gradients of intermediate variables in a gluon HybridizedBlock. This applies uniformly to both when
block.hybridize()is on and off. This generates theattach_gradimplemented in implemented in PR#20500.The motivation of this feature comes from this issue#11865.
Checklist
Essentials
Changes
block.pywheremark_varsandget_mark_varsare added along withMXNDArrayMarkDCVariables.cached_op.invokein cpp backend andCachedOp.__call__have been editted to include the pass of marked nonleaf ndarrays.set_nleafsmethod is added intoCachedOpclass to store the marked nonleaf ndarrays.void RunGraph, marked nonleaf ndarrays are linked to the marked computational node for autograd computation.Comments