bolt/deps/llvm-18.1.8/mlir/test/Dialect/Tosa/constrained_shapes.mlir

12 lines
404 B
MLIR
Raw Normal View History

2025-02-14 19:21:04 +01:00
// RUN: mlir-opt %s | mlir-opt | FileCheck %s
// RUN: mlir-opt %s --mlir-print-op-generic | mlir-opt | FileCheck %s
// -----
// Uses argmax as canonical example to validate constrained TOSA tensor shapes.
// CHECK-LABEL: argmax
func.func @test_argmax(%arg0: tensor<?xf32>) -> tensor<?xi32> {
%0 = "tosa.argmax"(%arg0) {axis = 0 : i32} : (tensor<?xf32>) -> tensor<?xi32>
return %0 : tensor<?xi32>
}