Lines Matching +full:max +full:- +full:by +full:- +full:define
1 /*===--------------- amxintrin.h - AMX intrinsics -*- C/C++ -*---------------===
5 * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 *===------------------------------------------------------------------------===
15 #define __AMXINTRIN_H
18 /* Define the default attributes for the functions in this file. */
19 #define __DEFAULT_FN_ATTRS_TILE \
20 __attribute__((__always_inline__, __nodebug__, __target__("amx-tile")))
21 #define __DEFAULT_FN_ATTRS_INT8 \
22 __attribute__((__always_inline__, __nodebug__, __target__("amx-int8")))
23 #define __DEFAULT_FN_ATTRS_BF16 \
24 __attribute__((__always_inline__, __nodebug__, __target__("amx-bf16")))
25 #define __DEFAULT_FN_ATTRS_FP16 \
26 __attribute__((__always_inline__, __nodebug__, __target__("amx-fp16")))
28 /// Load tile configuration from a 64-byte memory location specified by
40 /// A pointer to 512-bits configuration
46 /// Stores the current tile configuration to a 64-byte memory location
47 /// specified by "mem_addr". The tile configuration includes the tile type
56 /// A pointer to 512-bits configuration
72 /// Load tile rows from memory specifieid by "base" address and "stride" into
81 /// A destination tile. Max size is 1024 Bytes.
86 #define _tile_loadd(dst, base, stride) \
90 /// Load tile rows from memory specifieid by "base" address and "stride" into
101 /// A destination tile. Max size is 1024 Bytes.
106 #define _tile_stream_loadd(dst, base, stride) \
110 /// Store the tile specified by "src" to memory specifieid by "base" address and
119 /// A destination tile. Max size is 1024 Bytes.
124 #define _tile_stored(dst, base, stride) \
127 /// Zero the tile specified by "tdest".
134 /// The destination tile to be zero. Max size is 1024 Bytes.
135 #define _tile_zero(tile) __builtin_ia32_tilezero((tile))
137 /// Compute dot-product of bytes in tiles with a source/destination accumulator.
138 /// Multiply groups of 4 adjacent pairs of signed 8-bit integers in src0 with
139 /// corresponding signed 8-bit integers in src1, producing 4 intermediate 32-bit
140 /// results. Sum these 4 results with the corresponding 32-bit integer in "dst",
141 /// and store the 32-bit result back to tile "dst".
148 /// The destination tile. Max size is 1024 Bytes.
150 /// The 1st source tile. Max size is 1024 Bytes.
152 /// The 2nd source tile. Max size is 1024 Bytes.
153 #define _tile_dpbssd(dst, src0, src1) \
156 /// Compute dot-product of bytes in tiles with a source/destination accumulator.
157 /// Multiply groups of 4 adjacent pairs of signed 8-bit integers in src0 with
158 /// corresponding unsigned 8-bit integers in src1, producing 4 intermediate
159 /// 32-bit results. Sum these 4 results with the corresponding 32-bit integer
160 /// in "dst", and store the 32-bit result back to tile "dst".
167 /// The destination tile. Max size is 1024 Bytes.
169 /// The 1st source tile. Max size is 1024 Bytes.
171 /// The 2nd source tile. Max size is 1024 Bytes.
172 #define _tile_dpbsud(dst, src0, src1) \
175 /// Compute dot-product of bytes in tiles with a source/destination accumulator.
176 /// Multiply groups of 4 adjacent pairs of unsigned 8-bit integers in src0 with
177 /// corresponding signed 8-bit integers in src1, producing 4 intermediate 32-bit
178 /// results. Sum these 4 results with the corresponding 32-bit integer in "dst",
179 /// and store the 32-bit result back to tile "dst".
186 /// The destination tile. Max size is 1024 Bytes.
188 /// The 1st source tile. Max size is 1024 Bytes.
190 /// The 2nd source tile. Max size is 1024 Bytes.
191 #define _tile_dpbusd(dst, src0, src1) \
194 /// Compute dot-product of bytes in tiles with a source/destination accumulator.
195 /// Multiply groups of 4 adjacent pairs of unsigned 8-bit integers in src0 with
196 /// corresponding unsigned 8-bit integers in src1, producing 4 intermediate
197 /// 32-bit results. Sum these 4 results with the corresponding 32-bit integer in
198 /// "dst", and store the 32-bit result back to tile "dst".
205 /// The destination tile. Max size is 1024 Bytes.
207 /// The 1st source tile. Max size is 1024 Bytes.
209 /// The 2nd source tile. Max size is 1024 Bytes.
210 #define _tile_dpbuud(dst, src0, src1) \
213 /// Compute dot-product of BF16 (16-bit) floating-point pairs in tiles src0 and
214 /// src1, accumulating the intermediate single-precision (32-bit) floating-point
215 /// elements with elements in "dst", and store the 32-bit result back to tile
223 /// The destination tile. Max size is 1024 Bytes.
225 /// The 1st source tile. Max size is 1024 Bytes.
227 /// The 2nd source tile. Max size is 1024 Bytes.
228 #define _tile_dpbf16ps(dst, src0, src1) \
305 /// for optimization by compiler.
312 /// Load tile rows from memory specifieid by "base" address and "stride" into
320 /// A destination tile. Max size is 1024 Bytes.
328 dst->tile = _tile_loadd_internal(dst->row, dst->col, base, stride); in __tile_loadd()
331 /// Load tile rows from memory specifieid by "base" address and "stride" into
341 /// A destination tile. Max size is 1024 Bytes.
349 dst->tile = _tile_loaddt1_internal(dst->row, dst->col, base, stride); in __tile_stream_loadd()
352 /// Compute dot-product of bytes in tiles with a source/destination accumulator.
353 /// Multiply groups of 4 adjacent pairs of signed 8-bit integers in src0 with
354 /// corresponding signed 8-bit integers in src1, producing 4 intermediate 32-bit
355 /// results. Sum these 4 results with the corresponding 32-bit integer in "dst",
356 /// and store the 32-bit result back to tile "dst".
363 /// The destination tile. Max size is 1024 Bytes.
365 /// The 1st source tile. Max size is 1024 Bytes.
367 /// The 2nd source tile. Max size is 1024 Bytes.
371 dst->tile = _tile_dpbssd_internal(src0.row, src1.col, src0.col, dst->tile, in __tile_dpbssd()
375 /// Compute dot-product of bytes in tiles with a source/destination accumulator.
376 /// Multiply groups of 4 adjacent pairs of signed 8-bit integers in src0 with
377 /// corresponding unsigned 8-bit integers in src1, producing 4 intermediate
378 /// 32-bit results. Sum these 4 results with the corresponding 32-bit integer
379 /// in "dst", and store the 32-bit result back to tile "dst".
386 /// The destination tile. Max size is 1024 Bytes.
388 /// The 1st source tile. Max size is 1024 Bytes.
390 /// The 2nd source tile. Max size is 1024 Bytes.
394 dst->tile = _tile_dpbsud_internal(src0.row, src1.col, src0.col, dst->tile, in __tile_dpbsud()
398 /// Compute dot-product of bytes in tiles with a source/destination accumulator.
399 /// Multiply groups of 4 adjacent pairs of unsigned 8-bit integers in src0 with
400 /// corresponding signed 8-bit integers in src1, producing 4 intermediate 32-bit
401 /// results. Sum these 4 results with the corresponding 32-bit integer in "dst",
402 /// and store the 32-bit result back to tile "dst".
409 /// The destination tile. Max size is 1024 Bytes.
411 /// The 1st source tile. Max size is 1024 Bytes.
413 /// The 2nd source tile. Max size is 1024 Bytes.
417 dst->tile = _tile_dpbusd_internal(src0.row, src1.col, src0.col, dst->tile, in __tile_dpbusd()
421 /// Compute dot-product of bytes in tiles with a source/destination accumulator.
422 /// Multiply groups of 4 adjacent pairs of unsigned 8-bit integers in src0 with
423 /// corresponding unsigned 8-bit integers in src1, producing 4 intermediate
424 /// 32-bit results. Sum these 4 results with the corresponding 32-bit integer in
425 /// "dst", and store the 32-bit result back to tile "dst".
432 /// The destination tile. Max size is 1024 Bytes.
434 /// The 1st source tile. Max size is 1024 Bytes.
436 /// The 2nd source tile. Max size is 1024 Bytes.
440 dst->tile = _tile_dpbuud_internal(src0.row, src1.col, src0.col, dst->tile, in __tile_dpbuud()
444 /// Store the tile specified by "src" to memory specifieid by "base" address and
461 /// Zero the tile specified by "dst".
468 /// The destination tile to be zero. Max size is 1024 Bytes.
471 dst->tile = __builtin_ia32_tilezero_internal(dst->row, dst->col); in __tile_zero()
474 /// Compute dot-product of BF16 (16-bit) floating-point pairs in tiles src0 and
475 /// src1, accumulating the intermediate single-precision (32-bit) floating-point
476 /// elements with elements in "dst", and store the 32-bit result back to tile
484 /// The destination tile. Max size is 1024 Bytes.
486 /// The 1st source tile. Max size is 1024 Bytes.
488 /// The 2nd source tile. Max size is 1024 Bytes.
492 dst->tile = _tile_dpbf16ps_internal(src0.row, src1.col, src0.col, dst->tile, in __tile_dpbf16ps()
496 /// Compute dot-product of FP16 (16-bit) floating-point pairs in tiles src0 and
497 /// src1, accumulating the intermediate single-precision (32-bit) floating-point
498 /// elements with elements in "dst", and store the 32-bit result back to tile
506 /// The destination tile. Max size is 1024 Bytes.
508 /// The 1st source tile. Max size is 1024 Bytes.
510 /// The 2nd source tile. Max size is 1024 Bytes.
514 dst->tile = _tile_dpfp16ps_internal(src0.row, src1.col, src0.col, dst->tile, in __tile_dpfp16ps()