Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ESIMD] Fix obsolete TODO comments + enable more cases in ballot.cpp #12657

Merged
merged 1 commit into from
Feb 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions sycl/test-e2e/ESIMD/api/ballot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,15 +71,13 @@ template <class T, int N> bool test(queue &Q) {
template <class T> bool test(queue &Q) {
bool Pass = true;

// TODO: uncomment calls below once simd<...>.copy_from() starts supporting
// sizes other than 8, 16 and 32.
// Pass &= test<T, 4>(Q);
Pass &= test<T, 4>(Q);
Pass &= test<T, 8>(Q);
// Pass &= test<T, 12>(Q);
Pass &= test<T, 12>(Q);
Pass &= test<T, 16>(Q);
// Pass &= test<T, 20>(Q);
// Pass &= test<T, 24>(Q);
// Pass &= test<T, 28>(Q);
Pass &= test<T, 20>(Q);
Pass &= test<T, 24>(Q);
Pass &= test<T, 28>(Q);
Pass &= test<T, 32>(Q);

return Pass;
Expand Down
5 changes: 1 addition & 4 deletions sycl/test-e2e/ESIMD/dpas/dpas_common.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ template <dpas_argument_type T> struct DpasNaturalOperandType {
static constexpr bool is_bf16 = T == dpas_argument_type::bf16;
static constexpr bool is_tf32 = T == dpas_argument_type::tf32;

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

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

unsigned int Offset = (UnpackedLinearIndex % ElemsInElemT) * ElemBitSize;
Expand Down Expand Up @@ -196,7 +194,6 @@ ReadT readFromHorizontallyPackedMatrix(void *VVec, int Row, int Col) {
return static_cast<ReadT>(TargetElem);
} else {
// TargetElem has 2 or more elements in it. Need to extract one.
// TODO: for now assume that is the case only for 2 or 4-bit integers.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO is removed because: 1-bit integers are not supported and there are no known plans to support them.

assert((ElemBitSize == 2 || ElemBitSize == 4) && "Unexpected element type");
unsigned int Offset = (UnpackedLinearIndex % ElemsInElemT) * ElemBitSize;
unsigned int Mask = (static_cast<uint64_t>(1) << ElemBitSize) - 1;
Expand Down
Loading