Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 1 addition & 8 deletions include/triton/Conversion/TritonGPUToLLVM/Utility.h
Original file line number Diff line number Diff line change
Expand Up @@ -388,19 +388,12 @@ inline Value getSharedMemoryBase(Location loc, RewriterBase &rewriter,

/* ------------------------------------ */
// Returns CTA level thread idx
inline Value getThreadIdInCTA(RewriterBase &rewriter, Location loc) {
inline Value getThreadId(RewriterBase &rewriter, Location loc) {
Value tid =
rewriter.create<::mlir::gpu::ThreadIdOp>(loc, ::mlir::gpu::Dimension::x);
return rewriter.create<arith::IndexCastOp>(loc, i32_ty, tid);
}

// Returns CTA level thread idx.
inline Value getThreadId(RewriterBase &rewriter, Location loc) {
Value tid = getThreadIdInCTA(rewriter, loc);
auto mod = rewriter.getBlock()->getParent()->getParentOfType<ModuleOp>();
return tid;
}

// -----------------------------------------------------------------------
// Shared memory utilities
// -----------------------------------------------------------------------
Expand Down