Skip to content
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

Merged

Conversation

shentanyue
Copy link
Collaborator

No description provided.

@paddle-bot-old
Copy link

Thanks for your contribution!

@@ -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"));
Copy link
Collaborator

Choose a reason for hiding this comment

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

这个会不会导致无法输出log了?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

不会。这个选项只是关联kernel_meta文件夹里会生成哪些文件

hong19860320
hong19860320 previously approved these changes Jan 21, 2022
Copy link
Collaborator

@hong19860320 hong19860320 left a comment

Choose a reason for hiding this comment

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

LGTM

@CLAassistant
Copy link

CLAassistant commented Jan 24, 2022

CLA assistant check
All committers have signed the CLA.

@PaddlePaddle PaddlePaddle locked and limited conversation to collaborators Jan 24, 2022
@@ -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));
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

这里是有意留下的,以方便以后的调试。
不妥的话,删掉也行

Copy link
Collaborator

Choose a reason for hiding this comment

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

最好在context_properties加一个参数?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

下个PR加

@shentanyue shentanyue changed the title [Pass][NNAdapter] Add scale_calc_offline_pass and bug fix [Pass][NNAdapter] Add scale_calc_offline_pass and bug fix for pad op Jan 24, 2022
@shentanyue shentanyue changed the title [Pass][NNAdapter] Add scale_calc_offline_pass and bug fix for pad op [Pass][NNAdapter] Add scale_calc_offline_pass and bugfix of pad op Jan 24, 2022
@@ -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)
Copy link
Collaborator Author

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));
Copy link
Collaborator

Choose a reason for hiding this comment

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

最好在context_properties加一个参数?

Copy link
Collaborator

@hong19860320 hong19860320 left a comment

Choose a reason for hiding this comment

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

LGTM

@hong19860320 hong19860320 merged commit 7072339 into PaddlePaddle:develop Feb 9, 2022
@shentanyue shentanyue deleted the add_scale_elimination_pass branch February 9, 2022 10:42
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants