intel / intel-xpu-backend-for-triton

OpenAI Triton backend for Intel® GPUs
MIT License
100 stars 28 forks source link

Use `intel::mangle` in `TritonGENToLLVMPass.cpp` #1284

Open victor-eds opened 3 weeks ago

victor-eds commented 3 weeks ago

https://github.com/intel/intel-xpu-backend-for-triton/pull/1282 added intel::mangle in Mangle.h introducing simple function name mangling. TritonGENToLLVMPass.cpp does not use this, using a per use case basis. Refactor and use new function instead.

jopperm commented 5 days ago

The mangling code in TritonGENToLLVMPass.cpp caters to some oddities in IGC's mangling of the intel_sub_group_tf32_tf32_matrix_mad_k8(float __vector(8), float __vector(8), float __vector(8)) function: Its arguments are mangled Dv8_fDv8_fS0_ (= substituting the third with the second occurrence, ignoring the first) instead of Dv8_fS_S_. I'd argue that it doesn't make sense implement this behavior in a generic helper method.

victor-eds commented 5 days ago

I agree with @jopperm here. I'd say we can reject this. Any thoughts, @whitneywhtsang?

whitneywhtsang commented 5 days ago

@jopperm Did you verified that IGC only accepts Dv8_fDv8_fS0_ and not Dv8_fS_S_? I wonder we generate Dv8_fDv8_fS0_ by mistake.