Skip to content

Refine backward no_grad_var handling #7153

@JiayiFeng

Description

@JiayiFeng

If all the gradient inputs of some grad_op are marked as no_gradient, which means all of them can be considered as zeros. For grad_ops are in essence the propagation of gradients, all the outputs are definitely zeros when all gradient inputs are zeros. Therefore the grad_op can also be skipped.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions