Skip to content

Commit f90a85d

Browse files
authored
VNNI support for F16 type (#1037)
To enable `vnni` layout for `f16` type in `mlir-gen`.
1 parent db1245c commit f90a85d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tools/mlir-gen/MLIRGen.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,8 @@ MLIRGenerator::MLIRGenerator(StringRef outputOpKindStr, StringRef kernelStr,
122122
assert(elementType && "Unsupported data type");
123123
dataType = *elementType;
124124

125-
// Disable VNNI packing if it is not BF16 data type
126-
if (!dataType.isBF16())
125+
// Disable VNNI packing if it is not a F16/BF16 data type
126+
if (!dataType.isBF16() && !dataType.isF16())
127127
vnniFactor = 0;
128128
assert(((vnniFactor >= 0) && (vnniFactor % 2 == 0)) &&
129129
"Invalid VNNI packing factor");

0 commit comments

Comments
 (0)