From 7ebc3325348bb297a539306e4a8772661d51cd04 Mon Sep 17 00:00:00 2001 From: Yury Plyakhin Date: Mon, 20 May 2024 15:05:58 -0700 Subject: [PATCH 1/6] add vec load 1d testing for element_wise_all_ops --- sycl/test-e2e/Matrix/element_wise_all_ops.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/sycl/test-e2e/Matrix/element_wise_all_ops.cpp b/sycl/test-e2e/Matrix/element_wise_all_ops.cpp index 4d6493c23e18e..37eb9e0190066 100644 --- a/sycl/test-e2e/Matrix/element_wise_all_ops.cpp +++ b/sycl/test-e2e/Matrix/element_wise_all_ops.cpp @@ -9,6 +9,7 @@ // RUN: %{build} -o %t.out // RUN: %{run} %t.out +// RUN: %if gpu %{ env IGC_JointMatrixLoadStoreOpt=2 %{run} %t.out %} #include "common.hpp" #include "element_wise_all_ops_impl.hpp" From dfeb73431f8268a73fccfabf52cf27d3a858c0ad Mon Sep 17 00:00:00 2001 From: Yury Plyakhin Date: Tue, 21 May 2024 18:04:41 -0700 Subject: [PATCH 2/6] split test to 2 to reduce test time --- sycl/test-e2e/Matrix/element_wise_all_ops.cpp | 1 - .../Matrix/element_wise_all_ops_1d_cont.cpp | 14 ++++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 sycl/test-e2e/Matrix/element_wise_all_ops_1d_cont.cpp diff --git a/sycl/test-e2e/Matrix/element_wise_all_ops.cpp b/sycl/test-e2e/Matrix/element_wise_all_ops.cpp index 37eb9e0190066..4d6493c23e18e 100644 --- a/sycl/test-e2e/Matrix/element_wise_all_ops.cpp +++ b/sycl/test-e2e/Matrix/element_wise_all_ops.cpp @@ -9,7 +9,6 @@ // RUN: %{build} -o %t.out // RUN: %{run} %t.out -// RUN: %if gpu %{ env IGC_JointMatrixLoadStoreOpt=2 %{run} %t.out %} #include "common.hpp" #include "element_wise_all_ops_impl.hpp" diff --git a/sycl/test-e2e/Matrix/element_wise_all_ops_1d_cont.cpp b/sycl/test-e2e/Matrix/element_wise_all_ops_1d_cont.cpp new file mode 100644 index 0000000000000..1529e60c4165c --- /dev/null +++ b/sycl/test-e2e/Matrix/element_wise_all_ops_1d_cont.cpp @@ -0,0 +1,14 @@ +//==-------- element_wise_all_ops_1d_cont.cpp - DPC++ joint_matrix ---------==// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// REQUIRES: aspect-ext_intel_matrix, gpu + +// RUN: %{build} -o %t.out +// RUN: env IGC_JointMatrixLoadStoreOpt=2 %{run} %t.out + +#include "common.hpp" +#include "element_wise_all_ops_impl.hpp" From 887ea6e0c5559ea869037e1c2eaf88658a0242ba Mon Sep 17 00:00:00 2001 From: Yury Plyakhin Date: Tue, 21 May 2024 18:39:39 -0700 Subject: [PATCH 3/6] [SYCL][Joint Matrix][E2E] Added tests for 1d load/store --- sycl/test-e2e/Matrix/element_wise_all_ops_1d.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 sycl/test-e2e/Matrix/element_wise_all_ops_1d.cpp diff --git a/sycl/test-e2e/Matrix/element_wise_all_ops_1d.cpp b/sycl/test-e2e/Matrix/element_wise_all_ops_1d.cpp new file mode 100644 index 0000000000000..d3d0396593bb0 --- /dev/null +++ b/sycl/test-e2e/Matrix/element_wise_all_ops_1d.cpp @@ -0,0 +1,14 @@ +//==-------- element_wise_all_ops_1d.cpp - DPC++ joint_matrix ---------==// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// REQUIRES: aspect-ext_intel_matrix, gpu + +// RUN: %{build} -o %t.out +// RUN: env IGC_JointMatrixLoadStoreOpt=1 %{run} %t.out + +#include "common.hpp" +#include "element_wise_all_ops_impl.hpp" From 38ca05fa6666de76cefa8084a5a933f56c41d4c8 Mon Sep 17 00:00:00 2001 From: Yury Plyakhin Date: Tue, 21 May 2024 18:40:54 -0700 Subject: [PATCH 4/6] more tests --- sycl/test-e2e/Matrix/joint_matrix_bfloat16_packedB.cpp | 1 + sycl/test-e2e/Matrix/joint_matrix_rowmajorA_rowmajorB.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/sycl/test-e2e/Matrix/joint_matrix_bfloat16_packedB.cpp b/sycl/test-e2e/Matrix/joint_matrix_bfloat16_packedB.cpp index cb1beda1f95d6..d3bf6b5744941 100644 --- a/sycl/test-e2e/Matrix/joint_matrix_bfloat16_packedB.cpp +++ b/sycl/test-e2e/Matrix/joint_matrix_bfloat16_packedB.cpp @@ -11,6 +11,7 @@ // RUN: %{build} -o %t.out // RUN: %{run} %t.out // RUN: %if gpu %{ env IGC_JointMatrixLoadStoreOpt=2 %{run} %t.out %} +// RUN: %if gpu %{ env IGC_JointMatrixLoadStoreOpt=1 %{run} %t.out %} #include "common.hpp" #include "joint_matrix_bfloat16_packedB_impl.hpp" diff --git a/sycl/test-e2e/Matrix/joint_matrix_rowmajorA_rowmajorB.cpp b/sycl/test-e2e/Matrix/joint_matrix_rowmajorA_rowmajorB.cpp index c537112345be5..c3ba99bfbabde 100644 --- a/sycl/test-e2e/Matrix/joint_matrix_rowmajorA_rowmajorB.cpp +++ b/sycl/test-e2e/Matrix/joint_matrix_rowmajorA_rowmajorB.cpp @@ -12,6 +12,7 @@ // RUN: %{build} -o %t.out // RUN: %{run} %t.out // RUN: %if gpu %{ env IGC_JointMatrixLoadStoreOpt=2 %{run} %t.out %} +// RUN: %if gpu %{ env IGC_JointMatrixLoadStoreOpt=1 %{run} %t.out %} // This tests support of row major layout for matrix B which does automatic VNNI // transform. This is currently only available on AMX and XMX of PVC From d5dece0feef6744e32f9afd047e3a29b0aee034d Mon Sep 17 00:00:00 2001 From: Yury Plyakhin Date: Tue, 21 May 2024 20:37:42 -0700 Subject: [PATCH 5/6] [SYCL][Joint Matrix][E2E] Added tests for gather/scatter load/store --- .../Matrix/element_wise_all_ops_gather_scatter.cpp | 14 ++++++++++++++ .../test-e2e/Matrix/joint_matrix_annotated_ptr.cpp | 1 + .../Matrix/joint_matrix_bfloat16_packedB.cpp | 1 + sycl/test-e2e/Matrix/joint_matrix_int8_vnni.cpp | 1 + .../Matrix/joint_matrix_rowmajorA_rowmajorB.cpp | 1 + 5 files changed, 18 insertions(+) create mode 100644 sycl/test-e2e/Matrix/element_wise_all_ops_gather_scatter.cpp diff --git a/sycl/test-e2e/Matrix/element_wise_all_ops_gather_scatter.cpp b/sycl/test-e2e/Matrix/element_wise_all_ops_gather_scatter.cpp new file mode 100644 index 0000000000000..b3d4e6b4e779e --- /dev/null +++ b/sycl/test-e2e/Matrix/element_wise_all_ops_gather_scatter.cpp @@ -0,0 +1,14 @@ +//==---- element_wise_all_ops_gather_scatter.cpp - DPC++ joint_matrix ------==// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// REQUIRES: aspect-ext_intel_matrix, gpu + +// RUN: %{build} -o %t.out +// RUN: env IGC_JointMatrixLoadStoreOpt=0 %{run} %t.out + +#include "common.hpp" +#include "element_wise_all_ops_impl.hpp" diff --git a/sycl/test-e2e/Matrix/joint_matrix_annotated_ptr.cpp b/sycl/test-e2e/Matrix/joint_matrix_annotated_ptr.cpp index 7aad02b2066a1..a3930fe5a8973 100644 --- a/sycl/test-e2e/Matrix/joint_matrix_annotated_ptr.cpp +++ b/sycl/test-e2e/Matrix/joint_matrix_annotated_ptr.cpp @@ -9,6 +9,7 @@ // RUN: %{build} -o %t.out // RUN: %{run} %t.out +// RUN: %if gpu %{ env IGC_JointMatrixLoadStoreOpt=0 %{run} %t.out %} #include "common.hpp" diff --git a/sycl/test-e2e/Matrix/joint_matrix_bfloat16_packedB.cpp b/sycl/test-e2e/Matrix/joint_matrix_bfloat16_packedB.cpp index d3bf6b5744941..bf3a65d2a16d7 100644 --- a/sycl/test-e2e/Matrix/joint_matrix_bfloat16_packedB.cpp +++ b/sycl/test-e2e/Matrix/joint_matrix_bfloat16_packedB.cpp @@ -12,6 +12,7 @@ // RUN: %{run} %t.out // RUN: %if gpu %{ env IGC_JointMatrixLoadStoreOpt=2 %{run} %t.out %} // RUN: %if gpu %{ env IGC_JointMatrixLoadStoreOpt=1 %{run} %t.out %} +// RUN: %if gpu %{ env IGC_JointMatrixLoadStoreOpt=0 %{run} %t.out %} #include "common.hpp" #include "joint_matrix_bfloat16_packedB_impl.hpp" diff --git a/sycl/test-e2e/Matrix/joint_matrix_int8_vnni.cpp b/sycl/test-e2e/Matrix/joint_matrix_int8_vnni.cpp index f592057ce94d5..f43dcc018ed9d 100644 --- a/sycl/test-e2e/Matrix/joint_matrix_int8_vnni.cpp +++ b/sycl/test-e2e/Matrix/joint_matrix_int8_vnni.cpp @@ -9,6 +9,7 @@ // RUN: %{build} -o %t.out // RUN: %{run} %t.out +// RUN: %if gpu %{ env IGC_JointMatrixLoadStoreOpt=0 %{run} %t.out %} #include "common.hpp" diff --git a/sycl/test-e2e/Matrix/joint_matrix_rowmajorA_rowmajorB.cpp b/sycl/test-e2e/Matrix/joint_matrix_rowmajorA_rowmajorB.cpp index c3ba99bfbabde..bfcf624abe97b 100644 --- a/sycl/test-e2e/Matrix/joint_matrix_rowmajorA_rowmajorB.cpp +++ b/sycl/test-e2e/Matrix/joint_matrix_rowmajorA_rowmajorB.cpp @@ -13,6 +13,7 @@ // RUN: %{run} %t.out // RUN: %if gpu %{ env IGC_JointMatrixLoadStoreOpt=2 %{run} %t.out %} // RUN: %if gpu %{ env IGC_JointMatrixLoadStoreOpt=1 %{run} %t.out %} +// RUN: %if gpu %{ env IGC_JointMatrixLoadStoreOpt=0 %{run} %t.out %} // This tests support of row major layout for matrix B which does automatic VNNI // transform. This is currently only available on AMX and XMX of PVC From 20c7bf3bba93b506f331b0af94f21194c225ac07 Mon Sep 17 00:00:00 2001 From: Yury Plyakhin Date: Tue, 28 May 2024 14:27:24 -0700 Subject: [PATCH 6/6] addressed feedback --- ...l_ops_gather_scatter.cpp => element_wise_all_ops_scalar.cpp} | 2 +- sycl/test-e2e/Matrix/joint_matrix_annotated_ptr.cpp | 1 + sycl/test-e2e/Matrix/joint_matrix_int8_vnni.cpp | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) rename sycl/test-e2e/Matrix/{element_wise_all_ops_gather_scatter.cpp => element_wise_all_ops_scalar.cpp} (85%) diff --git a/sycl/test-e2e/Matrix/element_wise_all_ops_gather_scatter.cpp b/sycl/test-e2e/Matrix/element_wise_all_ops_scalar.cpp similarity index 85% rename from sycl/test-e2e/Matrix/element_wise_all_ops_gather_scatter.cpp rename to sycl/test-e2e/Matrix/element_wise_all_ops_scalar.cpp index b3d4e6b4e779e..0604a7f345963 100644 --- a/sycl/test-e2e/Matrix/element_wise_all_ops_gather_scatter.cpp +++ b/sycl/test-e2e/Matrix/element_wise_all_ops_scalar.cpp @@ -1,4 +1,4 @@ -//==---- element_wise_all_ops_gather_scatter.cpp - DPC++ joint_matrix ------==// +//==---- element_wise_all_ops_scalar.cpp - DPC++ joint_matrix ------==// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. diff --git a/sycl/test-e2e/Matrix/joint_matrix_annotated_ptr.cpp b/sycl/test-e2e/Matrix/joint_matrix_annotated_ptr.cpp index a3930fe5a8973..e21bdaa06a328 100644 --- a/sycl/test-e2e/Matrix/joint_matrix_annotated_ptr.cpp +++ b/sycl/test-e2e/Matrix/joint_matrix_annotated_ptr.cpp @@ -10,6 +10,7 @@ // RUN: %{build} -o %t.out // RUN: %{run} %t.out // RUN: %if gpu %{ env IGC_JointMatrixLoadStoreOpt=0 %{run} %t.out %} +// RUN: %if gpu %{ env IGC_JointMatrixLoadStoreOpt=1 %{run} %t.out %} #include "common.hpp" diff --git a/sycl/test-e2e/Matrix/joint_matrix_int8_vnni.cpp b/sycl/test-e2e/Matrix/joint_matrix_int8_vnni.cpp index f43dcc018ed9d..4ce91037fc668 100644 --- a/sycl/test-e2e/Matrix/joint_matrix_int8_vnni.cpp +++ b/sycl/test-e2e/Matrix/joint_matrix_int8_vnni.cpp @@ -10,6 +10,7 @@ // RUN: %{build} -o %t.out // RUN: %{run} %t.out // RUN: %if gpu %{ env IGC_JointMatrixLoadStoreOpt=0 %{run} %t.out %} +// RUN: %if gpu %{ env IGC_JointMatrixLoadStoreOpt=1 %{run} %t.out %} #include "common.hpp"