-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
[Pass][NNAdapter] Add scale_calc_offline_pass and bugfix of pad op #8298
[Pass][NNAdapter] Add scale_calc_offline_pass and bugfix of pad op #8298
Conversation
Thanks for your contribution! |
a4dbfa9
to
ac64dea
Compare
@@ -85,6 +85,8 @@ void InitializeGraphBuilder() { | |||
std::map<ge::AscendString, ge::AscendString> global_options; | |||
global_options.insert( | |||
std::make_pair(ge::ir_option::SOC_VERSION, soc_version)); | |||
global_options.insert(std::make_pair(ge::ir_option::OP_DEBUG_LEVEL, "0")); |
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.
这个会不会导致无法输出log了?
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.
不会。这个选项只是关联kernel_meta文件夹里会生成哪些文件
64c7e6c
to
d734d3a
Compare
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.
LGTM
e5d7386
to
b98b2ed
Compare
@@ -250,6 +252,8 @@ bool BuildOMModelToBuffer( | |||
} | |||
} | |||
ATC_CALL(aclgrphBuildModel(ir_graph, options, om_buffer)); | |||
// For debug: save ascend offline model to local. | |||
// ATC_CALL(aclgrphSaveModel("ir_graph_model", om_buffer)); |
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 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.
最好在context_properties加一个参数?
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.
下个PR加
…into add_scale_elimination_pass
@@ -85,6 +85,10 @@ void InitializeGraphBuilder() { | |||
std::map<ge::AscendString, ge::AscendString> global_options; | |||
global_options.insert( | |||
std::make_pair(ge::ir_option::SOC_VERSION, soc_version)); | |||
#if NNADAPTER_HUAWEI_ASCEND_NPU_CANN_VERSION_GREATER_THAN(5, 0, 3) |
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.
发现在5.0.3以下版本,使用这些选项会导致一些算子精度出现问题,原因不详。
@@ -250,6 +252,8 @@ bool BuildOMModelToBuffer( | |||
} | |||
} | |||
ATC_CALL(aclgrphBuildModel(ir_graph, options, om_buffer)); | |||
// For debug: save ascend offline model to local. | |||
// ATC_CALL(aclgrphSaveModel("ir_graph_model", om_buffer)); |
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.
最好在context_properties加一个参数?
lite/backends/nnadapter/nnadapter/driver/huawei_ascend_npu/converter/pad.cc
Show resolved
Hide resolved
…into add_scale_elimination_pass
…addlePaddle/Paddle-Lite into add_scale_elimination_pass
ff7d633
to
4a0e67c
Compare
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.
LGTM
No description provided.