cutlass icon indicating copy to clipboard operation
cutlass copied to clipboard

[QST] Significant GFLOPs variations due to different input initialization behaviours

Open yuukidach opened this issue 1 year ago • 4 comments

What is your question?

env:

  • GPU: NVIDIA H100 80GB HBM3
  • CUDA Version: 12.3
  • cuDNN Version: 90201
  • CUTLASS commit: e1cd8c78

Background

In example 48_hopper_warp_specialized_gemm, I've observed that the behaviours of initializing input blocks can lead to substantial differences in measured GFLOPs .

The example 48 calls BlockFillRandomUniform with bits=0 when initialiing input blokcs. Under this configuration, all floating-point mantissas are truncated to zero. And the example yields a GFLOPs measurement of 326,225. speed of bits=0

after changing the bits parameter to -1 (do not truncat the data), the GLOPS drops to 304768 speed of bits=-1

Profiling Insights:

Memory Throughput: Using ncu for profiling reveals that the truncated data (bits=0) exhibits higher L2 cache and DRAM throughput compared to the non-truncated data (bits=-1). SM Efficiency: The compute efficiency of the SM remains consistent across both initialization methods.

This behavior is not limited to specific input sizes or tile configurations. Similar patterns are observed across various configurations, indicating a potential systemic issue.

Question

Is this result expected? Why does the distribution of input data (truncated vs. non-truncated) affect data transfer speeds and overall performance?

yuukidach avatar Dec 20 '24 17:12 yuukidach

Yes this is expected.

thakkarV avatar Dec 20 '24 18:12 thakkarV

hi @thakkarV, thanks for the confirmation. Would you mind explaining more about how the truncated bits affect the GPU memory transfer? Does this mean that there is actually a data compression process during the transfer of data in GPU memory

yuukidach avatar Dec 21 '24 09:12 yuukidach

https://www.thonking.ai/p/strangely-matrix-multiplications

thakkarV avatar Dec 21 '24 11:12 thakkarV

Thanks for the post. Never thought it would be related to the flipping of transistors

yuukidach avatar Dec 23 '24 04:12 yuukidach