(grad)
| 377 | monkeypatch.setattr(torch.autograd.graph, "_get_grad_fn_or_grad_acc", _require_grad_enabled) |
| 378 | |
| 379 | def _hook(grad): |
| 380 | seen["count"] = ds_utils.count_used_parameters_in_backward([param]) |
| 381 | return grad |
| 382 | |
| 383 | param.register_hook(_hook) |
| 384 | loss = (param * 2.0).sum() |
nothing calls this directly
no outgoing calls
no test coverage detected