Skip to content

Commit 3164a4e

Browse files
authored
[AMD] Cover default case in MfmaGroup (#5218)
If you build using the `CMakeLists.txt` and not `setup.py` and you build in `Release` then you get ``` /__w/triton/triton/third_party/amd/lib/TritonAMDGPUTransforms/MfmaGroup.cpp: In function ‘std::pair<mlir::Type, mlir::Type> mlir::TypesFromMfmaId(MLIRContext*, MfmaTypeId)’: Warning: /__w/triton/triton/third_party/amd/lib/TritonAMDGPUTransforms/MfmaGroup.cpp:240:1: warning: control reaches end of non-void function [-Wreturn-type] ```
1 parent c8a31a0 commit 3164a4e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

third_party/amd/lib/TritonAMDGPUTransforms/MfmaGroup.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,8 +235,9 @@ std::pair<mlir::Type, mlir::Type> TypesFromMfmaId(mlir::MLIRContext *ctx,
235235
return {f8e5m2fnuz, f8e4m3fnuz};
236236
case MfmaTypeId::Bf8Bf8TyId:
237237
return {f8e5m2fnuz, f8e5m2fnuz};
238+
default:
239+
llvm_unreachable("unsupported MfmaTypeId!");
238240
}
239-
assert(false && "unsupported MfmaTypeId");
240241
}
241242

242243
FailureOr<MfmaInsn> MfmaInsn::selectMfma(unsigned mDim, unsigned nDim,

0 commit comments

Comments
 (0)