Skip to content

Commit

Permalink
Debug on CI
Browse files Browse the repository at this point in the history
Signed-off-by: erman-gurses <[email protected]>
  • Loading branch information
erman-gurses committed Feb 6, 2025
1 parent ab768c6 commit 7005f3f
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1206,7 +1206,7 @@ static SmallVector<int64_t> getTileSizes(DictionaryAttr config,
}

SmallVector<int64_t> LoweringConfigAttr::getWorkgroupTileSizes() const {
return getTileSizes(getAttributes(), GPU::TilingLevel::Workgroup);
return getTileSizes(getAttributes(), GPU::TilingLevel::Reduction);
}

SmallVector<int64_t>
Expand Down
36 changes: 19 additions & 17 deletions compiler/src/iree/compiler/Codegen/LLVMGPU/Verifiers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,36 +86,38 @@ verifyGPUMatmulPipeline(Operation *op,
}

uint32_t reduction = static_cast<uint32_t>(IREE::GPU::TilingLevel::Reduction);
uint numLoops = llvm::cast<linalg::LinalgOp>(op).getNumLoops();

SmallVector<int64_t> reductionTileSizes =
gpuLoweringConfig.getStaticTilingLevelSizes(reduction, op);
size_t size = reductionTileSizes.size();
// uint numLoops = llvm::cast<linalg::LinalgOp>(op).getNumLoops();
size_t size = 0;
if (gpuLoweringConfig.hasTilingLevel(reduction)) {
SmallVector<int64_t> reductionTileSizes =
gpuLoweringConfig.getWorkgroupTileSizes();
size = reductionTileSizes.size();
}
// if (size > numLoops) {
// return op->emitOpError("expected number of reduction tile size is equal
// or "
// "less than number of loops");
// }
for (size_t i = 0; i < size; ++i) {
if (reductionTileSizes[i] > 0 &&
llvm::cast<linalg::LinalgOp>(op).getIteratorTypesArray()[i] !=
utils::IteratorType::reduction) {
return op->emitOpError(
"expected to non-zero reduction tile has reduction iterator");
}
// if (reductionTileSizes[i] > 0 &&
// llvm::cast<linalg::LinalgOp>(op).getIteratorTypesArray()[i] !=
// utils::IteratorType::reduction) {
// return op->emitOpError(
// "expected to non-zero reduction tile has reduction iterator");
// }
}

SmallVector<int64_t> workgroupTileSizes =
gpuLoweringConfig.getWorkgroupTileSizes();
size = workgroupTileSizes.size();

for (size_t i = 0; i < size; ++i) {
if (workgroupTileSizes[i] > 0 &&
llvm::cast<linalg::LinalgOp>(op).getIteratorTypesArray()[i] !=
utils::IteratorType::parallel) {
return op->emitOpError(
"expected to non-zero workgroup tile has parallel iterator");
}
// if (workgroupTileSizes[i] > 0 &&
// llvm::cast<linalg::LinalgOp>(op).getIteratorTypesArray()[i] !=
// utils::IteratorType::parallel) {
// return op->emitOpError(
// "expected to non-zero workgroup tile has parallel iterator");
// }
}

if (pipeline == CodeGenPipeline::LLVMGPUTileAndFuse ||
Expand Down

0 comments on commit 7005f3f

Please sign in to comment.