[Triton-MLIR][BACKEND] Support bfloat16 and clean up some test code (#998)

This commit is contained in:
Keren Zhou
2022-12-20 22:26:51 -08:00
committed by GitHub
parent 899bb0a0e7
commit 50a5128448
15 changed files with 699 additions and 480 deletions

View File

@@ -134,6 +134,13 @@ bool supportMMA(Value value, int version) {
(elemTy.isInteger(8) && version >= 2);
}
Type getElementType(Value value) {
auto type = value.getType();
if (auto tensorType = type.dyn_cast<RankedTensorType>())
return tensorType.getElementType();
return type;
}
std::string getValueOperandName(Value value, AsmState &state) {
std::string opName;
llvm::raw_string_ostream ss(opName);