[BUG] Incorrect calculation results of CuteDsl/ampere/tensorop_gemm.py
Describe the bug
python3 tensorop_gemm.py --mnkl 8,16384,16384,1 failed to pass ref check on RTX 5000 Ada (sm_89).
AssertionError: Tensor-likes are not close!
Mismatched elements: 90391 / 131072 (69.0%)
Greatest absolute difference: 18.0 at index (6, 2160, 0) (up to 0.001 allowed)
Greatest relative difference: 0.00452423095703125 at index (6, 2160, 0) (up to 1e-05 allowed)
This issue does not occur when using smaller n,k values.
Steps/Code to reproduce bug Just run the program with the given options.
Expected behavior The program should pass ref check.
@keithzzzzz
It seems that when k is large enough, the recast result from fp32 to fp16 start to differ from the reference program.
@lucifer1004 I can't reproduce your problem, what's your GPU
This issue has been labeled inactive-30d due to no recent activity in the past 30 days. Please close this issue if no further response or action is needed. Otherwise, please respond with a comment indicating any updates or changes to the original issue and/or confirm this issue still needs to be addressed. This issue will be labeled inactive-90d if there is no activity in the next 60 days.
Hi @lucifer1004 , we found that the torch.enisum has precision issue for ada arch. If you use cpu tensors to call torch.enisum, or use fp32 datatype, the program could pass ref check.
We will change the input reference tensors to datatype fp32 later.
FYI - This is fixed in 4.1. Please let us know if you see other issues.