Skip to content

Commit

Permalink
delete the supported domain version upper bounds (microsoft#23237)
Browse files Browse the repository at this point in the history
### Description
<!-- Describe your changes. -->

This PR changes the range of ONNX versions supported by CANN graph
inference to no upper limit (the previous version supports between 8 and
15), because the CANN version is further upgraded to support some
developers' requirements for higher ONNX versions.
### Motivation and Context
<!-- - Why is this change required? What problem does it solve?
- If it fixes an open issue, please link to the issue here. -->
  • Loading branch information
bachelor-dou authored and jatinwadhwa921 committed Feb 5, 2025
1 parent be8c449 commit 6acc47d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions onnxruntime/core/providers/cann/cann_graph.cc
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@
namespace onnxruntime {
namespace cann {

static int lower_bound = 8; // Supported domain version lower bounds
static int upper_bound = 15; // Supported domain version upper bounds
static int lower_bound = 8; // Supported domain version lower bounds

std::once_flag flag;

Expand Down Expand Up @@ -62,7 +61,7 @@ std::vector<NodeIndex> SupportONNXModel(const GraphViewer& graph_viewer) {
for (const auto& index : graph_viewer.GetNodesInTopologicalOrder()) {
const auto& node = graph_viewer.GetNode(index);

if (node->Domain() != kOnnxDomain || domain_version < lower_bound || domain_version > upper_bound ||
if (node->Domain() != kOnnxDomain || domain_version < lower_bound ||
!cann_supported_ops.count(node->OpType())) {
unsupported_nodes.push_back(index);
continue;
Expand Down

0 comments on commit 6acc47d

Please sign in to comment.