Skip to content

Instantly share code, notes, and snippets.

@pashu123
Created January 8, 2025 15:04
Show Gist options
  • Save pashu123/3e8bd27c68933fdc529a961bc61abb7c to your computer and use it in GitHub Desktop.
Save pashu123/3e8bd27c68933fdc529a961bc61abb7c to your computer and use it in GitHub Desktop.
func.func @matmul(%lhs: tensor<654x321xi8>, %rhs: tensor<321x234xi8>) -> tensor<654x234xi32> {
%init_acc = tensor.empty() : tensor<654x234xi32>
%c0_acc_type = arith.constant 0: i32
%acc = linalg.fill ins(%c0_acc_type : i32) outs(%init_acc : tensor<654x234xi32>) -> tensor<654x234xi32>
%result = linalg.matmul ins(%lhs, %rhs: tensor<654x321xi8>, tensor<321x234xi8>) outs(%acc: tensor<654x234xi32>) -> tensor<654x234xi32>
return %result: tensor<654x234xi32>
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment