From f4279657ef8da12d07f068a37cbd93986edb47d8 Mon Sep 17 00:00:00 2001 From: RattataKing <46631728+RattataKing@users.noreply.github.com> Date: Thu, 20 Jun 2024 17:52:46 -0400 Subject: [PATCH] Add extra info to error message in transfer_read operation with element and thread count info (#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 --- .../compiler/Codegen/LLVMGPU/LLVMGPUVectorDistribute.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/compiler/src/iree/compiler/Codegen/LLVMGPU/LLVMGPUVectorDistribute.cpp b/compiler/src/iree/compiler/Codegen/LLVMGPU/LLVMGPUVectorDistribute.cpp index dab08c637d85..d37d624de9c2 100644 --- a/compiler/src/iree/compiler/Codegen/LLVMGPU/LLVMGPUVectorDistribute.cpp +++ b/compiler/src/iree/compiler/Codegen/LLVMGPU/LLVMGPUVectorDistribute.cpp @@ -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 =