Hello,
You might not get the theoretical 3x FP64 performance increase for H100 over A100 since the Power Ratio is only 700/400 = 1.75 (even if you have enough memory bandwidth and with process size being more efficient 4 nm vs 7nm).
I pinged Yves Gallot creator of the Integer NTT program Genefer from PrimeGrid and also did some searches in this forum and read the same.
That is why for 7.5MB FP64 FFT for PRPLL NTT the iteration time ratio was only 1.92 and not 3.
Note: PRPLL NTT is OpenCL so I am unable to use Nsight Compute.
At Google Colab (colab.research.google.com), you can rent the A100 or now also the new, hard to get H100.
! nvidia-smi reveals the following versions:
NVIDIA A100-SXM4-40GB (400 Watts)
NVIDIA H100 80GB (700 Watts)
Here are the complete details about both straight from the official H100 whitepaper:
https://resources.nvidia.com/en-us-hopper-architecture/nvidia-h100-tensor-c
L2 cache size:
A100: 40MB
H100: 50MB
Memory Bandwidth
A100: 1555 GB/sec
H100: 3352 GB/sec
FP64 TFLOPS
A100: 9.7
H100 33.5
On Google Colab, A100 has an iteration time of 412 microseconds after tuning with latest version of PRPLL NTT (that supports both FP64 FFT and Integer NTT) using 7.5MB FP64 FFT (INPLACE).
On Google Colab, H100 has an iteration time of 215 microseconds after tuning with latest version of PRPLL NTT (that supports both FP64 FFT and Integer NTT) using 7.5MB FP64 FFT (INPLACE).
If my math is correct, memory bandwidth calculations (ignoring the twiddle factors storage and bandwidth)
A100: 7.5 MB * 8 bytes (FP64 FFT) * 4 pass * 2 (read/write) [4 passes per iteration, each pass a read and write now INPLACE, not buffer to buffer] / 1024 * 1000000 / 412 = 1137.74 GB / sec
H100: 7.5 MB * 8 bytes (FP64 FFT) * 4 pass * 2 (read/write) [4 passes per iteration, each pass a read and write now INPLACE, not buffer to buffer] / 1024 * 1000000 / 215 = 2180.23 GB / sec
Similarly, Yves said “We can see this limitation with Zen-5 and AVX-512. In theory, each core is able to execute 2 FMA and 2 FADD per clock; but if a benchmark executes this code then the clock frequency drops. It is faster than Zen-4 but +30/40% and not 2x.”
Thus Nvidia advertises 3x FP32 and FP64 increase and 2x memory bandwidth increase of H100 over A100, but even with plenty of memory bandwidth available the 3x FP64 increase may not happen since power increase is only 1.75x.
I have a follow up question to Yves to see if the above is related since I always wondered why A100 for FP64 wasn’t even more faster than consumer RTX 4060. RTX 4060 with FP64:FP32 ratio 1:64 has 236.2 FP64 GFLOPS. (4060 Memory Bandwidth is 272 GB/sec). So comparing A100 to RTX 4060 on just theoretical FP64 FLOPS yields 9700/236.2 = 41.1 ratio. Yet RTX 4060 7.5MB FP64 is 5959 microseconds per iteration so it’s “only” 5959/412 = 14.46 slower and not 41.1. Thankfully now that PRPLL support integer NTT using for same size number 4MB M31+M61 integer NTT (12 bytes) brings its iteration time down to 1421 microseconds per iteration (memory bound 4 * 12 * 4 * 2 / 1024 * 1000000 / 1421 = 263.898 GB / sec).
Before INPLACE improvement, the cache improvement from George Woltman was “PRPLL does 4 passes over the data. Previously, each pass accessed all the data. Now one pass accesses all the data (unavoidable), then PRPLL does 3 passes on the M31 data, then three passes on the M61 data. The three M31 passes access 4MB * 4 bytes * 2 buffers = 32MB. The three M61 passes access 64MB. If the L2 cache size is between 32MB and 64MB these three passes can operate out of the cache (either partly or mostly).” Now, in addition INPLACE has been implemented and both help out even RTX 4060.
Great Internet Mersenne Prime Search (GIMPS)
Current Version: Windows PRPLL NTT
Current Version: Linux PRPLL NTT