[clang] [llvm] [X86][AMX] Add AMX FP8 new APIs (PR #115829)

via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 11 23:20:42 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 f109517d153609d4a8a3a3d3d3cc06da1b629364 9fd6e9e598423b6cc58a25fe70cc12a846483be5 --extensions h,c,cpp -- clang/test/CodeGen/X86/amx_fp8_api.c clang/lib/Headers/amxfp8intrin.h llvm/lib/Target/X86/X86ExpandPseudo.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/amxfp8intrin.h b/clang/lib/Headers/amxfp8intrin.h
index 4ada936a5d..e0ce81584b 100644
--- a/clang/lib/Headers/amxfp8intrin.h
+++ b/clang/lib/Headers/amxfp8intrin.h
@@ -40,9 +40,12 @@ _tile_dpbf8ps_internal(unsigned short m, unsigned short n, unsigned short k,
 ///     FOR n := 0 TO dst.colsb / 4 - 1
 ///       temp1[n] +=
 ///         INT64(src1.row[m].float8[4*k+0]) * INT64(src2.row[k].float8[4*n+0])
-///         + INT64(src1.row[m].float8[4*k+1]) * INT64(src2.row[k].float8[4*n+1])
-///         + INT64(src1.row[m].float8[4*k+2]) * INT64(src2.row[k].float8[4*n+2])
-///         + INT64(src1.row[m].float8[4*k+3]) * INT64(src2.row[k].float8[4*n+3])
+///         + INT64(src1.row[m].float8[4*k+1]) *
+///         INT64(src2.row[k].float8[4*n+1])
+///         + INT64(src1.row[m].float8[4*k+2]) *
+///         INT64(src2.row[k].float8[4*n+2])
+///         + INT64(src1.row[m].float8[4*k+3]) *
+///         INT64(src2.row[k].float8[4*n+3])
 ///     ENDFOR
 ///   ENDFOR
 ///   FOR n := 0 TO dst.colsb / 4 - 1
@@ -89,9 +92,12 @@ _tile_dpbhf8ps_internal(unsigned short m, unsigned short n, unsigned short k,
 ///     FOR n := 0 TO dst.colsb / 4 - 1
 ///       temp1[n] +=
 ///         INT64(src1.row[m].float8[4*k+0]) * INT64(src2.row[k].float8[4*n+0])
-///         + INT64(src1.row[m].float8[4*k+1]) * INT64(src2.row[k].float8[4*n+1])
-///         + INT64(src1.row[m].float8[4*k+2]) * INT64(src2.row[k].float8[4*n+2])
-///         + INT64(src1.row[m].float8[4*k+3]) * INT64(src2.row[k].float8[4*n+3])
+///         + INT64(src1.row[m].float8[4*k+1]) *
+///         INT64(src2.row[k].float8[4*n+1])
+///         + INT64(src1.row[m].float8[4*k+2]) *
+///         INT64(src2.row[k].float8[4*n+2])
+///         + INT64(src1.row[m].float8[4*k+3]) *
+///         INT64(src2.row[k].float8[4*n+3])
 ///     ENDFOR
 ///   ENDFOR
 ///   FOR n := 0 TO dst.colsb / 4 - 1
@@ -138,9 +144,12 @@ _tile_dphbf8ps_internal(unsigned short m, unsigned short n, unsigned short k,
 ///     FOR n := 0 TO dst.colsb / 4 - 1
 ///       temp1[n] +=
 ///         INT64(src1.row[m].float8[4*k+0]) * INT64(src2.row[k].float8[4*n+0])
-///         + INT64(src1.row[m].float8[4*k+1]) * INT64(src2.row[k].float8[4*n+1])
-///         + INT64(src1.row[m].float8[4*k+2]) * INT64(src2.row[k].float8[4*n+2])
-///         + INT64(src1.row[m].float8[4*k+3]) * INT64(src2.row[k].float8[4*n+3])
+///         + INT64(src1.row[m].float8[4*k+1]) *
+///         INT64(src2.row[k].float8[4*n+1])
+///         + INT64(src1.row[m].float8[4*k+2]) *
+///         INT64(src2.row[k].float8[4*n+2])
+///         + INT64(src1.row[m].float8[4*k+3]) *
+///         INT64(src2.row[k].float8[4*n+3])
 ///     ENDFOR
 ///   ENDFOR
 ///   FOR n := 0 TO dst.colsb / 4 - 1
@@ -188,9 +197,12 @@ _tile_dphf8ps_internal(unsigned short m, unsigned short n, unsigned short k,
 ///     FOR n := 0 TO dst.colsb / 4 - 1
 ///       temp1[n] +=
 ///         INT64(src1.row[m].float8[4*k+0]) * INT64(src2.row[k].float8[4*n+0])
-///         + INT64(src1.row[m].float8[4*k+1]) * INT64(src2.row[k].float8[4*n+1])
-///         + INT64(src1.row[m].float8[4*k+2]) * INT64(src2.row[k].float8[4*n+2])
-///         + INT64(src1.row[m].float8[4*k+3]) * INT64(src2.row[k].float8[4*n+3])
+///         + INT64(src1.row[m].float8[4*k+1]) *
+///         INT64(src2.row[k].float8[4*n+1])
+///         + INT64(src1.row[m].float8[4*k+2]) *
+///         INT64(src2.row[k].float8[4*n+2])
+///         + INT64(src1.row[m].float8[4*k+3]) *
+///         INT64(src2.row[k].float8[4*n+3])
 ///     ENDFOR
 ///   ENDFOR
 ///   FOR n := 0 TO dst.colsb / 4 - 1

``````````

</details>


https://github.com/llvm/llvm-project/pull/115829


More information about the cfe-commits mailing list