blob: 32b2343038d982f69f16940c9adbb6ab42eca2d3 [file]
// RUN: ( iree-benchmark-module --help || [[ $? == 1 ]] ) | FileCheck --check-prefix=HELP %s
// HELP: --module_file
// HELP: --benchmark_list_tests
// RUN: ( iree-compile --iree-input-type=mhlo --iree-hal-target-backends=vmvx --iree-mlir-to-vm-bytecode-module %s | iree-benchmark-module --benchmark_list_tests --driver=local-task --benchmark_list_tests ) | FileCheck --check-prefix=LIST-BENCHMARKS %s
module {
// LIST-BENCHMARKS: BM_foo1
func.func @foo1() -> tensor<4xf32> {
%input = util.unfoldable_constant dense<[0.0, 1.0, 2.0, 4.0]> : tensor<4xf32>
%result = "mhlo.exponential"(%input) : (tensor<4xf32>) -> tensor<4xf32>
return %result : tensor<4xf32>
}
// LIST-BENCHMARKS: BM_foo2
func.func @foo2() -> tensor<4xf32> {
%input = util.unfoldable_constant dense<[0.0, 1.0, 2.0, 4.0]> : tensor<4xf32>
%result = "mhlo.abs"(%input) : (tensor<4xf32>) -> tensor<4xf32>
return %result : tensor<4xf32>
}
}