use different int8 mfma instructions on different GPUs. (#368)

* changes support to choose different int8 instructions

* rename an instruction name

Co-authored-by: Aleksandr Efimov <efimov.alexander@gmail.com>
This commit is contained in:
Shucai Xiao
2023-10-25 19:12:21 -05:00
committed by GitHub
parent 5a86b46bb1
commit 2729ae6c6f
2 changed files with 37 additions and 6 deletions

View File

@@ -112,8 +112,14 @@ public:
assert(mfmaVersion == 3);
kDim = 16;
}
if (elemType.isInteger(8))
kDim = 8;
if (elemType.isInteger(8)) {
if (mfmaVersion == 3) {
kDim = 16;
}
else {
kDim = 8;
}
}
} else {
if (elemType.isF32())
kDim = 4;
@@ -129,8 +135,14 @@ public:
assert(mfmaVersion == 3);
kDim = 32;
}
if (elemType.isInteger(8))
kDim = 16;
if (elemType.isInteger(8)) {
if (mfmaVersion == 3) {
kDim = 32;
}
else {
kDim = 16;
}
}
}
assert(kDim != -1);
assert(nonKDim != -1);