diff --git a/tests/benchdnn/reduction/reduction.cpp b/tests/benchdnn/reduction/reduction.cpp index e2bfef9a85d..834b96fc3b4 100644 --- a/tests/benchdnn/reduction/reduction.cpp +++ b/tests/benchdnn/reduction/reduction.cpp @@ -156,6 +156,11 @@ void check_known_skipped_case(const prb_t *prb, res_t *res) { check_known_skipped_case_common({prb->sdt, prb->ddt}, FWD_D, res); if (res->state == SKIPPED) return; + if (engine_tgt_kind != dnnl_cpu) { + res->state = SKIPPED, res->reason = CASE_NOT_SUPPORTED; + return; + } + bool is_invalid = false; switch (prb->alg) { case alg_t::MEAN: diff --git a/tests/gtests/test_reduction.cpp b/tests/gtests/test_reduction.cpp index 638a02dcd7e..5e112fbc518 100644 --- a/tests/gtests/test_reduction.cpp +++ b/tests/gtests/test_reduction.cpp @@ -49,6 +49,8 @@ class reduction_test_t SKIP_IF(unsupported_data_type(src_dt), "Engine does not support this data type."); + SKIP_IF(get_test_engine().get_kind() != engine::kind::cpu, + "Engine does not support this primitive."); catch_expected_failures( [=]() { Test(); }, p.expect_to_fail, p.expected_status);