Skip to content

Commit

Permalink
[XPU][TritonGPUToLLVM] Use reqd_work_group_size
Browse files Browse the repository at this point in the history
Use `llvm.func`'s `reqd_work_group_size` instead of `max_work_group_size`
to express known work-group size information.

Signed-off-by: victor-eds <[email protected]>
  • Loading branch information
victor-eds committed Nov 27, 2024
1 parent ee78046 commit 109de74
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions third_party/intel/lib/TritonIntelGPUToLLVM/PipelineManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,8 @@ struct FuncOpConversion : public ConvertOpToLLVMPattern<triton::FuncOp> {
newFuncOp.setLinkage(LLVM::Linkage::External);
}

newFuncOp->setAttr(
TritonGEN::TritonGENDialect::getMaxWorkGroupSizeAttrName(),
rewriter.getDenseI32ArrayAttr({threadsPerWarp * numWarps, 1, 1}));
newFuncOp.setReqdWorkGroupSize(
ArrayRef<int>{threadsPerWarp * numWarps, 1, 1});
newFuncOp.setIntelReqdSubGroupSize(threadsPerWarp);

if (!LLVM::isKernel(funcOp)) {
Expand Down

0 comments on commit 109de74

Please sign in to comment.