Personally, I’d call that variable grads rather than grad.
You can grab clip_grad_norm_ from the source (link below) and then convert
for p in parameters:
   something with p.grad

into
for gr in grads:
  something with gr

Best regards
Thomas

  
      github.com
  
  
    pytorch/pytorch/blob/bcb44796ba00f9ac5f22e33f1de3a24b277c4c3a/torch/nn/utils/clip_grad.py#L6 4

import warnings
import torch
from torch._six import inf


def clip_grad_norm_(parameters, max_norm, norm_type=2):
    r"""Clips gradient norm of an iterable of parameters.

    The norm is computed over all gradients together, as if they were
    concatenated into a single vector. Gradients are modified in-place.

    Arguments:
        parameters (Iterable[Tensor] or Tensor): an iterable of Tensors or a
            single Tensor that will have gradients normalized
        max_norm (float or int): max norm of the gradients
        norm_type (float or int): type of the used p-norm. Can be ``'inf'`` for