Skip to content

Commit

Permalink
Enable DDS for ONNXRT (#994)
Browse files Browse the repository at this point in the history
Signed-off-by: Kevin Chen <[email protected]>
  • Loading branch information
kevinch-nv authored Sep 3, 2024
1 parent 62bdde2 commit efd73c8
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions ModelImporter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -439,17 +439,6 @@ Status importLocalFunctions(ImporterContext* ctx, ::ONNX_NAMESPACE::ModelProto c
return Status::success();
}

// Internal helper function used for ONNXRT-TRT EP to filter out DDS nodes
bool isDDSOp(char const* op_name)
{
auto is = [op_name](char const* name) { return std::strcmp(op_name, name) == 0; };
if (is("NonMaxSuppression") || is("NonZero") || is("RoiAlign"))
{
return true;
}
return false;
}

std::pair<bool, ModelImporter::SubGraphSupportVector_t> ModelImporter::doSupportsModel(
void const* serialized_onnx_model, size_t serialized_onnx_model_size, char const* model_path)
{
Expand Down Expand Up @@ -525,10 +514,9 @@ std::pair<bool, ModelImporter::SubGraphSupportVector_t> ModelImporter::doSupport
// 1. It is not a node that requires DDS
// 2. It is not directly connected to an unsupported input
// 3. The importer function did not throw an assertion
bool unsupportedDDS = isDDSOp(node.op_type().c_str());
bool unsupportedInput = (input_node.empty()) ? false : checkForInput(node);
bool unsuccessfulParse = node_idx == error_node;
if (!unsupportedDDS && !unsupportedInput && !unsuccessfulParse)
if (!unsupportedInput && !unsuccessfulParse)
{
if (newSubGraph)
{
Expand Down

0 comments on commit efd73c8

Please sign in to comment.