[MFMA] [FA] Keep bf16 results of FA dot operations in registers (#298)

This PR enables optimization for keeping bf16 values in registers between dot operations.
This commit is contained in:
Alexander Efimov
2023-08-18 14:33:00 +02:00
committed by GitHub
parent 9ab335196f
commit 01b0108c94
2 changed files with 4 additions and 3 deletions

View File

@@ -666,8 +666,9 @@ private:
SmallVector<Value> vecVals;
SmallVector<Type> types;
auto elemSize = elemTy.getIntOrFloatBitWidth();
// TODO: Support types other than float16.
assert(type::isFloat(elemTy) && elemSize == 16);
// TODO: Support types other than float16 and
// bf16 (represented as int16 in llvm ir).
assert((type::isFloat(elemTy) || type::isInt(elemTy)) && elemSize == 16);
unsigned vecSize = 4;
Type vecTy = vec_ty(elemTy, vecSize);
types = SmallVector<Type>(elems / vecSize, vecTy);