[metal] Enable end-to-end TOSA / StableHLO op tests (#15289)
https://github.com/openxla/iree/issues/14814 is fixed now.
diff --git a/tests/e2e/stablehlo_ops/CMakeLists.txt b/tests/e2e/stablehlo_ops/CMakeLists.txt
index ccd02fe..c13f62e 100644
--- a/tests/e2e/stablehlo_ops/CMakeLists.txt
+++ b/tests/e2e/stablehlo_ops/CMakeLists.txt
@@ -533,75 +533,74 @@
"--iree-codegen-gpu-native-math-precision=true" # TODO(#11321): Infer/flip default
)
-# TODO(#14814): Re-enable once flaky segfaults are fixed.
-# iree_check_single_backend_test_suite(
-# NAME
-# check_metal-spirv_metal
-# SRCS
-# "abs.mlir"
-# "add.mlir"
-# "batch_norm_inference.mlir"
-# "bitcast_convert.mlir"
-# "broadcast.mlir"
-# "broadcast_add.mlir"
-# "broadcast_in_dim.mlir"
-# "clamp.mlir"
-# "compare.mlir"
-# "complex.mlir"
-# "concatenate.mlir"
-# "constant.mlir"
-# "convert.mlir"
-# "convolution.mlir"
-# "cosine.mlir"
-# "divide.mlir"
-# "dot.mlir"
-# "dot_bf16.mlir"
-# "dot_general.mlir"
-# "dynamic_slice.mlir"
-# "dynamic_update_slice.mlir"
-# "exponential.mlir"
-# "exponential_fp16.mlir"
-# "exponential_minus_one.mlir"
-# "fft.mlir"
-# "finite.mlir"
-# "floor.mlir"
-# "gather.mlir"
-# "iota.mlir"
-# "log.mlir"
-# "log_plus_one.mlir"
-# "maximum.mlir"
-# "minimum.mlir"
-# "multiply.mlir"
-# "negate.mlir"
-# "pad.mlir"
-# "philox.mlir"
-# "pow.mlir"
-# "reduce.mlir"
-# # "reduce_window.mlir" # TODO(15012): fix test crash
-# "remainder.mlir"
-# "reshape.mlir"
-# "reverse.mlir"
-# "rng_normal.mlir"
-# "rng_uniform.mlir"
-# "round.mlir"
-# "rsqrt.mlir"
-# "scatter.mlir"
-# "scatter_dynamic.mlir"
-# "select.mlir"
-# "sine.mlir"
-# "slice.mlir"
-# "sort.mlir"
-# "sqrt.mlir"
-# "subtract.mlir"
-# "tanh.mlir"
-# "three_fry.mlir"
-# "torch_index_select.mlir"
-# "transpose.mlir"
-# "while.mlir"
-# TARGET_BACKEND
-# "metal-spirv"
-# DRIVER
-# "metal"
-# COMPILER_FLAGS
-# "--iree-input-type=stablehlo"
-# )
+iree_check_single_backend_test_suite(
+ NAME
+ check_metal-spirv_metal
+ SRCS
+ "abs.mlir"
+ "add.mlir"
+ "batch_norm_inference.mlir"
+ "bitcast_convert.mlir"
+ "broadcast.mlir"
+ "broadcast_add.mlir"
+ "broadcast_in_dim.mlir"
+ "clamp.mlir"
+ "compare.mlir"
+ "complex.mlir"
+ "concatenate.mlir"
+ "constant.mlir"
+ "convert.mlir"
+ "convolution.mlir"
+ "cosine.mlir"
+ "divide.mlir"
+ "dot.mlir"
+ "dot_bf16.mlir"
+ "dot_general.mlir"
+ "dynamic_slice.mlir"
+ "dynamic_update_slice.mlir"
+ "exponential.mlir"
+ "exponential_fp16.mlir"
+ "exponential_minus_one.mlir"
+ "fft.mlir"
+ "finite.mlir"
+ "floor.mlir"
+ "gather.mlir"
+ "iota.mlir"
+ "log.mlir"
+ "log_plus_one.mlir"
+ "maximum.mlir"
+ "minimum.mlir"
+ "multiply.mlir"
+ "negate.mlir"
+ "pad.mlir"
+ "philox.mlir"
+ "pow.mlir"
+ "reduce.mlir"
+ # "reduce_window.mlir" # TODO(15012): fix test crash
+ "remainder.mlir"
+ "reshape.mlir"
+ "reverse.mlir"
+ "rng_normal.mlir"
+ "rng_uniform.mlir"
+ "round.mlir"
+ "rsqrt.mlir"
+ "scatter.mlir"
+ "scatter_dynamic.mlir"
+ "select.mlir"
+ "sine.mlir"
+ "slice.mlir"
+ "sort.mlir"
+ "sqrt.mlir"
+ "subtract.mlir"
+ "tanh.mlir"
+ "three_fry.mlir"
+ "torch_index_select.mlir"
+ "transpose.mlir"
+ "while.mlir"
+ TARGET_BACKEND
+ "metal-spirv"
+ DRIVER
+ "metal"
+ COMPILER_FLAGS
+ "--iree-input-type=stablehlo"
+)
diff --git a/tests/e2e/tosa_ops/CMakeLists.txt b/tests/e2e/tosa_ops/CMakeLists.txt
index f42e53a..a4a0d7e 100644
--- a/tests/e2e/tosa_ops/CMakeLists.txt
+++ b/tests/e2e/tosa_ops/CMakeLists.txt
@@ -277,56 +277,55 @@
"--iree-codegen-gpu-native-math-precision=true" # TODO(#11321): Infer/flip default
)
-# TODO(#14814): Re-enable once flaky segfaults are fixed.
-# iree_check_single_backend_test_suite(
-# NAME
-# check_metal-spirv_metal
-# SRCS
-# "abs.mlir"
-# "add.mlir"
-# "arithmetic_right_shift.mlir"
-# "bitwise_and.mlir"
-# "bitwise_or.mlir"
-# "bitwise_xor.mlir"
-# "ceil.mlir"
-# "clamp.mlir"
-# "clz.mlir"
-# "const.mlir"
-# "equal.mlir"
-# "exp.mlir"
-# "floor.mlir"
-# "fully_connected.mlir"
-# "gather.mlir"
-# "greater.mlir"
-# "greater_equal.mlir"
-# "if.mlir"
-# "log.mlir"
-# "logical_left_shift.mlir"
-# "logical_right_shift.mlir"
-# "logical_right_shift_16.mlir"
-# "matmul.mlir"
-# "max_pool.mlir"
-# "maximum.mlir"
-# "minimum.mlir"
-# "mul.mlir"
-# "mul_shift.mlir"
-# "negate.mlir"
-# "pad.mlir"
-# "reciprocal.mlir"
-# "reduce.mlir"
-# "reshape.mlir"
-# "rsqrt.mlir"
-# "select.mlir"
-# "sigmoid.mlir"
-# "sub.mlir"
-# "table.mlir"
-# "tanh.mlir"
-# "transpose.mlir"
-# "while.mlir"
-# TARGET_BACKEND
-# "metal-spirv"
-# DRIVER
-# "metal"
-# COMPILER_FLAGS
-# "--iree-input-type=tosa"
-# )
+iree_check_single_backend_test_suite(
+ NAME
+ check_metal-spirv_metal
+ SRCS
+ "abs.mlir"
+ "add.mlir"
+ "arithmetic_right_shift.mlir"
+ "bitwise_and.mlir"
+ "bitwise_or.mlir"
+ "bitwise_xor.mlir"
+ "ceil.mlir"
+ "clamp.mlir"
+ "clz.mlir"
+ "const.mlir"
+ "equal.mlir"
+ "exp.mlir"
+ "floor.mlir"
+ "fully_connected.mlir"
+ "gather.mlir"
+ "greater.mlir"
+ "greater_equal.mlir"
+ "if.mlir"
+ "log.mlir"
+ "logical_left_shift.mlir"
+ "logical_right_shift.mlir"
+ "logical_right_shift_16.mlir"
+ "matmul.mlir"
+ "max_pool.mlir"
+ "maximum.mlir"
+ "minimum.mlir"
+ "mul.mlir"
+ "mul_shift.mlir"
+ "negate.mlir"
+ "pad.mlir"
+ "reciprocal.mlir"
+ "reduce.mlir"
+ "reshape.mlir"
+ "rsqrt.mlir"
+ "select.mlir"
+ "sigmoid.mlir"
+ "sub.mlir"
+ "table.mlir"
+ "tanh.mlir"
+ "transpose.mlir"
+ "while.mlir"
+ TARGET_BACKEND
+ "metal-spirv"
+ DRIVER
+ "metal"
+ COMPILER_FLAGS
+ "--iree-input-type=tosa"
+)