Skip to content

Commit

Permalink
[GEN] Update 2Dblockload attributes (#1278)
Browse files Browse the repository at this point in the history
Signed-off-by: Whitney Tsang <[email protected]>
  • Loading branch information
whitneywhtsang authored Jun 7, 2024
1 parent 9a70f9b commit bc8cf78
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion test/TritonGEN/tritongen-to-llvm.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ llvm.func @triton_gen.dpas.f32(%c : vector<8xf32>, %a : vector<4xf32>, %b : vect

// -----

// CHECK: llvm.func spir_funccc @intel_subgroup_block_read_u8_m8k32v2(!llvm.ptr<1>, i32, i32, i32, vector<2xi32>) -> vector<16xi16> attributes {passthrough = ["convergent"]}
// CHECK: llvm.func spir_funccc @intel_subgroup_block_read_u8_m8k32v2(!llvm.ptr<1> {llvm.nonnull}, i32, i32, i32, vector<2xi32>) -> vector<16xi16> attributes {passthrough = ["nounwind"]}

llvm.func @triton_gen.2Dblockload(%ptr : !llvm.ptr<1>, %base_width : i32, %base_height : i32, %base_pitch : i32, %x : i32, %y : i32) {
// CHECK: llvm.func @triton_gen.2Dblockload(%arg0: !llvm.ptr<1>, %arg1: i32, %arg2: i32, %arg3: i32, %arg4: i32, %arg5: i32) {
Expand Down
8 changes: 6 additions & 2 deletions third_party/intel/lib/TritonGENToLLVM/TritonGENToLLVMPass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -294,8 +294,12 @@ createGenISA2DBlockRead(TritonGEN::Matrix2DBlockLoadOp op,

MLIRContext *ctx = rewriter.getContext();
intel::AttrBuilder funcAttrBuilder(*ctx);
funcAttrBuilder.addPassthroughAttribute(llvm::Attribute::Convergent);
intel::AttributeList attrs = getAttrList(funcAttrBuilder);
intel::AttrBuilder paramAttrBuilder(*ctx);
funcAttrBuilder.addPassthroughAttribute(llvm::Attribute::NoUnwind);
paramAttrBuilder.addAttribute(llvm::Attribute::NonNull);
std::vector<NamedAttrList> paramAttrs(argTypes.size());
paramAttrs[0] = paramAttrBuilder.getAttributes();
intel::AttributeList attrs = getAttrList(funcAttrBuilder, paramAttrs);

return createDeviceFunctionCall(rewriter, fnName, resType, argTypes, args,
attrs);
Expand Down

0 comments on commit bc8cf78

Please sign in to comment.