Path: blob/main/contrib/llvm-project/clang/lib/Headers/amxfp16intrin.h
35233 views
/*===------------- amxfp16intrin.h - AMX_FP16 intrinsics -*- C++ -*---------===1*2* Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.3* See https://llvm.org/LICENSE.txt for license information.4* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception5*6*===------------------------------------------------------------------------===7*/89#ifndef __IMMINTRIN_H10#error "Never use <amxfp16intrin.h> directly; use <immintrin.h> instead."11#endif /* __IMMINTRIN_H */1213#ifndef __AMX_FP16INTRIN_H14#define __AMX_FP16INTRIN_H15#ifdef __x86_64__1617/// Compute dot-product of FP16 (16-bit) floating-point pairs in tiles \a a18/// and \a b, accumulating the intermediate single-precision (32-bit)19/// floating-point elements with elements in \a dst, and store the 32-bit20/// result back to tile \a dst.21///22/// \headerfile <immintrin.h>23///24/// \code25/// void _tile_dpfp16ps (__tile dst, __tile a, __tile b)26/// \endcode27///28/// \code{.operation}29/// FOR m := 0 TO dst.rows - 130/// tmp := dst.row[m]31/// FOR k := 0 TO (a.colsb / 4) - 132/// FOR n := 0 TO (dst.colsb / 4) - 133/// tmp.fp32[n] += FP32(a.row[m].fp16[2*k+0]) *34/// FP32(b.row[k].fp16[2*n+0])35/// tmp.fp32[n] += FP32(a.row[m].fp16[2*k+1]) *36/// FP32(b.row[k].fp16[2*n+1])37/// ENDFOR38/// ENDFOR39/// write_row_and_zero(dst, m, tmp, dst.colsb)40/// ENDFOR41/// zero_upper_rows(dst, dst.rows)42/// zero_tileconfig_start()43/// \endcode44///45/// This intrinsic corresponds to the \c TDPFP16PS instruction.46///47/// \param dst48/// The destination tile. Max size is 1024 Bytes.49/// \param a50/// The 1st source tile. Max size is 1024 Bytes.51/// \param b52/// The 2nd source tile. Max size is 1024 Bytes.53#define _tile_dpfp16ps(dst, a, b) \54__builtin_ia32_tdpfp16ps(dst, a, b)5556#endif /* __x86_64__ */57#endif /* __AMX_FP16INTRIN_H */585960