Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I analyze register spills with Nsight Compute?

I am having trouble finding out where the data for local memory usage is. Right now, I only know to look for STL instructions in the source. I wish I could find concrete numbers.

like image 445
Marko Grdinić Avatar asked Oct 21 '25 10:10

Marko Grdinić


1 Answers

The very short answer is apparently that NSight Compute currently doesn’t show local memory spills.

However:

  • if you are using static compilation with nvcc, you can always see the linker spills to local memory through -Xptxas=“-v” i.e. turn on verbose output from the assembler.
  • if you are using nvrtc and compiling at runtime, you can programmatically obtain the information via the cuFuncGetAttribute API with the CU_FUNC_ATTRIBUTE_LOCAL_SIZE_BYTES attribute if you have a handle to the function
  • If you are using Cupy, kernel objects have the local_size_bytes attribute which is automagically populated after compilation.

[answer assembled from comments and added as a community wiki entry]

like image 64
2 revstalonmies Avatar answered Oct 26 '25 17:10

2 revstalonmies



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!