-
Notifications
You must be signed in to change notification settings - Fork 159
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add onnx-subgraph tool baseline code #14563
Conversation
As I know, this is your full changes as a Draft PR, so changed to DRAFT. |
some file names start with lower case and some with upper case. please use one convention. |
# cmake version dependency | ||
cmake_minimum_required(VERSION 3.10) | ||
SET(CMAKE_BUILD_TYPE "Debug") | ||
SET(CMAKE_CXX_FLAGS_DEBUG "$ENV{CXXFLAGS} -O0 -Wall -g2 -ggdb") | ||
SET(CMAKE_CXX_FLAGS_RELEASE "$ENV{CXXFLAGS} -O3 -Wall") | ||
SET(CMAKE_CXX_STANDARD 17) | ||
|
||
project(onnx-subgraph-parser) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# cmake version dependency | |
cmake_minimum_required(VERSION 3.10) | |
SET(CMAKE_BUILD_TYPE "Debug") | |
SET(CMAKE_CXX_FLAGS_DEBUG "$ENV{CXXFLAGS} -O0 -Wall -g2 -ggdb") | |
SET(CMAKE_CXX_FLAGS_RELEASE "$ENV{CXXFLAGS} -O3 -Wall") | |
SET(CMAKE_CXX_STANDARD 17) | |
project(onnx-subgraph-parser) |
@@ -0,0 +1,48 @@ | |||
## onnx_autosubgraphs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
plz take look look at other modules README file and follow the convention.
@@ -0,0 +1,48 @@ | |||
## onnx_autosubgraphs | |||
in this project, we can support onnx AI model auto subgraph, the AI model can be splitted by model size, operators etc, it help much for on-device AI acceleration, and has been verified on Rose-P NPU and Qualcomm DSP. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
plz split lines with width > 100
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMHO, you shouldn't use internal code name!
|
||
# Copyright (c) 2024 Samsung Electronics Co., Ltd. All Rights Reserved | ||
|
||
# | ||
|
||
# Licensed under the Apache License, Version 2.0 (the "License"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there are unnecessary empty lines.
please remove them like
# Copyright (c) 2024 Samsung Electronics Co., Ltd. All Rights Reserved | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# Copyright (c) 2024 Samsung Electronics Co., Ltd. All Rights Reserved | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); |
@@ -0,0 +1,76 @@ | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
plz put source files into src
folder.
plz run |
2. mkdir build & cd build | ||
3. cmake .. & make |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we don't allow building separate building in compiler/*
modules
all compiler modules are built from infra/nncc/CMakeLists.txt
have you not read docs/howto/how-to-build-compiler.md
?
1. edit the config.json as your needs | ||
-> NPU_supported_ops mean operators that can be supported by NPU | ||
-> CPU_supported_ops mean operators that can be supported by CPU |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any examples files that I can check with?
@@ -0,0 +1,48 @@ | |||
## onnx_autosubgraphs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems we have similar tool already with circle model, not ONNX.
But I think you can refer compiler/circle-partitioner/README.md file for explaining what and how to use the tool.
thinking about this tool and maintenance,
I am gradually thinking 2) case looks better. @chenyx113 and others, what do you guys think? Anyway, we haven't done it in the past, but in the future, we can relocate any |
@seanshpark BR |
update the code according to comments, and change path from 'compiler' to 'tool', thanks for the kindly review and suggestions |
related issue of: #14534
we have reported the progress status in internal discussion
please help review, any suggestions is appreciated.
Thanks & BR