Skip to content

Commit 3405149

Browse files
authored
[ESIMD] Fix obsolete TODO comments + enable more cases in ballot.cpp (#12657)
Signed-off-by: Klochkov, Vyacheslav N <[email protected]>
1 parent 7ee7e90 commit 3405149

File tree

2 files changed

+6
-11
lines changed

2 files changed

+6
-11
lines changed

sycl/test-e2e/ESIMD/api/ballot.cpp

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -71,15 +71,13 @@ template <class T, int N> bool test(queue &Q) {
7171
template <class T> bool test(queue &Q) {
7272
bool Pass = true;
7373

74-
// TODO: uncomment calls below once simd<...>.copy_from() starts supporting
75-
// sizes other than 8, 16 and 32.
76-
// Pass &= test<T, 4>(Q);
74+
Pass &= test<T, 4>(Q);
7775
Pass &= test<T, 8>(Q);
78-
// Pass &= test<T, 12>(Q);
76+
Pass &= test<T, 12>(Q);
7977
Pass &= test<T, 16>(Q);
80-
// Pass &= test<T, 20>(Q);
81-
// Pass &= test<T, 24>(Q);
82-
// Pass &= test<T, 28>(Q);
78+
Pass &= test<T, 20>(Q);
79+
Pass &= test<T, 24>(Q);
80+
Pass &= test<T, 28>(Q);
8381
Pass &= test<T, 32>(Q);
8482

8583
return Pass;

sycl/test-e2e/ESIMD/dpas/dpas_common.hpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,6 @@ template <dpas_argument_type T> struct DpasNaturalOperandType {
9494
static constexpr bool is_bf16 = T == dpas_argument_type::bf16;
9595
static constexpr bool is_tf32 = T == dpas_argument_type::tf32;
9696

97-
// TODO: support tf32 here.
9897
using type = std::conditional_t<
9998
is_sint, signed char,
10099
std::conditional_t<
@@ -149,7 +148,7 @@ void writeToHorizontallyPackedMatrix(void *VVec, int Row, int Col,
149148
ElemT *Vec = reinterpret_cast<ElemT *>(VVec);
150149

151150
// 1. Find and read the target 'unsigned int' element.
152-
// THe unpacked matrix has dimensions: NumRows*NumCols
151+
// The unpacked matrix dimensions are NumRows*NumCols.
153152
constexpr int ElemsInElemT = sizeof(ElemT) * 8 / ElemBitSize;
154153
int UnpackedLinearIndex = Row * NumCols + Col;
155154
int PackedLinearIndex = UnpackedLinearIndex / ElemsInElemT;
@@ -160,7 +159,6 @@ void writeToHorizontallyPackedMatrix(void *VVec, int Row, int Col,
160159
} else {
161160
ElemT TargetElem = Vec[PackedLinearIndex];
162161
// TargetElem has 2 or more elements in it. Need to extract one.
163-
// TODO: for now assume that is the case only for 2 or 4-bit integers.
164162
assert((ElemBitSize == 2 || ElemBitSize == 4) && "Unexpected element type");
165163

166164
unsigned int Offset = (UnpackedLinearIndex % ElemsInElemT) * ElemBitSize;
@@ -196,7 +194,6 @@ ReadT readFromHorizontallyPackedMatrix(void *VVec, int Row, int Col) {
196194
return static_cast<ReadT>(TargetElem);
197195
} else {
198196
// TargetElem has 2 or more elements in it. Need to extract one.
199-
// TODO: for now assume that is the case only for 2 or 4-bit integers.
200197
assert((ElemBitSize == 2 || ElemBitSize == 4) && "Unexpected element type");
201198
unsigned int Offset = (UnpackedLinearIndex % ElemsInElemT) * ElemBitSize;
202199
unsigned int Mask = (static_cast<uint64_t>(1) << ElemBitSize) - 1;

0 commit comments

Comments
 (0)