The underscore (_) is a special variable which will get the output of the last operation as seen here:
a = 5

a
Out[2]: 5

6
Out[3]: 6

_
Out[4]: 6

_ + _
Out[5]: 12

If you are stepping through the code in a REPL env I would guess that in particular this variable can hold a reference to the CUDATensor and could thus report the GPU usage. On the other hand, if you execute the entire script, the memory usage is shown as 0. which is expected since you didn’t assign the CUDATensor to any variable so it will be discarded.