// Copyright 2025 The IREE Authors
//
// Licensed under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

// Ordering matters when multiple lines have the same types and tile shape and
// are supported by the CPU. In that case, the last-enumerated line overrides
// // preceding lines. Always go from oldest to shiniest code path.

IREE_UK_MMT4D_TILE(riscv_64, f32, f32, f32, 1, 1, _v)
IREE_UK_MMT4D_TILE(riscv_64, f32, f32, f32, 2, 1, _v)
IREE_UK_MMT4D_TILE(riscv_64, f32, f32, f32, 4, 1, _v)
IREE_UK_MMT4D_TILE(riscv_64, f32, f32, f32, 7, 1, _v)

IREE_UK_MMT4D_TILE(riscv_64, s8, s8, s32, 1, 1, _v)
IREE_UK_MMT4D_TILE(riscv_64, s8, s8, s32, 2, 1, _v)
IREE_UK_MMT4D_TILE(riscv_64, s8, s8, s32, 4, 1, _v)
IREE_UK_MMT4D_TILE(riscv_64, s8, s8, s32, 7, 1, _v)

IREE_UK_MMT4D_TILE(riscv_64, f16, f16, f32, 1, 1, _zvfhmin)
IREE_UK_MMT4D_TILE(riscv_64, f16, f16, f32, 2, 1, _zvfhmin)
IREE_UK_MMT4D_TILE(riscv_64, f16, f16, f32, 4, 1, _zvfhmin)
IREE_UK_MMT4D_TILE(riscv_64, f16, f16, f32, 6, 1, _zvfhmin)

IREE_UK_MMT4D_TILE(riscv_64, f16, f16, f16, 1, 1, _zvfhmin)
IREE_UK_MMT4D_TILE(riscv_64, f16, f16, f16, 2, 1, _zvfhmin)
IREE_UK_MMT4D_TILE(riscv_64, f16, f16, f16, 4, 1, _zvfhmin)
IREE_UK_MMT4D_TILE(riscv_64, f16, f16, f16, 6, 1, _zvfhmin)

IREE_UK_MMT4D_TILE(riscv_64, f16, f16, f32, 1, 1, _zvfh)
IREE_UK_MMT4D_TILE(riscv_64, f16, f16, f32, 2, 1, _zvfh)
IREE_UK_MMT4D_TILE(riscv_64, f16, f16, f32, 4, 1, _zvfh)
IREE_UK_MMT4D_TILE(riscv_64, f16, f16, f32, 7, 1, _zvfh)

IREE_UK_MMT4D_TILE(riscv_64, f16, f16, f16, 1, 1, _zvfh)
IREE_UK_MMT4D_TILE(riscv_64, f16, f16, f16, 2, 1, _zvfh)
IREE_UK_MMT4D_TILE(riscv_64, f16, f16, f16, 4, 1, _zvfh)
IREE_UK_MMT4D_TILE(riscv_64, f16, f16, f16, 7, 1, _zvfh)

IREE_UK_MMT4D_TILE(riscv_64, s8, s8, s32, 12, 8, _xsmtvdot_zvl256b)
IREE_UK_MMT4D_TILE(riscv_64, s8, s8, s32, 24, 16, _xsmtvdot_zvl1024b)
IREE_UK_MMT4D_TILE(riscv_64, s8, s8, s32, 48, 32, _xsmtvdot_zvl4096b)

IREE_UK_MMT4D_TILE(riscv_64, bf16, bf16, f32, 1, 1, _zvfbfwma)
IREE_UK_MMT4D_TILE(riscv_64, bf16, bf16, f32, 2, 1, _zvfbfwma)
IREE_UK_MMT4D_TILE(riscv_64, bf16, bf16, f32, 4, 1, _zvfbfwma)
IREE_UK_MMT4D_TILE(riscv_64, bf16, bf16, f32, 7, 1, _zvfbfwma)
