diff --git a/sycl/include/CL/__spirv/spirv_ops.hpp b/sycl/include/CL/__spirv/spirv_ops.hpp index 90b5601304a29..7442fc83d4973 100644 --- a/sycl/include/CL/__spirv/spirv_ops.hpp +++ b/sycl/include/CL/__spirv/spirv_ops.hpp @@ -22,11 +22,20 @@ #endif #ifdef __SYCL_DEVICE_ONLY__ + +#if (SYCL_EXT_ONEAPI_MATRIX_VERSION > 1) +#define JOINT_MATRIX_INTEL(T, R, C, L, S, U) \ + __spv::__spirv_JointMatrixINTEL +#else +#define JOINT_MATRIX_INTEL(T, R, C, L, S, U) \ + __spv::__spirv_JointMatrixINTEL +#endif // SYCL_EXT_ONEAPI_MATRIX_VERSION + template -extern SYCL_EXTERNAL __spv::__spirv_JointMatrixINTEL * +extern SYCL_EXTERNAL JOINT_MATRIX_INTEL(T, R, C, L, S, U) * __spirv_JointMatrixLoadINTEL(T *Ptr, std::size_t Stride, __spv::MatrixLayout Layout = L, __spv::Scope::Flag Sc = S, int MemOperand = 0); @@ -36,7 +45,7 @@ template extern SYCL_EXTERNAL void __spirv_JointMatrixStoreINTEL( - T *Ptr, __spv::__spirv_JointMatrixINTEL *Object, + T *Ptr, JOINT_MATRIX_INTEL(T, R, C, L, S, U) *Object, std::size_t Stride, __spv::MatrixLayout Layout = L, __spv::Scope::Flag Sc = S, int MemOperand = 0); @@ -48,11 +57,11 @@ template -extern SYCL_EXTERNAL __spv::__spirv_JointMatrixINTEL * +extern SYCL_EXTERNAL JOINT_MATRIX_INTEL(T2, M, N, LC, S, UC) * __spirv_JointMatrixMadINTEL( - __spv::__spirv_JointMatrixINTEL *A, - __spv::__spirv_JointMatrixINTEL *B, - __spv::__spirv_JointMatrixINTEL *C, + JOINT_MATRIX_INTEL(T1, M, K, LA, S, UA) *A, + JOINT_MATRIX_INTEL(T1, K, N, LB, S, UB) *B, + JOINT_MATRIX_INTEL(T2, M, N, LC, S, UC) *C, __spv::Scope::Flag Sc = __spv::Scope::Flag::Subgroup); template -extern SYCL_EXTERNAL __spv::__spirv_JointMatrixINTEL * +extern SYCL_EXTERNAL JOINT_MATRIX_INTEL(T2, M, N, LC, S, UC) * __spirv_JointMatrixUUMadINTEL( - __spv::__spirv_JointMatrixINTEL *A, - __spv::__spirv_JointMatrixINTEL *B, - __spv::__spirv_JointMatrixINTEL *C, + JOINT_MATRIX_INTEL(T1, M, K, LA, S, UA) *A, + JOINT_MATRIX_INTEL(T2, K, N, LB, S, UB) *B, + JOINT_MATRIX_INTEL(T3, M, N, LC, S, UC) *C, __spv::Scope::Flag Sc = __spv::Scope::Flag::Subgroup); template -extern SYCL_EXTERNAL __spv::__spirv_JointMatrixINTEL * +extern SYCL_EXTERNAL JOINT_MATRIX_INTEL(T3, M, N, LC, S, UC) * __spirv_JointMatrixUSMadINTEL( - __spv::__spirv_JointMatrixINTEL *A, - __spv::__spirv_JointMatrixINTEL *B, - __spv::__spirv_JointMatrixINTEL *C, + JOINT_MATRIX_INTEL(T1, M, K, LA, S, UA) *A, + JOINT_MATRIX_INTEL(T2, K, N, LB, S, UB) *B, + JOINT_MATRIX_INTEL(T3, M, N, LC, S, UC) *C, __spv::Scope::Flag Sc = __spv::Scope::Flag::Subgroup); template -extern SYCL_EXTERNAL __spv::__spirv_JointMatrixINTEL * +extern SYCL_EXTERNAL JOINT_MATRIX_INTEL(T3, M, N, LC, S, UC) * __spirv_JointMatrixSUMadINTEL( - __spv::__spirv_JointMatrixINTEL *A, - __spv::__spirv_JointMatrixINTEL *B, - __spv::__spirv_JointMatrixINTEL *C, + JOINT_MATRIX_INTEL(T1, M, K, LA, S, UA) *A, + JOINT_MATRIX_INTEL(T2, K, N, LB, S, UB) *B, + JOINT_MATRIX_INTEL(T3, M, N, LC, S, UC) *C, __spv::Scope::Flag Sc = __spv::Scope::Flag::Subgroup); template -extern SYCL_EXTERNAL __spv::__spirv_JointMatrixINTEL * +extern SYCL_EXTERNAL JOINT_MATRIX_INTEL(T, R, C, L, S, U) * __spirv_CompositeConstruct(const T v); -template extern SYCL_EXTERNAL size_t __spirv_JointMatrixWorkItemLengthINTEL( - __spv::__spirv_JointMatrixINTEL *); + JOINT_MATRIX_INTEL(T, R, C, L, S, U) *); -template extern SYCL_EXTERNAL T __spirv_VectorExtractDynamic( - __spv::__spirv_JointMatrixINTEL *, size_t i); + JOINT_MATRIX_INTEL(T, R, C, L, S, U) *, size_t i); -template -extern SYCL_EXTERNAL __spv::__spirv_JointMatrixINTEL * -__spirv_VectorInsertDynamic(__spv::__spirv_JointMatrixINTEL *, +extern SYCL_EXTERNAL JOINT_MATRIX_INTEL(T, R, C, L, S, U) * +__spirv_VectorInsertDynamic(JOINT_MATRIX_INTEL(T, R, C, L, S, U) *, T val, size_t i); +#undef JOINT_MATRIX_INTEL #ifndef __SPIRV_BUILTIN_DECLARATIONS__ #error \ diff --git a/sycl/include/CL/__spirv/spirv_types.hpp b/sycl/include/CL/__spirv/spirv_types.hpp index 815d38b349342..9bb1ac20400a1 100644 --- a/sycl/include/CL/__spirv/spirv_types.hpp +++ b/sycl/include/CL/__spirv/spirv_types.hpp @@ -137,6 +137,7 @@ enum class MatrixUse : uint32_t { // information to SPIRV translator. // The long term solution would be to introduce a matrix type in Clang and use // it instead of this member. +#if (SYCL_EXT_ONEAPI_MATRIX_VERSION > 1) template @@ -145,6 +146,14 @@ struct __spirv_JointMatrixINTEL { [R][C][static_cast(L) + 1][static_cast(S) + 1] [static_cast(U) + 1]; }; +#else +template +struct __spirv_JointMatrixINTEL { + T(*Value) + [R][C][static_cast(L) + 1][static_cast(S) + 1]; +}; +#endif // SYCL_EXT_ONEAPI_MATRIX_VERSION } // namespace __spv diff --git a/sycl/include/sycl/ext/oneapi/matrix/matrix-jit.hpp b/sycl/include/sycl/ext/oneapi/matrix/matrix-jit.hpp index edd8ab43d75fd..10e70c12b7c5d 100644 --- a/sycl/include/sycl/ext/oneapi/matrix/matrix-jit.hpp +++ b/sycl/include/sycl/ext/oneapi/matrix/matrix-jit.hpp @@ -73,8 +73,7 @@ struct joint_matrix { public: __spv::__spirv_JointMatrixINTEL< T, NumRows, NumCols, spv_matrix_layout_traits::value, - spv_scope_traits::value, - spv_matrix_use_traits::value> *spvm; + spv_scope_traits::value> *spvm; joint_matrix(Group sg) { #ifndef __SYCL_DEVICE_ONLY__ (void)sg; diff --git a/sycl/include/sycl/ext/oneapi/matrix/matrix-tensorcore.hpp b/sycl/include/sycl/ext/oneapi/matrix/matrix-tensorcore.hpp index 70fe048d32b72..93339e22c0c14 100644 --- a/sycl/include/sycl/ext/oneapi/matrix/matrix-tensorcore.hpp +++ b/sycl/include/sycl/ext/oneapi/matrix/matrix-tensorcore.hpp @@ -712,7 +712,7 @@ void joint_matrix_load( std::ignore = src; std::ignore = stride; throw runtime_error( - "When using SYCL_EXT_ONEAPI_MATRIX=3 joint_matrix_load is " + "When using SYCL_EXT_ONEAPI_MATRIX_VERSION=3 joint_matrix_load is " "only supported by CUDA devices", PI_ERROR_INVALID_DEVICE); #endif // defined(__SYCL_DEVICE_ONLY__) && defined(__NVPTX__) @@ -734,7 +734,7 @@ void joint_matrix_store(Group sg, std::ignore = dst; std::ignore = stride; throw runtime_error( - "When using SYCL_EXT_ONEAPI_MATRIX=3 joint_matrix_store is " + "When using SYCL_EXT_ONEAPI_MATRIX_VERSION=3 joint_matrix_store is " "only supported by CUDA devices", PI_ERROR_INVALID_DEVICE); #endif // defined(__SYCL_DEVICE_ONLY__) && defined(__NVPTX__) @@ -757,9 +757,10 @@ joint_matrix_mad( std::ignore = A; std::ignore = B; std::ignore = C; - throw runtime_error("When using SYCL_EXT_ONEAPI_MATRIX=3 joint_matrix_mad is " - "only supported by CUDA devices", - PI_ERROR_INVALID_DEVICE); + throw runtime_error( + "When using SYCL_EXT_ONEAPI_MATRIX_VERSION=3 joint_matrix_mad is " + "only supported by CUDA devices", + PI_ERROR_INVALID_DEVICE); #endif // defined(__SYCL_DEVICE_ONLY__) && defined(__NVPTX__) } diff --git a/sycl/include/sycl/ext/oneapi/matrix/matrix.hpp b/sycl/include/sycl/ext/oneapi/matrix/matrix.hpp index ecfad58259cc2..00ae3792626c6 100644 --- a/sycl/include/sycl/ext/oneapi/matrix/matrix.hpp +++ b/sycl/include/sycl/ext/oneapi/matrix/matrix.hpp @@ -14,18 +14,18 @@ #pragma once -#include +#ifndef SYCL_EXT_ONEAPI_MATRIX_VERSION +#define SYCL_EXT_ONEAPI_MATRIX_VERSION 1 +#endif // SYCL_EXT_ONEAPI_MATRIX_VERSION -// the default is matrix-jit-use but existing tests in llvm-test-suite won't -// fail because we have the "unnecessary" use value -#if (SYCL_EXT_ONEAPI_MATRIX == 1) +#if (SYCL_EXT_ONEAPI_MATRIX_VERSION == 1) #include #include -#endif -#if (SYCL_EXT_ONEAPI_MATRIX == 2) +#endif // SYCL_EXT_ONEAPI_MATRIX_VERSION +#if (SYCL_EXT_ONEAPI_MATRIX_VERSION == 2) #include #include -#endif -#if (SYCL_EXT_ONEAPI_MATRIX == 3) +#endif // SYCL_EXT_ONEAPI_MATRIX_VERSION +#if (SYCL_EXT_ONEAPI_MATRIX_VERSION == 3) #include -#endif +#endif // SYCL_EXT_ONEAPI_MATRIX_VERSION diff --git a/sycl/include/sycl/feature_test.hpp.in b/sycl/include/sycl/feature_test.hpp.in index 59d2ebed77e39..3ae4e1b73a96b 100644 --- a/sycl/include/sycl/feature_test.hpp.in +++ b/sycl/include/sycl/feature_test.hpp.in @@ -32,14 +32,7 @@ __SYCL_INLINE_VER_NAMESPACE(_V1) { #define SYCL_EXT_INTEL_DEVICE_INFO 3 #define SYCL_EXT_ONEAPI_SUB_GROUP_MASK 1 #define SYCL_EXT_ONEAPI_LOCAL_MEMORY 1 -// As for SYCL_EXT_ONEAPI_MATRIX: -// 1- provides AOT initial implementation for AMX for the experimental matrix -// extension -// 2- provides JIT implementation (target agnostic) for the -// experimental matrix extension -#ifndef SYCL_EXT_ONEAPI_MATRIX -#define SYCL_EXT_ONEAPI_MATRIX 2 -#endif +#define SYCL_EXT_ONEAPI_MATRIX 1 #define SYCL_EXT_ONEAPI_ASSERT 1 #define SYCL_EXT_ONEAPI_COMPLEX_ALGORITHMS 1 #define SYCL_EXT_ONEAPI_DISCARD_QUEUE_EVENTS 1 diff --git a/sycl/test/check_device_code/matrix/matrix-nvptx-bf16-test.cpp b/sycl/test/check_device_code/matrix/matrix-nvptx-bf16-test.cpp index d1a26381b5218..403a6b91086ce 100644 --- a/sycl/test/check_device_code/matrix/matrix-nvptx-bf16-test.cpp +++ b/sycl/test/check_device_code/matrix/matrix-nvptx-bf16-test.cpp @@ -1,6 +1,6 @@ // REQUIRES: cuda -// RUN: %clangxx -fsycl-device-only -fsycl-targets=nvptx64-nvidia-cuda -Xsycl-target-backend --cuda-gpu-arch=sm_80 -DSYCL_EXT_ONEAPI_MATRIX=3 -S -Xclang -emit-llvm %s -o -| FileCheck %s +// RUN: %clangxx -fsycl-device-only -fsycl-targets=nvptx64-nvidia-cuda -Xsycl-target-backend --cuda-gpu-arch=sm_80 -DSYCL_EXT_ONEAPI_MATRIX_VERSION=3 -S -Xclang -emit-llvm %s -o -| FileCheck %s #include diff --git a/sycl/test/check_device_code/matrix/matrix-nvptx-bfloat16-test.cpp b/sycl/test/check_device_code/matrix/matrix-nvptx-bfloat16-test.cpp index 73e3ed1b337e3..aec5ac38ba48d 100644 --- a/sycl/test/check_device_code/matrix/matrix-nvptx-bfloat16-test.cpp +++ b/sycl/test/check_device_code/matrix/matrix-nvptx-bfloat16-test.cpp @@ -1,6 +1,6 @@ // REQUIRES: cuda -// RUN: %clangxx -fsycl-device-only -fsycl-targets=nvptx64-nvidia-cuda -Xsycl-target-backend --cuda-gpu-arch=sm_80 -DSYCL_EXT_ONEAPI_MATRIX=3 -S -Xclang -emit-llvm %s -o -| FileCheck %s +// RUN: %clangxx -fsycl-device-only -fsycl-targets=nvptx64-nvidia-cuda -Xsycl-target-backend --cuda-gpu-arch=sm_80 -DSYCL_EXT_ONEAPI_MATRIX_VERSION=3 -S -Xclang -emit-llvm %s -o -| FileCheck %s #include diff --git a/sycl/test/check_device_code/matrix/matrix-nvptx-double-test.cpp b/sycl/test/check_device_code/matrix/matrix-nvptx-double-test.cpp index 490ec68fa6cc2..fb7fedb7f46fe 100644 --- a/sycl/test/check_device_code/matrix/matrix-nvptx-double-test.cpp +++ b/sycl/test/check_device_code/matrix/matrix-nvptx-double-test.cpp @@ -1,6 +1,6 @@ // REQUIRES: cuda -// RUN: %clangxx -fsycl-device-only -fsycl-targets=nvptx64-nvidia-cuda -Xsycl-target-backend --cuda-gpu-arch=sm_80 -DSYCL_EXT_ONEAPI_MATRIX=3 -S -Xclang -emit-llvm %s -o -| FileCheck %s +// RUN: %clangxx -fsycl-device-only -fsycl-targets=nvptx64-nvidia-cuda -Xsycl-target-backend --cuda-gpu-arch=sm_80 -DSYCL_EXT_ONEAPI_MATRIX_VERSION=3 -S -Xclang -emit-llvm %s -o -| FileCheck %s #include diff --git a/sycl/test/check_device_code/matrix/matrix-nvptx-half-float-test.cpp b/sycl/test/check_device_code/matrix/matrix-nvptx-half-float-test.cpp index 0804a55b2f0bd..4eadc45d6088e 100644 --- a/sycl/test/check_device_code/matrix/matrix-nvptx-half-float-test.cpp +++ b/sycl/test/check_device_code/matrix/matrix-nvptx-half-float-test.cpp @@ -1,6 +1,6 @@ // REQUIRES: cuda -// RUN: %clangxx -fsycl-device-only -fsycl-targets=nvptx64-nvidia-cuda -Xsycl-target-backend --cuda-gpu-arch=sm_70 -DSYCL_EXT_ONEAPI_MATRIX=3 -S -Xclang -emit-llvm %s -o -| FileCheck %s +// RUN: %clangxx -fsycl-device-only -fsycl-targets=nvptx64-nvidia-cuda -Xsycl-target-backend --cuda-gpu-arch=sm_70 -DSYCL_EXT_ONEAPI_MATRIX_VERSION=3 -S -Xclang -emit-llvm %s -o -| FileCheck %s #include diff --git a/sycl/test/check_device_code/matrix/matrix-nvptx-half-half-test.cpp b/sycl/test/check_device_code/matrix/matrix-nvptx-half-half-test.cpp index 8d5ed2df41064..7c78dcb1ee3c9 100644 --- a/sycl/test/check_device_code/matrix/matrix-nvptx-half-half-test.cpp +++ b/sycl/test/check_device_code/matrix/matrix-nvptx-half-half-test.cpp @@ -1,6 +1,6 @@ // REQUIRES: cuda -// RUN: %clangxx -fsycl-device-only -fsycl-targets=nvptx64-nvidia-cuda -Xsycl-target-backend --cuda-gpu-arch=sm_70 -DSYCL_EXT_ONEAPI_MATRIX=3 -S -Xclang -emit-llvm %s -o -| FileCheck %s +// RUN: %clangxx -fsycl-device-only -fsycl-targets=nvptx64-nvidia-cuda -Xsycl-target-backend --cuda-gpu-arch=sm_70 -DSYCL_EXT_ONEAPI_MATRIX_VERSION=3 -S -Xclang -emit-llvm %s -o -| FileCheck %s #include diff --git a/sycl/test/check_device_code/matrix/matrix-nvptx-int8-test.cpp b/sycl/test/check_device_code/matrix/matrix-nvptx-int8-test.cpp index d08505c32d7cc..79ea6cd67ec10 100644 --- a/sycl/test/check_device_code/matrix/matrix-nvptx-int8-test.cpp +++ b/sycl/test/check_device_code/matrix/matrix-nvptx-int8-test.cpp @@ -1,6 +1,6 @@ // REQUIRES: cuda -// RUN: %clangxx -fsycl-device-only -fsycl-targets=nvptx64-nvidia-cuda -Xsycl-target-backend --cuda-gpu-arch=sm_72 -DSYCL_EXT_ONEAPI_MATRIX=3 -S -Xclang -emit-llvm %s -o -| FileCheck %s +// RUN: %clangxx -fsycl-device-only -fsycl-targets=nvptx64-nvidia-cuda -Xsycl-target-backend --cuda-gpu-arch=sm_72 -DSYCL_EXT_ONEAPI_MATRIX_VERSION=3 -S -Xclang -emit-llvm %s -o -| FileCheck %s #include diff --git a/sycl/test/check_device_code/matrix/matrix-nvptx-tf32-test.cpp b/sycl/test/check_device_code/matrix/matrix-nvptx-tf32-test.cpp index 54a29ba095ae0..3c28a0f2f1536 100644 --- a/sycl/test/check_device_code/matrix/matrix-nvptx-tf32-test.cpp +++ b/sycl/test/check_device_code/matrix/matrix-nvptx-tf32-test.cpp @@ -1,6 +1,6 @@ // REQUIRES: cuda -// RUN: %clangxx -fsycl-device-only -fsycl-targets=nvptx64-nvidia-cuda -Xsycl-target-backend --cuda-gpu-arch=sm_80 -DSYCL_EXT_ONEAPI_MATRIX=3 -S -Xclang -emit-llvm %s -o -| FileCheck %s +// RUN: %clangxx -fsycl-device-only -fsycl-targets=nvptx64-nvidia-cuda -Xsycl-target-backend --cuda-gpu-arch=sm_80 -DSYCL_EXT_ONEAPI_MATRIX_VERSION=3 -S -Xclang -emit-llvm %s -o -| FileCheck %s // IMPORTANT: before updating sm version support beyond sm_86 read the following // NOTE! diff --git a/sycl/test/check_device_code/matrix/matrix-nvptx-uint8-test.cpp b/sycl/test/check_device_code/matrix/matrix-nvptx-uint8-test.cpp index dc33e9019bc69..0b7c3b05e0ae8 100644 --- a/sycl/test/check_device_code/matrix/matrix-nvptx-uint8-test.cpp +++ b/sycl/test/check_device_code/matrix/matrix-nvptx-uint8-test.cpp @@ -1,6 +1,6 @@ // REQUIRES: cuda -// RUN: %clangxx -fsycl-device-only -fsycl-targets=nvptx64-nvidia-cuda -Xsycl-target-backend --cuda-gpu-arch=sm_72 -DSYCL_EXT_ONEAPI_MATRIX=3 -S -Xclang -emit-llvm %s -o -| FileCheck %s +// RUN: %clangxx -fsycl-device-only -fsycl-targets=nvptx64-nvidia-cuda -Xsycl-target-backend --cuda-gpu-arch=sm_72 -DSYCL_EXT_ONEAPI_MATRIX_VERSION=3 -S -Xclang -emit-llvm %s -o -| FileCheck %s #include diff --git a/sycl/test/matrix/matrix-bf16-test-SG-16.cpp b/sycl/test/matrix/matrix-bf16-test-SG-16.cpp index 89e34eaf59cb6..aa53fce4c72b9 100644 --- a/sycl/test/matrix/matrix-bf16-test-SG-16.cpp +++ b/sycl/test/matrix/matrix-bf16-test-SG-16.cpp @@ -1,4 +1,4 @@ -// RUN: %clangxx -fsycl -O2 %s -o %t.out -DSYCL_EXT_ONEAPI_MATRIX=1 +// RUN: %clangxx -fsycl -O2 %s -o %t.out #include #include diff --git a/sycl/test/matrix/matrix-bf16-test.cpp b/sycl/test/matrix/matrix-bf16-test.cpp index 32633c240a70f..6169b4f9ca324 100644 --- a/sycl/test/matrix/matrix-bf16-test.cpp +++ b/sycl/test/matrix/matrix-bf16-test.cpp @@ -1,4 +1,4 @@ -// RUN: %clangxx -fsycl -O2 %s -o %t.out -DSYCL_EXT_ONEAPI_MATRIX=1 +// RUN: %clangxx -fsycl -O2 %s -o %t.out #include #include diff --git a/sycl/test/matrix/matrix-bfloat16-test-use.cpp b/sycl/test/matrix/matrix-bfloat16-test-use.cpp index 1a8b101721019..89a295cb23b75 100644 --- a/sycl/test/matrix/matrix-bfloat16-test-use.cpp +++ b/sycl/test/matrix/matrix-bfloat16-test-use.cpp @@ -1,4 +1,4 @@ -// RUN: %clangxx -fsycl -O2 %s -o %t.out +// RUN: %clangxx -fsycl -O2 -DSYCL_EXT_ONEAPI_MATRIX_VERSION=2 %s -o %t.out #include #include diff --git a/sycl/test/matrix/matrix-bfloat16-test.cpp b/sycl/test/matrix/matrix-bfloat16-test.cpp index 065895fd5498f..8840a7e5ccc6f 100644 --- a/sycl/test/matrix/matrix-bfloat16-test.cpp +++ b/sycl/test/matrix/matrix-bfloat16-test.cpp @@ -1,4 +1,4 @@ -// RUN: %clangxx -fsycl -O2 %s -o %t.out -DSYCL_EXT_ONEAPI_MATRIX=1 +// RUN: %clangxx -fsycl -O2 %s -o %t.out #include #include diff --git a/sycl/test/matrix/matrix-elemwise-ops.cpp b/sycl/test/matrix/matrix-elemwise-ops.cpp index 2253654a8d935..842678a9224a5 100644 --- a/sycl/test/matrix/matrix-elemwise-ops.cpp +++ b/sycl/test/matrix/matrix-elemwise-ops.cpp @@ -1,4 +1,4 @@ -// RUN: %clangxx -fsycl -O2 %s -o %t.out -DSYCL_EXT_ONEAPI_MATRIX=1 +// RUN: %clangxx -fsycl -O2 %s -o %t.out #include #include diff --git a/sycl/test/matrix/matrix-int8-test-SG-16.cpp b/sycl/test/matrix/matrix-int8-test-SG-16.cpp index 0e9855cb24579..35834273720ff 100644 --- a/sycl/test/matrix/matrix-int8-test-SG-16.cpp +++ b/sycl/test/matrix/matrix-int8-test-SG-16.cpp @@ -1,4 +1,4 @@ -// RUN: %clangxx -fsycl -O2 %s -o %t.out -DSYCL_EXT_ONEAPI_MATRIX=1 +// RUN: %clangxx -fsycl -O2 %s -o %t.out #include #include diff --git a/sycl/test/matrix/matrix-int8-test-use.cpp b/sycl/test/matrix/matrix-int8-test-use.cpp index dde82891291c0..8511c6080493a 100644 --- a/sycl/test/matrix/matrix-int8-test-use.cpp +++ b/sycl/test/matrix/matrix-int8-test-use.cpp @@ -1,4 +1,4 @@ -// RUN: %clangxx -fsycl -fsycl-device-only -O2 -S -emit-llvm -o - %s | FileCheck %s +// RUN: %clangxx -fsycl -fsycl-device-only -DSYCL_EXT_ONEAPI_MATRIX_VERSION=2 -O2 -S -emit-llvm -o - %s | FileCheck %s // CHECK-DAG: %spirv.JointMatrixINTEL._char_12_48_4_3_0 = type { [12 x [48 x [5 x [4 x [1 x i8]]]]] addrspace(4)* } // CHECK-DAG: %spirv.JointMatrixINTEL._int_12_12_4_3_2 = type { [12 x [12 x [5 x [4 x [3 x i32]]]]] addrspace(4)* } diff --git a/sycl/test/matrix/matrix-int8-test.cpp b/sycl/test/matrix/matrix-int8-test.cpp index b3edeea70258f..94eab2237b0dc 100644 --- a/sycl/test/matrix/matrix-int8-test.cpp +++ b/sycl/test/matrix/matrix-int8-test.cpp @@ -1,8 +1,8 @@ -// RUN: %clangxx -DSYCL_EXT_ONEAPI_MATRIX=1 -fsycl -fsycl-device-only -O2 -S -emit-llvm -o - %s | FileCheck %s +// RUN: %clangxx -fsycl -fsycl-device-only -O2 -S -emit-llvm -o - %s | FileCheck %s -// CHECK-DAG: %spirv.JointMatrixINTEL._char_12_48_0_3_3 = type { [12 x [48 x [1 x [4 x [4 x i8]]]]] addrspace(4)* } -// CHECK-DAG: %spirv.JointMatrixINTEL._int_12_12_0_3_3 = type { [12 x [12 x [1 x [4 x [4 x i32]]]]] addrspace(4)* } -// CHECK-DAG: %spirv.JointMatrixINTEL._char_48_12_3_3_3 = type { [48 x [12 x [4 x [4 x [4 x i8]]]]] addrspace(4)* } +// CHECK-DAG: %spirv.JointMatrixINTEL._char_12_48_0_3 = type { [12 x [48 x [1 x [4 x i8]]]] addrspace(4)* } +// CHECK-DAG: %spirv.JointMatrixINTEL._int_12_12_0_3 = type { [12 x [12 x [1 x [4 x i32]]]] addrspace(4)* } +// CHECK-DAG: %spirv.JointMatrixINTEL._char_48_12_3_3 = type { [48 x [12 x [4 x [4 x i8]]]] addrspace(4)* } #include #include diff --git a/sycl/test/matrix/query.cpp b/sycl/test/matrix/query.cpp index 838ae4026460a..544f2319aa082 100644 --- a/sycl/test/matrix/query.cpp +++ b/sycl/test/matrix/query.cpp @@ -1,4 +1,4 @@ -// RUN: %clangxx -DSYCL_EXT_ONEAPI_MATRIX=1 -fsycl -o query %s +// RUN: %clangxx -fsycl -o query %s #include #include