Read git diff HEAD third_party/nvidia/lib/TritonNVIDIAGPUToLLVM/ElementwiseOpToLLVM.cpp.…
- User
Read
git diff HEAD third_party/nvidia/lib/TritonNVIDIAGPUToLLVM/ElementwiseOpToLLVM.cpp. Is there any visible typo? Assistant
Yes, there is a visible typo in the diff. In both the
Fp32_to_Fp8E4M3NvandFp32_to_Fp8E5M2functions (whenhasNativeFPis false), there's a copy-paste error wherelsb1is added toc2andc3instead of the expectedlsb2andlsb3.In
Fp32_to_Fp8E4M3Nv:cpp+ "add.u32 c0, c0, lsb0; \n" + "add.u32 c1, c1, lsb1; \n" + "add.u32 c2, c2, lsb1; \n" // <-- Should be lsb2 + "add.u32 c3, c3, lsb1; \n" // <-- Should be lsb3And similarly in
Fp32_to_Fp8E5M2:cpp+ "add.u32 c0, c0, lsb0; \n" + "add.u32 c1, c1, lsb1; \n" + "add.u32 c2, c2, lsb1; \n" // <-- Should be lsb2 + "add.u32 c3, c3, lsb1; \n" // <-- Should be lsb3- User
Fix it
Assistant
I will locate the typos and replace them using the file replacement tool.
Assistant
I will replace the incorrect typos
lsb1withlsb2andlsb3for bothFp32_to_Fp8E4M3NvandFp32_to_Fp8E5M2using thereplacetool.Assistant
The typos have been successfully fixed! In both
Fp32_to_Fp8E4M3NvandFp32_to_Fp8E5M2,lsb1is now correctly updated tolsb2andlsb3for thec2andc3lines respectively.- User
Do you see any other issue?
- User
System: Please continue.