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 7, 2025
1 parent ab768c6 commit 81c4a14
Showing 1 changed file with 29 additions and 27 deletions.
56 changes: 29 additions & 27 deletions compiler/src/iree/compiler/Codegen/LLVMGPU/Verifiers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,36 +87,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();
// 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");
}
size_t size = 0;
if (gpuLoweringConfig.hasTilingLevel(reduction)) {
SmallVector<int64_t> reductionTileSizes =
gpuLoweringConfig.getStaticTilingLevelSizes(reduction, op);
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");
// }
// }

SmallVector<int64_t> workgroupTileSizes =
gpuLoweringConfig.getWorkgroupTileSizes();
size = workgroupTileSizes.size();
// 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");
}
}
// 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 (pipeline == CodeGenPipeline::LLVMGPUTileAndFuse ||
pipeline == CodeGenPipeline::LLVMGPUVectorDistribute) {
Expand Down

0 comments on commit 81c4a14

Please sign in to comment.