-
Notifications
You must be signed in to change notification settings - Fork 25.7k
Fix too big to optimize in test, actually use O0 when aot_inductor.compile_wrapper_with_O0 is set #148714
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
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/148714
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit b20b51c with merge base 1e37e5b ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This pull request was exported from Phabricator. Differential Revision: D70670957 |
This pull request was exported from Phabricator. Differential Revision: D70670957 |
8e4ed93
to
6b0506c
Compare
…mpile_wrapper_with_O0 is set (pytorch#148714) Summary: 1. the '\0' char cannot be properly recognized. Change to use '0' instead. 2. We got the following error when using anything other than O0 flag: `error: Function ZN5torch12aot_inductorL22__check_inputs_outputsEPP16AtenTensorOpaqueS3 is too big to optimize [-Werror,-Wignored-optimization-argument]` So we use O0 flag in wrapper code when `aot_inductor.compile_wrapper_with_O0` is set Test Plan: ``` buck run 'fbcode//mode/opt' fbcode//deeplearning/aot_inductor/cpu/test:ads_second_stage_dsnn_models_aoti_lowering_test -- -r AdsSecondStageDSNNModelsAOTILoweringTest ``` Differential Revision: D70670957
6b0506c
to
f56e5d6
Compare
This pull request was exported from Phabricator. Differential Revision: D70670957 |
""" | ||
bool _check_aoti_runtime_check_inputs_env() { | ||
const static char* env_var_value = getenv("AOTI_RUNTIME_CHECK_INPUTS"); | ||
const static bool result = env_var_value != nullptr && env_var_value[0] != '\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.
Is just escaping the backslash with a double backslash the proper fix?
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.
@Skylion007 I intend to check if it's a 0, not checking against the null character. The original code was wrong. I guess the PR summary was misleading, I updated it now.
The second bullet of your PR description is also stale. Please update. |
…mpile_wrapper_with_O0 is set (pytorch#148714) Summary: 1. Check against the "0" char instead 2. We got the following error when using anything other than O0 flag: `error: Function ZN5torch12aot_inductorL22__check_inputs_outputsEPP16AtenTensorOpaqueS3 is too big to optimize [-Werror,-Wignored-optimization-argument]` So we use O0 flag in wrapper code when `aot_inductor.compile_wrapper_opt_level` is set to `O0`. Test Plan: ``` buck run 'fbcode//mode/opt' fbcode//deeplearning/aot_inductor/cpu/test:ads_second_stage_dsnn_models_aoti_lowering_test -- -r AdsSecondStageDSNNModelsAOTILoweringTest ``` Reviewed By: desertfire Differential Revision: D70670957
f56e5d6
to
b20b51c
Compare
This pull request was exported from Phabricator. Differential Revision: D70670957 |
@pytorchbot merge (Initiating merge automatically since Phabricator Diff has merged) |
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Summary:
Check against the "0" char instead
We got the following error when using anything other than O0 flag:
error: Function ZN5torch12aot_inductorL22__check_inputs_outputsEPP16AtenTensorOpaqueS3 is too big to optimize [-Werror,-Wignored-optimization-argument]
So we use O0 flag in wrapper code whenaot_inductor.compile_wrapper_opt_level
is set toO0
.Test Plan:
Differential Revision: D70670957
cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @ipiszy @yf225 @chenyang78 @kadeng @muchulee8 @amjames @chauhang @aakhundov