llvm-runtime-resources-darwin 0.0.0 → 22.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/NOTICE +33 -0
- package/include/__clang_cuda_builtin_vars.h +121 -0
- package/include/__clang_cuda_cmath.h +512 -0
- package/include/__clang_cuda_complex_builtins.h +229 -0
- package/include/__clang_cuda_device_functions.h +1572 -0
- package/include/__clang_cuda_intrinsics.h +994 -0
- package/include/__clang_cuda_libdevice_declares.h +468 -0
- package/include/__clang_cuda_math.h +353 -0
- package/include/__clang_cuda_math_forward_declares.h +284 -0
- package/include/__clang_cuda_runtime_wrapper.h +522 -0
- package/include/__clang_cuda_texture_intrinsics.h +1177 -0
- package/include/__clang_hip_cmath.h +848 -0
- package/include/__clang_hip_libdevice_declares.h +340 -0
- package/include/__clang_hip_math.h +1405 -0
- package/include/__clang_hip_runtime_wrapper.h +165 -0
- package/include/__clang_hip_stdlib.h +43 -0
- package/include/__clang_spirv_builtins.h +217 -0
- package/include/__float_float.h +176 -0
- package/include/__float_header_macro.h +12 -0
- package/include/__float_infinity_nan.h +20 -0
- package/include/__stdarg___gnuc_va_list.h +13 -0
- package/include/__stdarg___va_copy.h +12 -0
- package/include/__stdarg_header_macro.h +12 -0
- package/include/__stdarg_va_arg.h +22 -0
- package/include/__stdarg_va_copy.h +12 -0
- package/include/__stdarg_va_list.h +13 -0
- package/include/__stddef_header_macro.h +12 -0
- package/include/__stddef_max_align_t.h +27 -0
- package/include/__stddef_null.h +29 -0
- package/include/__stddef_nullptr_t.h +29 -0
- package/include/__stddef_offsetof.h +17 -0
- package/include/__stddef_ptrdiff_t.h +20 -0
- package/include/__stddef_rsize_t.h +20 -0
- package/include/__stddef_size_t.h +20 -0
- package/include/__stddef_unreachable.h +21 -0
- package/include/__stddef_wchar_t.h +28 -0
- package/include/__stddef_wint_t.h +15 -0
- package/include/__wmmintrin_aes.h +140 -0
- package/include/__wmmintrin_pclmul.h +48 -0
- package/include/adcintrin.h +165 -0
- package/include/adxintrin.h +107 -0
- package/include/altivec.h +19364 -0
- package/include/amdgpuintrin.h +191 -0
- package/include/ammintrin.h +183 -0
- package/include/amo.h +131 -0
- package/include/amxavx512intrin.h +596 -0
- package/include/amxcomplexintrin.h +167 -0
- package/include/amxfp16intrin.h +93 -0
- package/include/amxfp8intrin.h +230 -0
- package/include/amxintrin.h +492 -0
- package/include/amxmovrsintrin.h +48 -0
- package/include/amxtf32intrin.h +108 -0
- package/include/andes_vector.h +16 -0
- package/include/arm64intr.h +35 -0
- package/include/arm_acle.h +865 -0
- package/include/arm_bf16.h +20 -0
- package/include/arm_cde.h +410 -0
- package/include/arm_cmse.h +217 -0
- package/include/arm_fp16.h +596 -0
- package/include/arm_mve.h +19187 -0
- package/include/arm_neon.h +74183 -0
- package/include/arm_neon_sve_bridge.h +182 -0
- package/include/arm_sme.h +3741 -0
- package/include/arm_sve.h +32278 -0
- package/include/arm_vector_types.h +432 -0
- package/include/armintr.h +31 -0
- package/include/avx10_2_512bf16intrin.h +568 -0
- package/include/avx10_2_512convertintrin.h +322 -0
- package/include/avx10_2_512minmaxintrin.h +127 -0
- package/include/avx10_2_512niintrin.h +314 -0
- package/include/avx10_2_512satcvtdsintrin.h +307 -0
- package/include/avx10_2_512satcvtintrin.h +301 -0
- package/include/avx10_2bf16intrin.h +1094 -0
- package/include/avx10_2convertintrin.h +3257 -0
- package/include/avx10_2copyintrin.h +66 -0
- package/include/avx10_2minmaxintrin.h +232 -0
- package/include/avx10_2niintrin.h +409 -0
- package/include/avx10_2satcvtdsintrin.h +376 -0
- package/include/avx10_2satcvtintrin.h +312 -0
- package/include/avx2intrin.h +5191 -0
- package/include/avx512bf16intrin.h +292 -0
- package/include/avx512bitalgintrin.h +75 -0
- package/include/avx512bwintrin.h +1895 -0
- package/include/avx512cdintrin.h +112 -0
- package/include/avx512dqintrin.h +1350 -0
- package/include/avx512fintrin.h +9378 -0
- package/include/avx512fp16intrin.h +3355 -0
- package/include/avx512ifmaintrin.h +68 -0
- package/include/avx512ifmavlintrin.h +138 -0
- package/include/avx512vbmi2intrin.h +368 -0
- package/include/avx512vbmiintrin.h +98 -0
- package/include/avx512vbmivlintrin.h +179 -0
- package/include/avx512vlbf16intrin.h +527 -0
- package/include/avx512vlbitalgintrin.h +135 -0
- package/include/avx512vlbwintrin.h +3064 -0
- package/include/avx512vlcdintrin.h +202 -0
- package/include/avx512vldqintrin.h +1156 -0
- package/include/avx512vlfp16intrin.h +2090 -0
- package/include/avx512vlintrin.h +8083 -0
- package/include/avx512vlvbmi2intrin.h +710 -0
- package/include/avx512vlvnniintrin.h +313 -0
- package/include/avx512vlvp2intersectintrin.h +123 -0
- package/include/avx512vnniintrin.h +116 -0
- package/include/avx512vp2intersectintrin.h +77 -0
- package/include/avx512vpopcntdqintrin.h +62 -0
- package/include/avx512vpopcntdqvlintrin.h +105 -0
- package/include/avxifmaintrin.h +193 -0
- package/include/avxintrin.h +5064 -0
- package/include/avxneconvertintrin.h +484 -0
- package/include/avxvnniint16intrin.h +451 -0
- package/include/avxvnniint8intrin.h +454 -0
- package/include/avxvnniintrin.h +233 -0
- package/include/bmi2intrin.h +253 -0
- package/include/bmiintrin.h +604 -0
- package/include/builtins.h +19 -0
- package/include/cet.h +66 -0
- package/include/cetintrin.h +115 -0
- package/include/cldemoteintrin.h +36 -0
- package/include/clflushoptintrin.h +36 -0
- package/include/clwbintrin.h +38 -0
- package/include/clzerointrin.h +38 -0
- package/include/cmpccxaddintrin.h +70 -0
- package/include/cpuid.h +451 -0
- package/include/crc32intrin.h +100 -0
- package/include/cuda_wrappers/__utility/declval.h +28 -0
- package/include/cuda_wrappers/algorithm +116 -0
- package/include/cuda_wrappers/bits/basic_string.h +9 -0
- package/include/cuda_wrappers/bits/basic_string.tcc +9 -0
- package/include/cuda_wrappers/bits/c++config.h +61 -0
- package/include/cuda_wrappers/bits/shared_ptr_base.h +9 -0
- package/include/cuda_wrappers/cmath +44 -0
- package/include/cuda_wrappers/complex +90 -0
- package/include/cuda_wrappers/new +108 -0
- package/include/emmintrin.h +4940 -0
- package/include/enqcmdintrin.h +63 -0
- package/include/f16cintrin.h +176 -0
- package/include/float.h +48 -0
- package/include/fma4intrin.h +220 -0
- package/include/fmaintrin.h +826 -0
- package/include/fuzzer/FuzzedDataProvider.h +397 -0
- package/include/fxsrintrin.h +91 -0
- package/include/gfniintrin.h +238 -0
- package/include/gpuintrin.h +330 -0
- package/include/hexagon_circ_brev_intrinsics.h +298 -0
- package/include/hexagon_protos.h +8439 -0
- package/include/hexagon_types.h +2628 -0
- package/include/hresetintrin.h +49 -0
- package/include/htmintrin.h +212 -0
- package/include/htmxlintrin.h +345 -0
- package/include/hvx_hexagon_protos.h +5399 -0
- package/include/ia32intrin.h +863 -0
- package/include/immintrin.h +595 -0
- package/include/intrin.h +491 -0
- package/include/intrin0.h +256 -0
- package/include/inttypes.h +101 -0
- package/include/invpcidintrin.h +23 -0
- package/include/iso646.h +31 -0
- package/include/keylockerintrin.h +518 -0
- package/include/larchintrin.h +260 -0
- package/include/lasxintrin.h +3999 -0
- package/include/limits.h +133 -0
- package/include/llvm_libc_wrappers/assert.h +32 -0
- package/include/llvm_libc_wrappers/ctype.h +28 -0
- package/include/llvm_libc_wrappers/inttypes.h +32 -0
- package/include/llvm_libc_wrappers/stdio.h +52 -0
- package/include/llvm_libc_wrappers/stdlib.h +32 -0
- package/include/llvm_libc_wrappers/string.h +28 -0
- package/include/llvm_libc_wrappers/time.h +28 -0
- package/include/llvm_offload_wrappers/__llvm_offload.h +31 -0
- package/include/llvm_offload_wrappers/__llvm_offload_device.h +10 -0
- package/include/llvm_offload_wrappers/__llvm_offload_host.h +15 -0
- package/include/lsxintrin.h +3752 -0
- package/include/lwpintrin.h +136 -0
- package/include/lzcntintrin.h +109 -0
- package/include/mm3dnow.h +22 -0
- package/include/mm_malloc.h +67 -0
- package/include/mmintrin.h +1541 -0
- package/include/module.modulemap +360 -0
- package/include/movdirintrin.h +49 -0
- package/include/movrs_avx10_2_512intrin.h +98 -0
- package/include/movrs_avx10_2intrin.h +174 -0
- package/include/movrsintrin.h +59 -0
- package/include/msa.h +573 -0
- package/include/mwaitxintrin.h +62 -0
- package/include/nmmintrin.h +20 -0
- package/include/nvptxintrin.h +219 -0
- package/include/opencl-c-base.h +758 -0
- package/include/opencl-c.h +18676 -0
- package/include/openmp_wrappers/__clang_openmp_device_functions.h +104 -0
- package/include/openmp_wrappers/cmath +132 -0
- package/include/openmp_wrappers/complex +55 -0
- package/include/openmp_wrappers/complex.h +35 -0
- package/include/openmp_wrappers/complex_cmath.h +393 -0
- package/include/openmp_wrappers/math.h +61 -0
- package/include/openmp_wrappers/new +48 -0
- package/include/pconfigintrin.h +40 -0
- package/include/pkuintrin.h +34 -0
- package/include/pmmintrin.h +302 -0
- package/include/popcntintrin.h +59 -0
- package/include/ppc_wrappers/bmi2intrin.h +134 -0
- package/include/ppc_wrappers/bmiintrin.h +165 -0
- package/include/ppc_wrappers/emmintrin.h +2269 -0
- package/include/ppc_wrappers/immintrin.h +27 -0
- package/include/ppc_wrappers/mm_malloc.h +45 -0
- package/include/ppc_wrappers/mmintrin.h +1453 -0
- package/include/ppc_wrappers/nmmintrin.h +26 -0
- package/include/ppc_wrappers/pmmintrin.h +145 -0
- package/include/ppc_wrappers/smmintrin.h +683 -0
- package/include/ppc_wrappers/tmmintrin.h +453 -0
- package/include/ppc_wrappers/x86gprintrin.h +17 -0
- package/include/ppc_wrappers/x86intrin.h +28 -0
- package/include/ppc_wrappers/xmmintrin.h +1827 -0
- package/include/prfchiintrin.h +61 -0
- package/include/prfchwintrin.h +57 -0
- package/include/profile/InstrProfData.inc +1001 -0
- package/include/profile/instr_prof_interface.h +88 -0
- package/include/ptrauth.h +407 -0
- package/include/ptwriteintrin.h +37 -0
- package/include/raointintrin.h +203 -0
- package/include/rdpruintrin.h +57 -0
- package/include/rdseedintrin.h +105 -0
- package/include/riscv_bitmanip.h +195 -0
- package/include/riscv_corev_alu.h +128 -0
- package/include/riscv_crypto.h +170 -0
- package/include/riscv_mips.h +34 -0
- package/include/riscv_nds.h +89 -0
- package/include/riscv_ntlh.h +26 -0
- package/include/riscv_vector.h +422 -0
- package/include/rtmintrin.h +45 -0
- package/include/s390intrin.h +25 -0
- package/include/sanitizer/allocator_interface.h +106 -0
- package/include/sanitizer/asan_interface.h +348 -0
- package/include/sanitizer/common_interface_defs.h +544 -0
- package/include/sanitizer/coverage_interface.h +36 -0
- package/include/sanitizer/dfsan_interface.h +220 -0
- package/include/sanitizer/hwasan_interface.h +109 -0
- package/include/sanitizer/linux_syscall_hooks.h +3112 -0
- package/include/sanitizer/lsan_interface.h +89 -0
- package/include/sanitizer/msan_interface.h +135 -0
- package/include/sanitizer/netbsd_syscall_hooks.h +5005 -0
- package/include/sanitizer/rtsan_interface.h +75 -0
- package/include/sanitizer/scudo_interface.h +38 -0
- package/include/sanitizer/tsan_interface.h +316 -0
- package/include/sanitizer/tsan_interface_atomic.h +223 -0
- package/include/sanitizer/ubsan_interface.h +34 -0
- package/include/serializeintrin.h +30 -0
- package/include/sgxintrin.h +60 -0
- package/include/sha512intrin.h +200 -0
- package/include/shaintrin.h +190 -0
- package/include/sifive_vector.h +174 -0
- package/include/sm3intrin.h +238 -0
- package/include/sm4evexintrin.h +32 -0
- package/include/sm4intrin.h +269 -0
- package/include/smmintrin.h +2352 -0
- package/include/spirvintrin.h +194 -0
- package/include/stdalign.h +24 -0
- package/include/stdarg.h +75 -0
- package/include/stdatomic.h +204 -0
- package/include/stdbool.h +39 -0
- package/include/stdckdint.h +42 -0
- package/include/stdcountof.h +15 -0
- package/include/stddef.h +139 -0
- package/include/stddefer.h +19 -0
- package/include/stdint.h +844 -0
- package/include/stdnoreturn.h +35 -0
- package/include/tbmintrin.h +128 -0
- package/include/tgmath.h +1368 -0
- package/include/tmmintrin.h +779 -0
- package/include/tsxldtrkintrin.h +56 -0
- package/include/uintrintrin.h +157 -0
- package/include/unwind.h +332 -0
- package/include/usermsrintrin.h +51 -0
- package/include/vadefs.h +51 -0
- package/include/vaesintrin.h +86 -0
- package/include/varargs.h +16 -0
- package/include/vecintrin.h +12868 -0
- package/include/velintrin.h +71 -0
- package/include/velintrin_approx.h +120 -0
- package/include/velintrin_gen.h +1257 -0
- package/include/vpclmulqdqintrin.h +30 -0
- package/include/waitpkgintrin.h +42 -0
- package/include/wasm_simd128.h +2143 -0
- package/include/wbnoinvdintrin.h +24 -0
- package/include/wmmintrin.h +23 -0
- package/include/x86gprintrin.h +49 -0
- package/include/x86intrin.h +35 -0
- package/include/xmmintrin.h +3175 -0
- package/include/xopintrin.h +780 -0
- package/include/xsavecintrin.h +84 -0
- package/include/xsaveintrin.h +63 -0
- package/include/xsaveoptintrin.h +34 -0
- package/include/xsavesintrin.h +44 -0
- package/include/xtestintrin.h +27 -0
- package/include/yvals_core.h +25 -0
- package/include/zos_wrappers/builtins.h +18 -0
- package/index.js +5 -0
- package/lib/darwin/libclang_rt.asan_abi_ios.a +0 -0
- package/lib/darwin/libclang_rt.asan_abi_iossim.a +0 -0
- package/lib/darwin/libclang_rt.asan_abi_osx.a +0 -0
- package/lib/darwin/libclang_rt.asan_ios_dynamic.dylib +0 -0
- package/lib/darwin/libclang_rt.asan_iossim_dynamic.dylib +0 -0
- package/lib/darwin/libclang_rt.asan_osx_dynamic.dylib +0 -0
- package/lib/darwin/libclang_rt.cc_kext.a +0 -0
- package/lib/darwin/libclang_rt.cc_kext_ios.a +0 -0
- package/lib/darwin/libclang_rt.fuzzer_interceptors_ios.a +0 -0
- package/lib/darwin/libclang_rt.fuzzer_interceptors_iossim.a +0 -0
- package/lib/darwin/libclang_rt.fuzzer_interceptors_osx.a +0 -0
- package/lib/darwin/libclang_rt.fuzzer_ios.a +0 -0
- package/lib/darwin/libclang_rt.fuzzer_iossim.a +0 -0
- package/lib/darwin/libclang_rt.fuzzer_no_main_ios.a +0 -0
- package/lib/darwin/libclang_rt.fuzzer_no_main_iossim.a +0 -0
- package/lib/darwin/libclang_rt.fuzzer_no_main_osx.a +0 -0
- package/lib/darwin/libclang_rt.fuzzer_osx.a +0 -0
- package/lib/darwin/libclang_rt.ios.a +0 -0
- package/lib/darwin/libclang_rt.iossim.a +0 -0
- package/lib/darwin/libclang_rt.lsan_ios_dynamic.dylib +0 -0
- package/lib/darwin/libclang_rt.lsan_iossim_dynamic.dylib +0 -0
- package/lib/darwin/libclang_rt.lsan_osx_dynamic.dylib +0 -0
- package/lib/darwin/libclang_rt.osx.a +0 -0
- package/lib/darwin/libclang_rt.profile_ios.a +0 -0
- package/lib/darwin/libclang_rt.profile_iossim.a +0 -0
- package/lib/darwin/libclang_rt.profile_osx.a +0 -0
- package/lib/darwin/libclang_rt.rtsan_ios_dynamic.dylib +0 -0
- package/lib/darwin/libclang_rt.rtsan_iossim_dynamic.dylib +0 -0
- package/lib/darwin/libclang_rt.rtsan_osx_dynamic.dylib +0 -0
- package/lib/darwin/libclang_rt.stats_client_ios.a +0 -0
- package/lib/darwin/libclang_rt.stats_client_iossim.a +0 -0
- package/lib/darwin/libclang_rt.stats_client_osx.a +0 -0
- package/lib/darwin/libclang_rt.stats_ios_dynamic.dylib +0 -0
- package/lib/darwin/libclang_rt.stats_iossim_dynamic.dylib +0 -0
- package/lib/darwin/libclang_rt.stats_osx_dynamic.dylib +0 -0
- package/lib/darwin/libclang_rt.tsan_ios_dynamic.dylib +0 -0
- package/lib/darwin/libclang_rt.tsan_iossim_dynamic.dylib +0 -0
- package/lib/darwin/libclang_rt.tsan_osx_dynamic.dylib +0 -0
- package/lib/darwin/libclang_rt.tysan_ios_dynamic.dylib +0 -0
- package/lib/darwin/libclang_rt.tysan_iossim_dynamic.dylib +0 -0
- package/lib/darwin/libclang_rt.tysan_osx_dynamic.dylib +0 -0
- package/lib/darwin/libclang_rt.ubsan_ios_dynamic.dylib +0 -0
- package/lib/darwin/libclang_rt.ubsan_iossim_dynamic.dylib +0 -0
- package/lib/darwin/libclang_rt.ubsan_minimal_ios.a +0 -0
- package/lib/darwin/libclang_rt.ubsan_minimal_ios_dynamic.dylib +0 -0
- package/lib/darwin/libclang_rt.ubsan_minimal_iossim.a +0 -0
- package/lib/darwin/libclang_rt.ubsan_minimal_iossim_dynamic.dylib +0 -0
- package/lib/darwin/libclang_rt.ubsan_minimal_osx.a +0 -0
- package/lib/darwin/libclang_rt.ubsan_minimal_osx_dynamic.dylib +0 -0
- package/lib/darwin/libclang_rt.ubsan_osx_dynamic.dylib +0 -0
- package/package.json +40 -1
- package/share/asan_ignorelist.txt +14 -0
- package/share/cfi_ignorelist.txt +17 -0
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
/*===--------- amxcomplexintrin.h - AMXCOMPLEX 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 <amxcomplexintrin.h> directly; include <immintrin.h> instead."
|
|
12
|
+
#endif // __IMMINTRIN_H
|
|
13
|
+
|
|
14
|
+
#ifndef __AMX_COMPLEXINTRIN_H
|
|
15
|
+
#define __AMX_COMPLEXINTRIN_H
|
|
16
|
+
#ifdef __x86_64__
|
|
17
|
+
|
|
18
|
+
#define __DEFAULT_FN_ATTRS_COMPLEX \
|
|
19
|
+
__attribute__((__always_inline__, __nodebug__, __target__("amx-complex")))
|
|
20
|
+
|
|
21
|
+
/// Perform matrix multiplication of two tiles containing complex elements and
|
|
22
|
+
/// accumulate the results into a packed single precision tile. Each dword
|
|
23
|
+
/// element in input tiles \a a and \a b is interpreted as a complex number
|
|
24
|
+
/// with FP16 real part and FP16 imaginary part.
|
|
25
|
+
/// Calculates the imaginary part of the result. For each possible combination
|
|
26
|
+
/// of (row of \a a, column of \a b), it performs a set of multiplication
|
|
27
|
+
/// and accumulations on all corresponding complex numbers (one from \a a
|
|
28
|
+
/// and one from \a b). The imaginary part of the \a a element is multiplied
|
|
29
|
+
/// with the real part of the corresponding \a b element, and the real part
|
|
30
|
+
/// of the \a a element is multiplied with the imaginary part of the
|
|
31
|
+
/// corresponding \a b elements. The two accumulated results are added, and
|
|
32
|
+
/// then accumulated into the corresponding row and column of \a dst.
|
|
33
|
+
///
|
|
34
|
+
/// \headerfile <x86intrin.h>
|
|
35
|
+
///
|
|
36
|
+
/// \code
|
|
37
|
+
/// void _tile_cmmimfp16ps(__tile dst, __tile a, __tile b);
|
|
38
|
+
/// \endcode
|
|
39
|
+
///
|
|
40
|
+
/// \code{.operation}
|
|
41
|
+
/// FOR m := 0 TO dst.rows - 1
|
|
42
|
+
/// tmp := dst.row[m]
|
|
43
|
+
/// FOR k := 0 TO (a.colsb / 4) - 1
|
|
44
|
+
/// FOR n := 0 TO (dst.colsb / 4) - 1
|
|
45
|
+
/// tmp.fp32[n] += FP32(a.row[m].fp16[2*k+0]) * FP32(b.row[k].fp16[2*n+1])
|
|
46
|
+
/// tmp.fp32[n] += FP32(a.row[m].fp16[2*k+1]) * FP32(b.row[k].fp16[2*n+0])
|
|
47
|
+
/// ENDFOR
|
|
48
|
+
/// ENDFOR
|
|
49
|
+
/// write_row_and_zero(dst, m, tmp, dst.colsb)
|
|
50
|
+
/// ENDFOR
|
|
51
|
+
/// zero_upper_rows(dst, dst.rows)
|
|
52
|
+
/// zero_tileconfig_start()
|
|
53
|
+
/// \endcode
|
|
54
|
+
///
|
|
55
|
+
/// This intrinsic corresponds to the \c TCMMIMFP16PS instruction.
|
|
56
|
+
///
|
|
57
|
+
/// \param dst
|
|
58
|
+
/// The destination tile. Max size is 1024 Bytes.
|
|
59
|
+
/// \param a
|
|
60
|
+
/// The 1st source tile. Max size is 1024 Bytes.
|
|
61
|
+
/// \param b
|
|
62
|
+
/// The 2nd source tile. Max size is 1024 Bytes.
|
|
63
|
+
#define _tile_cmmimfp16ps(dst, a, b) __builtin_ia32_tcmmimfp16ps(dst, a, b)
|
|
64
|
+
|
|
65
|
+
/// Perform matrix multiplication of two tiles containing complex elements and
|
|
66
|
+
/// accumulate the results into a packed single precision tile. Each dword
|
|
67
|
+
/// element in input tiles \a a and \a b is interpreted as a complex number
|
|
68
|
+
/// with FP16 real part and FP16 imaginary part.
|
|
69
|
+
/// Calculates the real part of the result. For each possible combination
|
|
70
|
+
/// of (row of \a a, column of \a b), it performs a set of multiplication
|
|
71
|
+
/// and accumulations on all corresponding complex numbers (one from \a a
|
|
72
|
+
/// and one from \a b). The real part of the \a a element is multiplied
|
|
73
|
+
/// with the real part of the corresponding \a b element, and the negated
|
|
74
|
+
/// imaginary part of the \a a element is multiplied with the imaginary
|
|
75
|
+
/// part of the corresponding \a b elements. The two accumulated results
|
|
76
|
+
/// are added, and then accumulated into the corresponding row and column
|
|
77
|
+
/// of \a dst.
|
|
78
|
+
///
|
|
79
|
+
/// \headerfile <x86intrin.h>
|
|
80
|
+
///
|
|
81
|
+
/// \code
|
|
82
|
+
/// void _tile_cmmrlfp16ps(__tile dst, __tile a, __tile b);
|
|
83
|
+
/// \endcode
|
|
84
|
+
///
|
|
85
|
+
/// \code{.operation}
|
|
86
|
+
/// FOR m := 0 TO dst.rows - 1
|
|
87
|
+
/// tmp := dst.row[m]
|
|
88
|
+
/// FOR k := 0 TO (a.colsb / 4) - 1
|
|
89
|
+
/// FOR n := 0 TO (dst.colsb / 4) - 1
|
|
90
|
+
/// tmp.fp32[n] += FP32(a.row[m].fp16[2*k+0]) * FP32(b.row[k].fp16[2*n+0])
|
|
91
|
+
/// tmp.fp32[n] += FP32(-a.row[m].fp16[2*k+1]) * FP32(b.row[k].fp16[2*n+1])
|
|
92
|
+
/// ENDFOR
|
|
93
|
+
/// ENDFOR
|
|
94
|
+
/// write_row_and_zero(dst, m, tmp, dst.colsb)
|
|
95
|
+
/// ENDFOR
|
|
96
|
+
/// zero_upper_rows(dst, dst.rows)
|
|
97
|
+
/// zero_tileconfig_start()
|
|
98
|
+
/// \endcode
|
|
99
|
+
///
|
|
100
|
+
/// This intrinsic corresponds to the \c TCMMIMFP16PS instruction.
|
|
101
|
+
///
|
|
102
|
+
/// \param dst
|
|
103
|
+
/// The destination tile. Max size is 1024 Bytes.
|
|
104
|
+
/// \param a
|
|
105
|
+
/// The 1st source tile. Max size is 1024 Bytes.
|
|
106
|
+
/// \param b
|
|
107
|
+
/// The 2nd source tile. Max size is 1024 Bytes.
|
|
108
|
+
#define _tile_cmmrlfp16ps(dst, a, b) __builtin_ia32_tcmmrlfp16ps(dst, a, b)
|
|
109
|
+
|
|
110
|
+
static __inline__ _tile1024i __DEFAULT_FN_ATTRS_COMPLEX
|
|
111
|
+
_tile_cmmimfp16ps_internal(unsigned short m, unsigned short n, unsigned short k,
|
|
112
|
+
_tile1024i dst, _tile1024i src1, _tile1024i src2) {
|
|
113
|
+
return __builtin_ia32_tcmmimfp16ps_internal(m, n, k, dst, src1, src2);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
static __inline__ _tile1024i __DEFAULT_FN_ATTRS_COMPLEX
|
|
117
|
+
_tile_cmmrlfp16ps_internal(unsigned short m, unsigned short n, unsigned short k,
|
|
118
|
+
_tile1024i dst, _tile1024i src1, _tile1024i src2) {
|
|
119
|
+
return __builtin_ia32_tcmmrlfp16ps_internal(m, n, k, dst, src1, src2);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/// Perform matrix multiplication of two tiles containing complex elements and
|
|
123
|
+
/// accumulate the results into a packed single precision tile. Each dword
|
|
124
|
+
/// element in input tiles src0 and src1 is interpreted as a complex number with
|
|
125
|
+
/// FP16 real part and FP16 imaginary part.
|
|
126
|
+
/// This function calculates the imaginary part of the result.
|
|
127
|
+
///
|
|
128
|
+
/// \headerfile <immintrin.h>
|
|
129
|
+
///
|
|
130
|
+
/// This intrinsic corresponds to the <c> TCMMIMFP16PS </c> instruction.
|
|
131
|
+
///
|
|
132
|
+
/// \param dst
|
|
133
|
+
/// The destination tile. Max size is 1024 Bytes.
|
|
134
|
+
/// \param src0
|
|
135
|
+
/// The 1st source tile. Max size is 1024 Bytes.
|
|
136
|
+
/// \param src1
|
|
137
|
+
/// The 2nd source tile. Max size is 1024 Bytes.
|
|
138
|
+
static __inline__ void __DEFAULT_FN_ATTRS_COMPLEX
|
|
139
|
+
__tile_cmmimfp16ps(__tile1024i *dst, __tile1024i src0, __tile1024i src1) {
|
|
140
|
+
dst->tile = _tile_cmmimfp16ps_internal(src0.row, src1.col, src0.col,
|
|
141
|
+
dst->tile, src0.tile, src1.tile);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
/// Perform matrix multiplication of two tiles containing complex elements and
|
|
145
|
+
/// accumulate the results into a packed single precision tile. Each dword
|
|
146
|
+
/// element in input tiles src0 and src1 is interpreted as a complex number with
|
|
147
|
+
/// FP16 real part and FP16 imaginary part.
|
|
148
|
+
/// This function calculates the real part of the result.
|
|
149
|
+
///
|
|
150
|
+
/// \headerfile <immintrin.h>
|
|
151
|
+
///
|
|
152
|
+
/// This intrinsic corresponds to the <c> TCMMRLFP16PS </c> instruction.
|
|
153
|
+
///
|
|
154
|
+
/// \param dst
|
|
155
|
+
/// The destination tile. Max size is 1024 Bytes.
|
|
156
|
+
/// \param src0
|
|
157
|
+
/// The 1st source tile. Max size is 1024 Bytes.
|
|
158
|
+
/// \param src1
|
|
159
|
+
/// The 2nd source tile. Max size is 1024 Bytes.
|
|
160
|
+
static __inline__ void __DEFAULT_FN_ATTRS_COMPLEX
|
|
161
|
+
__tile_cmmrlfp16ps(__tile1024i *dst, __tile1024i src0, __tile1024i src1) {
|
|
162
|
+
dst->tile = _tile_cmmrlfp16ps_internal(src0.row, src1.col, src0.col,
|
|
163
|
+
dst->tile, src0.tile, src1.tile);
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
#endif // __x86_64__
|
|
167
|
+
#endif // __AMX_COMPLEXINTRIN_H
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
/*===------------- amxfp16intrin.h - AMX_FP16 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 <amxfp16intrin.h> directly; use <immintrin.h> instead."
|
|
12
|
+
#endif /* __IMMINTRIN_H */
|
|
13
|
+
|
|
14
|
+
#ifndef __AMX_FP16INTRIN_H
|
|
15
|
+
#define __AMX_FP16INTRIN_H
|
|
16
|
+
#ifdef __x86_64__
|
|
17
|
+
|
|
18
|
+
/* Define the default attributes for the functions in this file. */
|
|
19
|
+
#define __DEFAULT_FN_ATTRS \
|
|
20
|
+
__attribute__((__always_inline__, __nodebug__, __target__("amx-fp16")))
|
|
21
|
+
|
|
22
|
+
/// Compute dot-product of FP16 (16-bit) floating-point pairs in tiles \a a
|
|
23
|
+
/// and \a b, accumulating the intermediate single-precision (32-bit)
|
|
24
|
+
/// floating-point elements with elements in \a dst, and store the 32-bit
|
|
25
|
+
/// result back to tile \a dst.
|
|
26
|
+
///
|
|
27
|
+
/// \headerfile <immintrin.h>
|
|
28
|
+
///
|
|
29
|
+
/// \code
|
|
30
|
+
/// void _tile_dpfp16ps (__tile dst, __tile a, __tile b)
|
|
31
|
+
/// \endcode
|
|
32
|
+
///
|
|
33
|
+
/// \code{.operation}
|
|
34
|
+
/// FOR m := 0 TO dst.rows - 1
|
|
35
|
+
/// tmp := dst.row[m]
|
|
36
|
+
/// FOR k := 0 TO (a.colsb / 4) - 1
|
|
37
|
+
/// FOR n := 0 TO (dst.colsb / 4) - 1
|
|
38
|
+
/// tmp.fp32[n] += FP32(a.row[m].fp16[2*k+0]) *
|
|
39
|
+
/// FP32(b.row[k].fp16[2*n+0])
|
|
40
|
+
/// tmp.fp32[n] += FP32(a.row[m].fp16[2*k+1]) *
|
|
41
|
+
/// FP32(b.row[k].fp16[2*n+1])
|
|
42
|
+
/// ENDFOR
|
|
43
|
+
/// ENDFOR
|
|
44
|
+
/// write_row_and_zero(dst, m, tmp, dst.colsb)
|
|
45
|
+
/// ENDFOR
|
|
46
|
+
/// zero_upper_rows(dst, dst.rows)
|
|
47
|
+
/// zero_tileconfig_start()
|
|
48
|
+
/// \endcode
|
|
49
|
+
///
|
|
50
|
+
/// This intrinsic corresponds to the \c TDPFP16PS instruction.
|
|
51
|
+
///
|
|
52
|
+
/// \param dst
|
|
53
|
+
/// The destination tile. Max size is 1024 Bytes.
|
|
54
|
+
/// \param a
|
|
55
|
+
/// The 1st source tile. Max size is 1024 Bytes.
|
|
56
|
+
/// \param b
|
|
57
|
+
/// The 2nd source tile. Max size is 1024 Bytes.
|
|
58
|
+
#define _tile_dpfp16ps(dst, a, b) \
|
|
59
|
+
__builtin_ia32_tdpfp16ps(dst, a, b)
|
|
60
|
+
|
|
61
|
+
/// This is internal intrinsic. C/C++ user should avoid calling it directly.
|
|
62
|
+
static __inline__ _tile1024i __DEFAULT_FN_ATTRS
|
|
63
|
+
_tile_dpfp16ps_internal(unsigned short m, unsigned short n, unsigned short k,
|
|
64
|
+
_tile1024i dst, _tile1024i src1, _tile1024i src2) {
|
|
65
|
+
return __builtin_ia32_tdpfp16ps_internal(m, n, k, dst, src1, src2);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/// Compute dot-product of FP16 (16-bit) floating-point pairs in tiles src0 and
|
|
69
|
+
/// src1, accumulating the intermediate single-precision (32-bit) floating-point
|
|
70
|
+
/// elements with elements in "dst", and store the 32-bit result back to tile
|
|
71
|
+
/// "dst".
|
|
72
|
+
///
|
|
73
|
+
/// \headerfile <immintrin.h>
|
|
74
|
+
///
|
|
75
|
+
/// This intrinsic corresponds to the <c> TDPFP16PS </c> instruction.
|
|
76
|
+
///
|
|
77
|
+
/// \param dst
|
|
78
|
+
/// The destination tile. Max size is 1024 Bytes.
|
|
79
|
+
/// \param src0
|
|
80
|
+
/// The 1st source tile. Max size is 1024 Bytes.
|
|
81
|
+
/// \param src1
|
|
82
|
+
/// The 2nd source tile. Max size is 1024 Bytes.
|
|
83
|
+
__DEFAULT_FN_ATTRS
|
|
84
|
+
static __inline__ void __tile_dpfp16ps(__tile1024i *dst, __tile1024i src0,
|
|
85
|
+
__tile1024i src1) {
|
|
86
|
+
dst->tile = _tile_dpfp16ps_internal(src0.row, src1.col, src0.col, dst->tile,
|
|
87
|
+
src0.tile, src1.tile);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
#undef __DEFAULT_FN_ATTRS
|
|
91
|
+
|
|
92
|
+
#endif /* __x86_64__ */
|
|
93
|
+
#endif /* __AMX_FP16INTRIN_H */
|
|
@@ -0,0 +1,230 @@
|
|
|
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
|
+
#define __DEFAULT_FN_ATTRS_FP8 \
|
|
19
|
+
__attribute__((__always_inline__, __nodebug__, __target__("amx-fp8")))
|
|
20
|
+
|
|
21
|
+
static __inline__ _tile1024i __DEFAULT_FN_ATTRS_FP8
|
|
22
|
+
_tile_dpbf8ps_internal(unsigned short m, unsigned short n, unsigned short k,
|
|
23
|
+
_tile1024i dst, _tile1024i src1, _tile1024i src2) {
|
|
24
|
+
return __builtin_ia32_tdpbf8ps_internal(m, n, k, dst, src1, src2);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/// Perform the dot product of a BF8 value \a src1 by a BF8 value \a src2
|
|
28
|
+
/// accumulating into a Single Precision (FP32) source/dest \a dst.
|
|
29
|
+
///
|
|
30
|
+
/// \headerfile <immintrin.h>
|
|
31
|
+
///
|
|
32
|
+
/// \code
|
|
33
|
+
/// void __tile_dpbf8ps (__tile1024i *dst, __tile1024i src1, __tile1024i src2)
|
|
34
|
+
/// \endcode
|
|
35
|
+
///
|
|
36
|
+
/// \code{.operation}
|
|
37
|
+
/// FOR m := 0 TO dst.rows - 1
|
|
38
|
+
/// temp1[(dst.colsb / 4 - 1) : 0] = 0
|
|
39
|
+
/// FOR k := 0 TO src1.colsb / 4 - 1
|
|
40
|
+
/// FOR n := 0 TO dst.colsb / 4 - 1
|
|
41
|
+
/// temp1[n] +=
|
|
42
|
+
/// INT64(src1.row[m].float8[4*k+0]) * INT64(src2.row[k].float8[4*n+0])
|
|
43
|
+
/// + INT64(src1.row[m].float8[4*k+1]) * INT64(src2.row[k].float8[4*n+1])
|
|
44
|
+
/// + INT64(src1.row[m].float8[4*k+2]) * INT64(src2.row[k].float8[4*n+2])
|
|
45
|
+
/// + INT64(src1.row[m].float8[4*k+3]) * INT64(src2.row[k].float8[4*n+3])
|
|
46
|
+
/// ENDFOR
|
|
47
|
+
/// ENDFOR
|
|
48
|
+
/// FOR n := 0 TO dst.colsb / 4 - 1
|
|
49
|
+
/// tmp.row[m].fp32[n] = dst.row[m].fp32[n] + FP32(temp1[n])
|
|
50
|
+
/// ENDFOR
|
|
51
|
+
/// write_row_and_zero(dst, m, tmp, dst.colsb)
|
|
52
|
+
/// zero_upper_rows(dst, dst.rows)
|
|
53
|
+
/// zero_tileconfig_start()
|
|
54
|
+
/// \endcode
|
|
55
|
+
///
|
|
56
|
+
/// This intrinsic corresponds to the \c TDPBF8PS instruction.
|
|
57
|
+
///
|
|
58
|
+
/// \param dst
|
|
59
|
+
/// The destination tile. Max size is 1024 Bytes.
|
|
60
|
+
/// \param src1
|
|
61
|
+
/// The 1st source tile. Max size is 1024 Bytes.
|
|
62
|
+
/// \param src2
|
|
63
|
+
/// The 2nd source tile. Max size is 1024 Bytes.
|
|
64
|
+
__DEFAULT_FN_ATTRS_FP8 static void
|
|
65
|
+
__tile_dpbf8ps(__tile1024i *dst, __tile1024i src1, __tile1024i src2) {
|
|
66
|
+
dst->tile = _tile_dpbf8ps_internal(src1.row, src2.col, src1.col, dst->tile,
|
|
67
|
+
src1.tile, src2.tile);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
static __inline__ _tile1024i __DEFAULT_FN_ATTRS_FP8
|
|
71
|
+
_tile_dpbhf8ps_internal(unsigned short m, unsigned short n, unsigned short k,
|
|
72
|
+
_tile1024i dst, _tile1024i src1, _tile1024i src2) {
|
|
73
|
+
return __builtin_ia32_tdpbhf8ps_internal(m, n, k, dst, src1, src2);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/// Perform the dot product of a BF8 value \a src1 by an HF8 value \a src2
|
|
77
|
+
/// accumulating into a Single Precision (FP32) source/dest \a dst.
|
|
78
|
+
///
|
|
79
|
+
/// \headerfile <immintrin.h>
|
|
80
|
+
///
|
|
81
|
+
/// \code
|
|
82
|
+
/// void __tile_dpbhf8ps (__tile1024i dst, __tile1024i src1, __tile1024i src2)
|
|
83
|
+
/// \endcode
|
|
84
|
+
///
|
|
85
|
+
/// \code{.operation}
|
|
86
|
+
/// FOR m := 0 TO dst.rows - 1
|
|
87
|
+
/// temp1[(dst.colsb / 4 - 1) : 0] = 0
|
|
88
|
+
/// FOR k := 0 TO src1.colsb / 4 - 1
|
|
89
|
+
/// FOR n := 0 TO dst.colsb / 4 - 1
|
|
90
|
+
/// temp1[n] +=
|
|
91
|
+
/// INT64(src1.row[m].float8[4*k+0]) * INT64(src2.row[k].float8[4*n+0])
|
|
92
|
+
/// + INT64(src1.row[m].float8[4*k+1]) * INT64(src2.row[k].float8[4*n+1])
|
|
93
|
+
/// + INT64(src1.row[m].float8[4*k+2]) * INT64(src2.row[k].float8[4*n+2])
|
|
94
|
+
/// + INT64(src1.row[m].float8[4*k+3]) * INT64(src2.row[k].float8[4*n+3])
|
|
95
|
+
/// ENDFOR
|
|
96
|
+
/// ENDFOR
|
|
97
|
+
/// FOR n := 0 TO dst.colsb / 4 - 1
|
|
98
|
+
/// tmp.row[m].fp32[n] = dst.row[m].fp32[n] + FP32(temp1[n])
|
|
99
|
+
/// ENDFOR
|
|
100
|
+
/// write_row_and_zero(dst, m, tmp, dst.colsb)
|
|
101
|
+
/// zero_upper_rows(dst, dst.rows)
|
|
102
|
+
/// zero_tileconfig_start()
|
|
103
|
+
/// \endcode
|
|
104
|
+
///
|
|
105
|
+
/// This intrinsic corresponds to the \c TDPBHF8PS instruction.
|
|
106
|
+
///
|
|
107
|
+
/// \param dst
|
|
108
|
+
/// The destination tile. Max size is 1024 Bytes.
|
|
109
|
+
/// \param src1
|
|
110
|
+
/// The 1st source tile. Max size is 1024 Bytes.
|
|
111
|
+
/// \param src2
|
|
112
|
+
/// The 2nd source tile. Max size is 1024 Bytes.
|
|
113
|
+
__DEFAULT_FN_ATTRS_FP8 static void
|
|
114
|
+
__tile_dpbhf8ps(__tile1024i *dst, __tile1024i src1, __tile1024i src2) {
|
|
115
|
+
dst->tile = _tile_dpbhf8ps_internal(src1.row, src2.col, src1.col, dst->tile,
|
|
116
|
+
src1.tile, src2.tile);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
static __inline__ _tile1024i __DEFAULT_FN_ATTRS_FP8
|
|
120
|
+
_tile_dphbf8ps_internal(unsigned short m, unsigned short n, unsigned short k,
|
|
121
|
+
_tile1024i dst, _tile1024i src1, _tile1024i src2) {
|
|
122
|
+
return __builtin_ia32_tdphbf8ps_internal(m, n, k, dst, src1, src2);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/// Perform the dot product of an HF8 value \a src1 by a BF8 value \a src2
|
|
126
|
+
/// accumulating into a Single Precision (FP32) source/dest \a dst.
|
|
127
|
+
///
|
|
128
|
+
/// \headerfile <immintrin.h>
|
|
129
|
+
///
|
|
130
|
+
/// \code
|
|
131
|
+
/// void __tile_dphbf8ps (__tile1024i dst, __tile1024i src1, __tile1024i src2)
|
|
132
|
+
/// \endcode
|
|
133
|
+
///
|
|
134
|
+
/// \code{.operation}
|
|
135
|
+
/// FOR m := 0 TO dst.rows - 1
|
|
136
|
+
/// temp1[(dst.colsb / 4 - 1) : 0] = 0
|
|
137
|
+
/// FOR k := 0 TO src1.colsb / 4 - 1
|
|
138
|
+
/// FOR n := 0 TO dst.colsb / 4 - 1
|
|
139
|
+
/// temp1[n] +=
|
|
140
|
+
/// INT64(src1.row[m].float8[4*k+0]) * INT64(src2.row[k].float8[4*n+0])
|
|
141
|
+
/// + INT64(src1.row[m].float8[4*k+1]) * INT64(src2.row[k].float8[4*n+1])
|
|
142
|
+
/// + INT64(src1.row[m].float8[4*k+2]) * INT64(src2.row[k].float8[4*n+2])
|
|
143
|
+
/// + INT64(src1.row[m].float8[4*k+3]) * INT64(src2.row[k].float8[4*n+3])
|
|
144
|
+
/// ENDFOR
|
|
145
|
+
/// ENDFOR
|
|
146
|
+
/// FOR n := 0 TO dst.colsb / 4 - 1
|
|
147
|
+
/// tmp.row[m].fp32[n] = dst.row[m].fp32[n] + FP32(temp1[n])
|
|
148
|
+
/// ENDFOR
|
|
149
|
+
/// write_row_and_zero(dst, m, tmp, dst.colsb)
|
|
150
|
+
/// zero_upper_rows(dst, dst.rows)
|
|
151
|
+
/// zero_tileconfig_start()
|
|
152
|
+
/// \endcode
|
|
153
|
+
///
|
|
154
|
+
/// This intrinsic corresponds to the \c TDPHBF8PS instruction.
|
|
155
|
+
///
|
|
156
|
+
/// \param dst
|
|
157
|
+
/// The destination tile. Max size is 1024 Bytes.
|
|
158
|
+
/// \param src1
|
|
159
|
+
/// The 1st source tile. Max size is 1024 Bytes.
|
|
160
|
+
/// \param src2
|
|
161
|
+
/// The 2nd source tile. Max size is 1024 Bytes.
|
|
162
|
+
|
|
163
|
+
__DEFAULT_FN_ATTRS_FP8 static void
|
|
164
|
+
__tile_dphbf8ps(__tile1024i *dst, __tile1024i src1, __tile1024i src2) {
|
|
165
|
+
dst->tile = _tile_dphbf8ps_internal(src1.row, src2.col, src1.col, dst->tile,
|
|
166
|
+
src1.tile, src2.tile);
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
static __inline__ _tile1024i __DEFAULT_FN_ATTRS_FP8
|
|
170
|
+
_tile_dphf8ps_internal(unsigned short m, unsigned short n, unsigned short k,
|
|
171
|
+
_tile1024i dst, _tile1024i src1, _tile1024i src2) {
|
|
172
|
+
return __builtin_ia32_tdphf8ps_internal(m, n, k, dst, src1, src2);
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
/// Perform the dot product of an HF8 value \a src1 by an HF8 value \a src2
|
|
176
|
+
/// accumulating into a Single Precision (FP32) source/dest \a dst.
|
|
177
|
+
///
|
|
178
|
+
/// \headerfile <immintrin.h>
|
|
179
|
+
///
|
|
180
|
+
/// \code
|
|
181
|
+
/// void __tile_dphf8ps (__tile1024i dst, __tile1024i src1, __tile1024i src2)
|
|
182
|
+
/// \endcode
|
|
183
|
+
///
|
|
184
|
+
/// \code{.operation}
|
|
185
|
+
/// FOR m := 0 TO dst.rows - 1
|
|
186
|
+
/// temp1[(dst.colsb / 4 - 1) : 0] = 0
|
|
187
|
+
/// FOR k := 0 TO src1.colsb / 4 - 1
|
|
188
|
+
/// FOR n := 0 TO dst.colsb / 4 - 1
|
|
189
|
+
/// temp1[n] +=
|
|
190
|
+
/// INT64(src1.row[m].float8[4*k+0]) * INT64(src2.row[k].float8[4*n+0])
|
|
191
|
+
/// + INT64(src1.row[m].float8[4*k+1]) * INT64(src2.row[k].float8[4*n+1])
|
|
192
|
+
/// + INT64(src1.row[m].float8[4*k+2]) * INT64(src2.row[k].float8[4*n+2])
|
|
193
|
+
/// + INT64(src1.row[m].float8[4*k+3]) * INT64(src2.row[k].float8[4*n+3])
|
|
194
|
+
/// ENDFOR
|
|
195
|
+
/// ENDFOR
|
|
196
|
+
/// FOR n := 0 TO dst.colsb / 4 - 1
|
|
197
|
+
/// tmp.row[m].fp32[n] = dst.row[m].fp32[n] + FP32(temp1[n])
|
|
198
|
+
/// ENDFOR
|
|
199
|
+
/// write_row_and_zero(dst, m, tmp, dst.colsb)
|
|
200
|
+
/// zero_upper_rows(dst, dst.rows)
|
|
201
|
+
/// zero_tileconfig_start()
|
|
202
|
+
/// \endcode
|
|
203
|
+
///
|
|
204
|
+
/// This intrinsic corresponds to the \c TDPHF8PS instruction.
|
|
205
|
+
///
|
|
206
|
+
/// \param dst
|
|
207
|
+
/// The destination tile. Max size is 1024 Bytes.
|
|
208
|
+
/// \param src1
|
|
209
|
+
/// The 1st source tile. Max size is 1024 Bytes.
|
|
210
|
+
/// \param src2
|
|
211
|
+
/// The 2nd source tile. Max size is 1024 Bytes.
|
|
212
|
+
__DEFAULT_FN_ATTRS_FP8 static void
|
|
213
|
+
__tile_dphf8ps(__tile1024i *dst, __tile1024i src1, __tile1024i src2) {
|
|
214
|
+
dst->tile = _tile_dphf8ps_internal(src1.row, src2.col, src1.col, dst->tile,
|
|
215
|
+
src1.tile, src2.tile);
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
#define _tile_dpbf8ps(dst, src1, src2) \
|
|
219
|
+
__builtin_ia32_tdpbf8ps((dst), (src1), (src2))
|
|
220
|
+
#define _tile_dpbhf8ps(dst, src1, src2) \
|
|
221
|
+
__builtin_ia32_tdpbhf8ps((dst), (src1), (src2))
|
|
222
|
+
#define _tile_dphbf8ps(dst, src1, src2) \
|
|
223
|
+
__builtin_ia32_tdphbf8ps((dst), (src1), (src2))
|
|
224
|
+
#define _tile_dphf8ps(dst, src1, src2) \
|
|
225
|
+
__builtin_ia32_tdphf8ps((dst), (src1), (src2))
|
|
226
|
+
|
|
227
|
+
#undef __DEFAULT_FN_ATTRS_FP8
|
|
228
|
+
|
|
229
|
+
#endif /* __x86_64__ */
|
|
230
|
+
#endif /* __AMXFP8INTRIN_H */
|