diff --git a/projects/hip/include/hip/hcc_detail/hip_fp16.h b/projects/hip/include/hip/hcc_detail/hip_fp16.h index 3b03174708..fb6cd0a44c 100644 --- a/projects/hip/include/hip/hcc_detail/hip_fp16.h +++ b/projects/hip/include/hip/hcc_detail/hip_fp16.h @@ -27,7 +27,7 @@ THE SOFTWARE. #define __CLANG_VERSION__ __clang_major__ * 10 + __clang_minor__ -#if __CLANG_VERSION__ == 40 +#ifdef HIP_HALF_HW_SUPPORT typedef __fp16 __half; diff --git a/projects/hip/src/hip_ir.ll b/projects/hip/src/hip_ir.ll index 831c4159f0..4b7bd3b10e 100644 --- a/projects/hip/src/hip_ir.ll +++ b/projects/hip/src/hip_ir.ll @@ -54,7 +54,7 @@ define linkonce_odr spir_func half @__hip_hsub_gfx803(half %a, half %b) #1 { ret half %val } -define linkonce_odr spir_func i32 @__hip_hadd2_gfx803(i32 %a i32 %b) #1 { +define linkonce_odr spir_func i32 @__hip_hadd2_gfx803(i32 %a, i32 %b) #1 { %val = tail call i32 asm "v_add_f16_sdwa $0, $1, $2 dst_sel:WORD_0 dst_unused:UNUSED_PRESERVE src0_sel:WORD_0 src1_sel:WORD_0","=v,v,v"(i32 %a, i32 %b) ret i32 %val }