Skip to content

Commit a908c46

Browse files
committed
resolve review comments
1 parent 44d232f commit a908c46

File tree

6 files changed

+21
-11
lines changed

6 files changed

+21
-11
lines changed

sycl/include/sycl/ext/oneapi/matrix/matrix-intel.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,6 @@ class wi_element<sycl::ext::oneapi::bfloat16, NumRows, NumCols, Use, Layout,
276276
};
277277
floatValue = *ExtractP;
278278
return __spirv_ConvertBF16ToFINTEL(intStorage);
279-
280279
#else
281280
throw exception(make_error_code(errc::runtime),
282281
"joint matrix is not supported on host.");

sycl/include/sycl/ext/oneapi/matrix/matrix-unified-utils.hpp

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -87,29 +87,30 @@ extern "C" constexpr __spv::MatrixLayout joint_matrix_layout_to_spv(
8787

8888
template <typename Ta, typename Tb, typename Tc, typename Td>
8989
constexpr uint32_t CalculateMatrixOperand() {
90+
unit32_t returnValue = 0x00;
9091
if constexpr (std::is_same<Ta, sycl::ext::oneapi::bfloat16>::value &&
9192
std::is_same<Tb, sycl::ext::oneapi::bfloat16>::value)
92-
return static_cast<uint32_t>(
93+
returnValue += static_cast<uint32_t>(
9394
__spv::MatrixOperands::MatrixAAndBBFloat16ComponentsINTEL);
9495
if constexpr (std::is_same<Tc, sycl::ext::oneapi::bfloat16>::value)
95-
return static_cast<uint32_t>(
96+
returnValue += static_cast<uint32_t>(
9697
__spv::MatrixOperands::MatrixCBFloat16ComponentsINTEL);
9798
if constexpr (std::is_same<Td, sycl::ext::oneapi::bfloat16>::value)
98-
return static_cast<uint32_t>(
99+
returnValue += static_cast<uint32_t>(
99100
__spv::MatrixOperands::MatrixResultBFloat16ComponentsINTEL);
100101
if constexpr (std::is_signed<Ta>::value && std::is_unsigned<Tb>::value)
101-
return static_cast<uint32_t>(
102+
returnValue += static_cast<uint32_t>(
102103
__spv::MatrixOperands::MatrixASignedComponentsKHR);
103104
if constexpr (std::is_unsigned<Ta>::value && std::is_signed<Tb>::value)
104-
return static_cast<uint32_t>(
105+
returnValue += static_cast<uint32_t>(
105106
__spv::MatrixOperands::MatrixBSignedComponentsKHR);
106107
if constexpr (std::is_signed<Ta>::value && std::is_signed<Tb>::value) {
107-
return static_cast<uint32_t>(
108+
returnValue += static_cast<uint32_t>(
108109
__spv::MatrixOperands::MatrixASignedComponentsKHR) +
109110
static_cast<uint32_t>(
110111
__spv::MatrixOperands::MatrixBSignedComponentsKHR);
111112
}
112-
return 0;
113+
return returnValue;
113114
}
114115

115116
} // namespace detail

sycl/test-e2e/Matrix/SG32/joint_matrix_bfloat16.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@
55
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
66
//
77
//===----------------------------------------------------------------------===//
8+
// SG size = 32 is not currently supported for SYCL Joint Matrix by IGC on DG2
89
// UNSUPPORTED: gpu-intel-dg2
9-
// REQUIRES: target-spir
1010

11+
// REQUIRES: target-spir
1112
// REQUIRES: aspect-ext_intel_matrix
1213
// REQUIRES-INTEL-DRIVER: lin: 27501, win: 101.4943
1314

sycl/test-e2e/Matrix/SG32/joint_matrix_bfloat16_accumulator.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@
55
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
66
//
77
//===----------------------------------------------------------------------===//
8+
// SG size = 32 is not currently supported for SYCL Joint Matrix by IGC on DG2
9+
// UNSUPPORTED: gpu-intel-dg2
810

11+
// REQUIRES: target-spir
912
// REQUIRES: aspect-ext_intel_matrix
1013
// REQUIRES-INTEL-DRIVER: lin: 27501, win: 101.4943
1114

sycl/test-e2e/Matrix/SG32/joint_matrix_half.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
//==-------- joint_matrix_half.cpp - DPC++ joint_matrix------------ ----==//
1+
//==------ SG32/joint_matrix_half.cpp - DPC++ joint_matrix--------- ----==//
22
//
33
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44
// See https://llvm.org/LICENSE.txt for license information.
55
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
66
//
77
//===----------------------------------------------------------------------===//
8+
// SG size = 32 is not currently supported for SYCL Joint Matrix by IGC on DG2
89
// UNSUPPORTED: gpu-intel-dg2
910

1011
// REQUIRES: target-spir

sycl/test-e2e/Matrix/SG32/joint_matrix_half_accumulator.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1-
//==-------- joint_matrix_half.cpp - DPC++ joint_matrix------------ ----==//
1+
//==-------SG32/joint_matrix_half_accumulator.cpp - DPC++ joint_matrix ----==//
22
//
33
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44
// See https://llvm.org/LICENSE.txt for license information.
55
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
66
//
77
//===----------------------------------------------------------------------===//
8+
// SG size = 32 is not currently supported for SYCL Joint Matrix by IGC on DG2
9+
// UNSUPPORTED: gpu-intel-dg2
810

911
// REQUIRES: target-spir
1012
// REQUIRES: aspect-ext_intel_matrix
@@ -15,6 +17,9 @@
1517

1618
// RUN: %{build} -o %t.out
1719
// RUN: %{run} %t.out
20+
// RUN: %if gpu %{ env IGC_JointMatrixLoadStoreOpt=2 %{run} %t.out %}
21+
// RUN: %if gpu %{ env IGC_JointMatrixLoadStoreOpt=1 %{run} %t.out %}
22+
// RUN: %if gpu %{ env IGC_JointMatrixLoadStoreOpt=0 %{run} %t.out %}
1823

1924
#include "common.hpp"
2025

0 commit comments

Comments
 (0)