No. All computations need not be within nn.Module subclass.
You have to traceback and see if the computation graph remains connected (if you use detach() / .item() etc, the graph disconnects) and at least one operand (parameters/inputs) in the graph has requires_grad=True.