From c9b8754fa9171846e4121e66f5418185eff7390c Mon Sep 17 00:00:00 2001 From: "Si, Yudong" Date: Fri, 26 Jul 2024 13:10:20 +0800 Subject: [PATCH] Add debug code for capture failure details (#1707) We can't reproduce the failure locally. This change aims to wait next failure and capture details in CI. --- .../intel/lib/TritonIntelGPUToLLVM/Utility.h | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/third_party/intel/lib/TritonIntelGPUToLLVM/Utility.h b/third_party/intel/lib/TritonIntelGPUToLLVM/Utility.h index f9a96da26b..7db64bfd9b 100644 --- a/third_party/intel/lib/TritonIntelGPUToLLVM/Utility.h +++ b/third_party/intel/lib/TritonIntelGPUToLLVM/Utility.h @@ -105,12 +105,16 @@ static Value getSharedMemoryBase(Location loc, auto ptrTy = LLVM::LLVMPointerType::get( rewriter.getContext(), TritonGEN::TritonGENMemorySpace::kWorkgroup); FunctionOpInterface func = op->getParentOfType(); - size_t offset = 0; - if (op->hasAttr("allocation.offset")) { - offset = cast(op->getAttr("allocation.offset")) - .getValue() - .getZExtValue(); + // CI debugging usage here + if (!op->hasAttr("allocation.offset")) { + auto mod = op->getParentOfType(); + llvm::errs() << "op: " << *op << "\n"; + llvm::errs() << "mod:" << mod << "\n"; + llvm_unreachable("missing allocation.offset"); } + size_t offset = cast(op->getAttr("allocation.offset")) + .getValue() + .getZExtValue(); Value offVal = i32_val(offset); Value base = gep(ptrTy, i8_ty, LLVM::intel::getStackPointer(rewriter, func), offVal);