Skip to content

Commit

Permalink
Add extra info to error message in transfer_read operation with eleme…
Browse files Browse the repository at this point in the history
…nt and thread count info (iree-org#17695)

Added values of "number of elements" and "workgroup size" to `Anchoring
on transfer_read with unsupported number of elements (not divisible by
workgroup size)`

---------

Signed-off-by: Amily Wu <amilywu2@amd.com>
  • Loading branch information
RattataKing authored Jun 20, 2024
1 parent 9fd55d2 commit f427965
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -225,9 +225,11 @@ class ContractionVectorLayoutOptions : public VectorLayoutOptions {
ShapedType::getNumElements(transfer.getVectorType().getShape());
int64_t flatNumThreads = ShapedType::getNumElements(workgroupSize);
if (flatNumElements % flatNumThreads != 0) {
transfer->emitOpError(
"Anchoring on transfer_read with unsupported number of elements (not "
"divisible by workgroup size)");
transfer->emitOpError()
<< "Anchoring on transfer_read with unsupported number of elements "
"(not divisible by workgroup size)"
<< ", number of elements: " << flatNumElements
<< ", workgroup size: " << flatNumThreads;
return failure();
}
numElementsPerThread =
Expand Down

0 comments on commit f427965

Please sign in to comment.