@@ -214,8 +214,7 @@ void MmaOp::print(OpAsmPrinter &p) {
214
214
p.printOptionalAttrDict (this ->getOperation ()->getAttrs (), ignoreAttrNames);
215
215
216
216
// Print the types of the operands and result.
217
- p << " : "
218
- << " (" ;
217
+ p << " : " << " (" ;
219
218
llvm::interleaveComma (SmallVector<Type, 3 >{frags[0 ].regs [0 ].getType (),
220
219
frags[1 ].regs [0 ].getType (),
221
220
frags[2 ].regs [0 ].getType ()},
@@ -956,9 +955,7 @@ std::string NVVM::WgmmaMmaAsyncOp::getPtx() {
956
955
ss << " }," ;
957
956
// Need to map read/write registers correctly.
958
957
regCnt = (regCnt * 2 );
959
- ss << " $" << (regCnt) << " ,"
960
- << " $" << (regCnt + 1 ) << " ,"
961
- << " p" ;
958
+ ss << " $" << (regCnt) << " ," << " $" << (regCnt + 1 ) << " ," << " p" ;
962
959
if (getTypeD () != WGMMATypes::s32) {
963
960
ss << " , $" << (regCnt + 3 ) << " , $" << (regCnt + 4 );
964
961
}
@@ -1056,14 +1053,10 @@ LogicalResult NVVMDialect::verifyOperationAttribute(Operation *op,
1056
1053
StringAttr attrName = attr.getName ();
1057
1054
// Kernel function attribute should be attached to functions.
1058
1055
if (attrName == NVVMDialect::getKernelFuncAttrName ()) {
1059
- auto funcOp = dyn_cast<LLVM::LLVMFuncOp>(op);
1060
- if (!funcOp) {
1056
+ if (!isa<LLVM::LLVMFuncOp>(op)) {
1061
1057
return op->emitError () << " '" << NVVMDialect::getKernelFuncAttrName ()
1062
1058
<< " ' attribute attached to unexpected op" ;
1063
1059
}
1064
- if (!funcOp.getResultTypes ().empty ()) {
1065
- return op->emitError () << " kernel function cannot have results" ;
1066
- }
1067
1060
}
1068
1061
// If maxntid and reqntid exist, it must be an array with max 3 dim
1069
1062
if (attrName == NVVMDialect::getMaxntidAttrName () ||
0 commit comments