Open Abhishek-Varma opened 8 months ago
Since linalg.matmul_transpose_b
's initial support is in, I tried the shape 1x256000x3072
(for i32
though) and here is the IR e2e log.
The error is in iree-amdaie-decompose-pack-unpack-to-air
pass :-
error: 'memref.expand_shape' op collapsed dim size (1) must equal reassociation group size (4)
%7 = linalg.matmul_transpose_b ins(%3, %4 : tensor<1x3072xi32>, tensor<256000x3072xi32>) outs(%6 : tensor<1x256000xi32>) -> tensor<1x256000xi32>
^
note: see current operation: %25 = "memref.expand_shape"(%23) <{reassociation = [[0], [1], [2, 3], [4, 5]]}> : (memref<1x1x1x32xi32, strided<[3072, 3072, 3072, 1], offset: ?>, 1 : i32>) -> memref<1x1x1x4x4x8xi32, strided<[3072, 3072, 12288, 3072, 8, 1], offset: ?>, 1 : i32>
error: failed to run translation of source executable to target executable for backend #hal.executable.target<"amd-aie", "amdaie-xclbin-fb", {target_arch = "chip-tbd"}>
CC: @MaheshRavishankar @nirvedhmeshram @yzhang93 @erwei-xilinx
I'll beautify this once I get hold of Azure storage.
I have attached gemma_7b.mlir along with gemma weights.
For now, I've uploaded all GEMM dispatches here.
GEMMs in Gemma model appear in two forms :-
linalg.batch_matmul
.linalg.matmul_transpose_b
.NOTE: I first tried getting the Gemma model compiled for
llvm-cpu
and only foundbatch_mmt4d
- I've added those here.And when I tried compiling Gemma model for
amd-aie
backend, I found the above dispatches.