Skip to content

Commit

Permalink
benchdnn: graph: skip unimplemented GenIndex op on gpu
Browse files Browse the repository at this point in the history
  • Loading branch information
ElaineBao authored and TaoLv committed Jan 9, 2025
1 parent cafd15e commit 8b017b0
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion tests/benchdnn/graph/graph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,10 @@ void skip_unimplemented_ops(const dnnl::graph::partition &partition,

// A list of ops that don't have DNNL backend support so far.
static const std::vector<std::string> unimplemented_ops {"Pow"};

// A list of ops that don't have DNNL backend support so far on GPU.
static const std::vector<std::string> unimplemented_ops_gpu {"GenIndex"};
const auto &eng = get_graph_engine();
bool is_gpu = eng.get_kind() == dnnl::engine::kind::gpu;
// For an unsupported partition, retrieve all operation IDs, find a
// correspondent operation kind in a deserialized_graph and match it against
// a list of known unsupported ops.
Expand All @@ -423,6 +426,21 @@ void skip_unimplemented_ops(const dnnl::graph::partition &partition,
res->reason = skip_reason::case_not_supported;
return;
}

if (is_gpu) {
const bool has_unimplemented_op_gpu = std::any_of(
unimplemented_ops_gpu.begin(), unimplemented_ops_gpu.end(),
[&dg_op_kind](const std::string &kind) {
return dg_op_kind == kind;
});
if (has_unimplemented_op_gpu) {
BENCHDNN_PRINT(2, "[INFO]: Unimplemented op on GPU: %s.\n",
dg_op_kind.c_str());
res->state = SKIPPED;
res->reason = skip_reason::case_not_supported;
return;
}
}
}
}

Expand Down

0 comments on commit 8b017b0

Please sign in to comment.