|
| 1 | +/*===------------- amxfp8intrin.h - AMX intrinsics -*- C++ -*----------------=== |
| 2 | + * |
| 3 | + * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
| 4 | + * See https://llvm.org/LICENSE.txt for license information. |
| 5 | + * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| 6 | + * |
| 7 | + *===------------------------------------------------------------------------=== |
| 8 | + */ |
| 9 | + |
| 10 | +#ifndef __IMMINTRIN_H |
| 11 | +#error "Never use <amxfp8intrin.h> directly; include <immintrin.h> instead." |
| 12 | +#endif /* __IMMINTRIN_H */ |
| 13 | + |
| 14 | +#ifndef __AMXFP8INTRIN_H |
| 15 | +#define __AMXFP8INTRIN_H |
| 16 | +#ifdef __x86_64__ |
| 17 | + |
| 18 | +/// Peform the dot product of a BF8 value \a a by a BF8 value \a b accumulating |
| 19 | +/// into a Single Precision (FP32) source/dest \a dst. |
| 20 | +/// |
| 21 | +/// \headerfile <immintrin.h> |
| 22 | +/// |
| 23 | +/// \code |
| 24 | +/// void _tile_dpbf8ps (__tile dst, __tile a, __tile b) |
| 25 | +/// \endcode |
| 26 | +/// |
| 27 | +/// This intrinsic corresponds to the \c TDPBF8PS instruction. |
| 28 | +/// |
| 29 | +/// \param dst |
| 30 | +/// The destination tile. Max size is 1024 Bytes. |
| 31 | +/// \param a |
| 32 | +/// The 1st source tile. Max size is 1024 Bytes. |
| 33 | +/// \param b |
| 34 | +/// The 2nd source tile. Max size is 1024 Bytes. |
| 35 | +#define _tile_dpbf8ps(dst, a, b) __builtin_ia32_tdpbf8ps((dst), (a), (b)) |
| 36 | + |
| 37 | +/// Perform the dot product of a BF8 value \a a by an HF8 value \a b |
| 38 | +/// accumulating into a Single Precision (FP32) source/dest \a dst. |
| 39 | +/// |
| 40 | +/// \headerfile <immintrin.h> |
| 41 | +/// |
| 42 | +/// \code |
| 43 | +/// void _tile_dpbhf8ps (__tile dst, __tile a, __tile b) |
| 44 | +/// \endcode |
| 45 | +/// |
| 46 | +/// This intrinsic corresponds to the \c TDPBHF8PS instruction. |
| 47 | +/// |
| 48 | +/// \param dst |
| 49 | +/// The destination tile. Max size is 1024 Bytes. |
| 50 | +/// \param a |
| 51 | +/// The 1st source tile. Max size is 1024 Bytes. |
| 52 | +/// \param b |
| 53 | +/// The 2nd source tile. Max size is 1024 Bytes. |
| 54 | +#define _tile_dpbhf8ps(dst, a, b) __builtin_ia32_tdpbhf8ps((dst), (a), (b)) |
| 55 | + |
| 56 | +/// Perform the dot product of an HF8 value \a a by a BF8 value \a b |
| 57 | +/// accumulating into a Single Precision (FP32) source/dest \a dst. |
| 58 | +/// |
| 59 | +/// \headerfile <immintrin.h> |
| 60 | +/// |
| 61 | +/// \code |
| 62 | +/// void _tile_dphbf8ps (__tile dst, __tile a, __tile b) |
| 63 | +/// \endcode |
| 64 | +/// |
| 65 | +/// This intrinsic corresponds to the \c TDPHBF8PS instruction. |
| 66 | +/// |
| 67 | +/// \param dst |
| 68 | +/// The destination tile. Max size is 1024 Bytes. |
| 69 | +/// \param a |
| 70 | +/// The 1st source tile. Max size is 1024 Bytes. |
| 71 | +/// \param b |
| 72 | +/// The 2nd source tile. Max size is 1024 Bytes. |
| 73 | +#define _tile_dphbf8ps(dst, a, b) __builtin_ia32_tdphbf8ps((dst), (a), (b)) |
| 74 | + |
| 75 | +/// Perform the dot product of an HF8 value \a a by an HF8 value \a b |
| 76 | +/// accumulating into a Single Precision (FP32) source/dest \a dst. |
| 77 | +/// |
| 78 | +/// \headerfile <immintrin.h> |
| 79 | +/// |
| 80 | +/// \code |
| 81 | +/// void _tile_dphf8ps (__tile dst, __tile a, __tile b) |
| 82 | +/// \endcode |
| 83 | +/// |
| 84 | +/// This intrinsic corresponds to the \c TDPHF8PS instruction. |
| 85 | +/// |
| 86 | +/// \param dst |
| 87 | +/// The destination tile. Max size is 1024 Bytes. |
| 88 | +/// \param a |
| 89 | +/// The 1st source tile. Max size is 1024 Bytes. |
| 90 | +/// \param b |
| 91 | +/// The 2nd source tile. Max size is 1024 Bytes. |
| 92 | +#define _tile_dphf8ps(dst, a, b) __builtin_ia32_tdphf8ps((dst), (a), (b)) |
| 93 | + |
| 94 | +#endif /* __x86_64__ */ |
| 95 | +#endif /* __AMXFP8INTRIN_H */ |
0 commit comments