Skip to content

[tools/onnx-subgraph] add onnx inference verification code#14745

Merged
seanshpark merged 4 commits into
Samsung:masterfrom
chenyx113:onnx-subgraph-0225
Feb 26, 2025
Merged

[tools/onnx-subgraph] add onnx inference verification code#14745
seanshpark merged 4 commits into
Samsung:masterfrom
chenyx113:onnx-subgraph-0225

Conversation

@chenyx113

Copy link
Copy Markdown
Contributor

related issue: #14534
historical full changes PR: #14613

add single onnx inference code for verification, sub models inference code will be submitted in next PR

ONE-DCO-1.0-Signed-off-by: Youxin Chen yx113.chen@samsung.com

add single onnx inference code for verification, submodel inference code
will be submitted in next PR

ONE-DCO-1.0-Signed-off-by: Youxin Chen <yx113.chen@samsung.com>
@chenyx113 chenyx113 marked this pull request as ready for review February 25, 2025 12:40
Comment thread tools/onnx_subgraph/CMakeLists.txt Outdated
include_directories(${Python3_INCLUDE_DIRS})

set(ONNX_SUBGRAPH_FILES
set(ONNX_SUBGRAPH_FILES

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

plz split this space deletion, that doesn't seem to be related to this commit, to another PR.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

plz split this space deletion, that doesn't seem to be related to this commit, to another PR.

when I add single_vs_multiple_onnx.py to CMakeLists in line 21, I found there are some white blanks nearby, so I removed them, can you please consider it as the related updating of line 21? thank you :)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Plz post to another PR.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, I recovered it now, thank you

Comment on lines +31 to +33
Subgraphsiostxt_path is a txt file that describes the structure of the model graph and is used to get input/output node names.
The model_path contains paths to multiple onnx files.
The load_sessions function will sort the onnx models in the model_path according to the order specified in subgraphsiostxt_path.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

above two line seems to exceed 100 cols. plz split lines.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, I update it now, thank you :)

split long lines to short lines
recover no related updating

# Default input data dictionary
default_input_data = {
"x": np.random.rand(1, 3, 256, 256).astype(np.float32),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Q) input has fixed shape and data type. if the input model requires differnt parameters, can this be valid ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, you are right, actually, I am considering to have dynamic adaptive input according to onnx input shape, it needs more code, I will post this code in next PR

@seanshpark seanshpark left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@seanshpark seanshpark merged commit 1db21d1 into Samsung:master Feb 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants