[BACKEND] add triton-translate to translate mlir to llvmir or PTX code (#37)

This commit is contained in:
Yan Chunwei
2022-08-08 13:34:36 +08:00
committed by GitHub
parent 490d34e0d5
commit 920723cf3d
11 changed files with 366 additions and 4 deletions

View File

@@ -155,7 +155,7 @@ struct FuncOpConversion : public FuncOpConversionBase {
auto i32 = IntegerType::get(ctx, 32);
// Set an attribute for maxntidx, it could be used in latter LLVM codegen
// for `nvvm.annotation` metadata.
newFuncOp->setAttr("nvvm.maxntidx",
newFuncOp->setAttr(NVVMMetadataField::MaxNTid,
rewriter.getIntegerAttr(i32, 32 * NumWarps));
rewriter.eraseOp(funcOp);