blob: fdbe762677d87a46d7b8caebc7d2b89b5d29db8b [file] [log] [blame]
Ben Vanik9461d3b2023-04-18 16:39:25 -07001// RUN: iree-compile --iree-hal-target-backends=vmvx %s | iree-benchmark-module --device=local-task --module=- | FileCheck %s
2// RUN: [[ $IREE_VULKAN_DISABLE == 1 ]] || (iree-compile --iree-hal-target-backends=vulkan-spirv %s | iree-benchmark-module --device=vulkan --module=- | FileCheck %s)
Han-Chung Wang00aa2fc2020-10-12 02:05:39 -07003
4module {
Thomasf0f64ca2022-03-30 10:38:01 -07005 func.func @foo1() -> tensor<4xf32> {
Ben Vanika1ff64e2021-08-06 10:13:35 -07006 %input = util.unfoldable_constant dense<[0.0, 1.0, 2.0, 4.0]> : tensor<4xf32>
Scott Todd7e463802022-06-30 14:31:00 -07007 %result = math.exp %input : tensor<4xf32>
Han-Chung Wang00aa2fc2020-10-12 02:05:39 -07008 return %result : tensor<4xf32>
9 }
Thomasf0f64ca2022-03-30 10:38:01 -070010 func.func @foo2() -> tensor<4xf32> {
Ben Vanika1ff64e2021-08-06 10:13:35 -070011 %input = util.unfoldable_constant dense<[0.0, 1.0, 2.0, 4.0]> : tensor<4xf32>
Thomas4c2029f2022-08-15 19:20:14 -070012 %result = math.absf %input : tensor<4xf32>
Han-Chung Wang00aa2fc2020-10-12 02:05:39 -070013 return %result : tensor<4xf32>
14 }
15}
16// CHECK: BM_foo1
17// CHECK: BM_foo2