(grad)
| 504 | monkeypatch.setattr(torch.autograd.graph, "_get_grad_fn_or_grad_acc", _require_grad_enabled) |
| 505 | |
| 506 | def _hook(grad): |
| 507 | seen["count"] = ds_utils.count_used_parameters_in_backward([param]) |
| 508 | return grad |
| 509 | |
| 510 | param.register_hook(_hook) |
| 511 | loss = (param * 2.0).sum() |
nothing calls this directly
no outgoing calls
no test coverage detected