[clang] [llvm] [X86][AMX] Support AMX-TRANSPOSE, part 2 (PR #115660)
via cfe-commits
cfe-commits at lists.llvm.org
Sun Nov 10 06:52:05 PST 2024
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff 99f1019f596f745c720e97137bcadb239c573e3e f2fc493149d75f0be13207bc1893a48c7fab84a3 --extensions c,cpp,h -- clang/lib/Headers/amxbf16transposeintrin.h clang/lib/Headers/amxcomplextransposeintrin.h clang/lib/Headers/amxfp16transposeintrin.h clang/lib/Headers/amxfp16intrin.h clang/lib/Headers/amxintrin.h clang/lib/Headers/immintrin.h clang/lib/Sema/SemaX86.cpp clang/test/CodeGen/X86/amx_transpose.c clang/test/CodeGen/X86/amx_transpose_api.c clang/test/CodeGen/X86/amx_transpose_errors.c llvm/lib/Target/X86/X86ExpandPseudo.cpp llvm/lib/Target/X86/X86ISelLowering.cpp llvm/lib/Target/X86/X86LowerAMXType.cpp llvm/lib/Target/X86/X86RegisterInfo.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/clang/lib/Headers/amxcomplextransposeintrin.h b/clang/lib/Headers/amxcomplextransposeintrin.h
index 06fb53e4de..1dddf7ddfc 100644
--- a/clang/lib/Headers/amxcomplextransposeintrin.h
+++ b/clang/lib/Headers/amxcomplextransposeintrin.h
@@ -45,11 +45,10 @@
/// tmp := dst.row[m]
/// FOR k := 0 TO a.rows - 1
/// FOR n := 0 TO (dst.colsb / 4) - 1
-/// tmp.fp32[n] += FP32(a.row[m].fp16[2*k+0]) * FP32(b.row[k].fp16[2*n+1])
-/// tmp.fp32[n] += FP32(a.row[m].fp16[2*k+1]) * FP32(b.row[k].fp16[2*n+0])
-/// ENDFOR
-/// ENDFOR
-/// write_row_and_zero(dst, m, tmp, dst.colsb)
+/// tmp.fp32[n] += FP32(a.row[m].fp16[2*k+0]) *
+///FP32(b.row[k].fp16[2*n+1]) tmp.fp32[n] += FP32(a.row[m].fp16[2*k+1]) *
+///FP32(b.row[k].fp16[2*n+0]) ENDFOR ENDFOR write_row_and_zero(dst, m, tmp,
+///dst.colsb)
/// ENDFOR
/// zero_upper_rows(dst, dst.rows)
/// zero_tileconfig_start()
@@ -90,11 +89,10 @@
/// tmp := dst.row[m]
/// FOR k := 0 TO a.rows - 1
/// FOR n := 0 TO (dst.colsb / 4) - 1
-/// tmp.fp32[n] += FP32(a.row[m].fp16[2*k+0]) * FP32(b.row[k].fp16[2*n+0])
-/// tmp.fp32[n] += FP32(-a.row[m].fp16[2*k+1]) * FP32(b.row[k].fp16[2*n+1])
-/// ENDFOR
-/// ENDFOR
-/// write_row_and_zero(dst, m, tmp, dst.colsb)
+/// tmp.fp32[n] += FP32(a.row[m].fp16[2*k+0]) *
+///FP32(b.row[k].fp16[2*n+0]) tmp.fp32[n] += FP32(-a.row[m].fp16[2*k+1]) *
+///FP32(b.row[k].fp16[2*n+1]) ENDFOR ENDFOR write_row_and_zero(dst, m, tmp,
+///dst.colsb)
/// ENDFOR
/// zero_upper_rows(dst, dst.rows)
/// zero_tileconfig_start()
@@ -136,11 +134,10 @@
/// tmp := dst.row[m]
/// FOR k := 0 TO a.rows - 1
/// FOR n := 0 TO (dst.colsb / 4) - 1
-/// tmp.fp32[n] += FP32(a.row[m].fp16[2*k+0]) * FP32(b.row[k].fp16[2*n+1])
-/// tmp.fp32[n] += FP32(-a.row[m].fp16[2*k+1]) * FP32(b.row[k].fp16[2*n+0])
-/// ENDFOR
-/// ENDFOR
-/// write_row_and_zero(dst, m, tmp, dst.colsb)
+/// tmp.fp32[n] += FP32(a.row[m].fp16[2*k+0]) *
+///FP32(b.row[k].fp16[2*n+1]) tmp.fp32[n] += FP32(-a.row[m].fp16[2*k+1]) *
+///FP32(b.row[k].fp16[2*n+0]) ENDFOR ENDFOR write_row_and_zero(dst, m, tmp,
+///dst.colsb)
/// ENDFOR
/// zero_upper_rows(dst, dst.rows)
/// zero_tileconfig_start()
@@ -204,8 +201,8 @@ static __inline__ _tile1024i __DEFAULT_FN_ATTRS _tile_conjtcmmimfp16ps_internal(
return __builtin_ia32_tconjtcmmimfp16ps_internal(m, n, k, dst, src1, src2);
}
-static __inline__ _tile1024i __DEFAULT_FN_ATTRS _tile_conjtfp16_internal(
- unsigned short m, unsigned short n, _tile1024i src) {
+static __inline__ _tile1024i __DEFAULT_FN_ATTRS
+_tile_conjtfp16_internal(unsigned short m, unsigned short n, _tile1024i src) {
return __builtin_ia32_tconjtfp16_internal(m, n, src);
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/115660
More information about the cfe-commits
mailing list