-
Notifications
You must be signed in to change notification settings - Fork 25.2k
[Mobile] Fix The Build For Model Tracer #84755
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
Summary: Currently, the model tracer build is broken because of 2 reasons: 1. A few source files are missing, resulting in missing link time symbols 2. The `TRACING_BASED` flag isn't passed correctly from the command line (specified as an evnironment variable) as a CMake flag Both these issues were fixed. Test Plan: Ran this command: `USE_CUDA=0 TRACING_BASED=1 python setup.py develop --cmake` and saw that the tracer binary was built at `build/bin/model_tracer` - also ran it to ensure that it can generate a YAML file. [ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/84755
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 8b3a01c: This comment was automatically generated by Dr. CI and updates every 15 minutes. |
Summary: Currently, the model tracer build is broken because of 2 reasons: 1. A few source files are missing, resulting in missing link time symbols 2. The `TRACING_BASED` flag isn't passed correctly from the command line (specified as an evnironment variable) as a CMake flag Both these issues were fixed. Test Plan: Ran this command: `USE_CUDA=0 TRACING_BASED=1 python setup.py develop --cmake` and saw that the tracer binary was built at `build/bin/model_tracer` - also ran it to ensure that it can generate a YAML file. ghstack-source-id: c7481f8 Pull Request resolved: #84755
message(STATUS "Tracing Based Flag: ${TRACING_BASED}") | ||
message(STATUS "Build Lite Interpreter Flag: ${BUILD_LITE_INTERPRETER}") | ||
message(STATUS "Intern Build Mobile Flag: ${INTERN_BUILD_MOBILE}") |
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.
Delete debugging code
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.
I saw a bunch of places in existing that print the relevant flags where they are used as STATUS
, so I wanted to keep there here - do you think that's okay?
@@ -230,6 +230,7 @@ def generate( | |||
"OPENSSL_ROOT_DIR", | |||
"STATIC_DISPATCH_BACKEND", | |||
"SELECTED_OP_LIST", | |||
"TRACING_BASED", |
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.
Nice finding!
@dhruvbird has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
@pytorchbot merge |
@pytorchbot successfully started a merge job. Check the current status here. |
Hey @dhruvbird. |
…ake/Summary.cmake Summary: In [PR 84755](#84755), @cccclai noticed and mentioned the presence of `message(STATUS...)` logging in caffe2/CMakeLists.txt and suggested moving it to the file cmake/Summary.cmake. This PR addresses that comment/suggestion. Test Plan: Ran the build as `USE_NUMPY=0 USE_DISTRIBUTED=0 USE_CUDA=0 TRACING_BASED=1 python setup.py develop` and saw the follwing being printed: ``` -- BUILD_MOBILE_AUTOGRAD : OFF -- BUILD_LITE_INTERPRETER: OFF -- INTERN_BUILD_MOBILE : -- TRACING_BASED : 1 ``` [ghstack-poisoned]
…ists.txt with message in cmake/Summary.cmake" Summary: In [PR 84755](#84755), cccclai noticed and mentioned the presence of `message(STATUS...)` logging in caffe2/CMakeLists.txt and suggested moving it to the file cmake/Summary.cmake. This PR addresses that comment/suggestion. Test Plan: Ran the build as `USE_NUMPY=0 USE_DISTRIBUTED=0 USE_CUDA=0 TRACING_BASED=1 python setup.py develop` and saw the follwing being printed: ``` -- BUILD_MOBILE_AUTOGRAD : OFF -- BUILD_LITE_INTERPRETER: OFF -- INTERN_BUILD_MOBILE : -- TRACING_BASED : 1 ``` [ghstack-poisoned]
…ake/Summary.cmake Summary: In [PR 84755](#84755), cccclai noticed and mentioned the presence of `message(STATUS...)` logging in caffe2/CMakeLists.txt and suggested moving it to the file cmake/Summary.cmake. This PR addresses that comment/suggestion. Test Plan: Ran the build as `USE_NUMPY=0 USE_DISTRIBUTED=0 USE_CUDA=0 TRACING_BASED=1 python setup.py develop` and saw the follwing being printed: ``` -- BUILD_MOBILE_AUTOGRAD : OFF -- BUILD_LITE_INTERPRETER: OFF -- INTERN_BUILD_MOBILE : -- TRACING_BASED : 1 ``` ghstack-source-id: 006743b Pull Request resolved: #84814
…ssage in cmake/Summary.cmake" Summary: In [PR 84755](#84755), cccclai noticed and mentioned the presence of `message(STATUS...)` logging in caffe2/CMakeLists.txt and suggested moving it to the file cmake/Summary.cmake. This PR addresses that comment/suggestion. Test Plan: Ran the build as `USE_NUMPY=0 USE_DISTRIBUTED=0 USE_CUDA=0 TRACING_BASED=1 python setup.py develop` and saw the follwing being printed: ``` -- BUILD_MOBILE_AUTOGRAD : OFF -- BUILD_LITE_INTERPRETER: OFF -- INTERN_BUILD_MOBILE : -- TRACING_BASED : 1 ``` [ghstack-poisoned]
…ists.txt with message in cmake/Summary.cmake" Summary: In [PR 84755](#84755), cccclai noticed and mentioned the presence of `message(STATUS...)` logging in caffe2/CMakeLists.txt and suggested moving it to the file cmake/Summary.cmake. This PR addresses that comment/suggestion. Test Plan: Ran the build as `USE_NUMPY=0 USE_DISTRIBUTED=0 USE_CUDA=0 TRACING_BASED=1 python setup.py develop` and saw the follwing being printed: ``` -- BUILD_MOBILE_AUTOGRAD : OFF -- BUILD_LITE_INTERPRETER: OFF -- INTERN_BUILD_MOBILE : -- TRACING_BASED : 1 ``` [ghstack-poisoned]
…ssage in cmake/Summary.cmake" Summary: In [PR 84755](#84755), cccclai noticed and mentioned the presence of `message(STATUS...)` logging in caffe2/CMakeLists.txt and suggested moving it to the file cmake/Summary.cmake. This PR addresses that comment/suggestion. Test Plan: Ran the build as `USE_NUMPY=0 USE_DISTRIBUTED=0 USE_CUDA=0 TRACING_BASED=1 python setup.py develop` and saw the follwing being printed: ``` -- BUILD_MOBILE_AUTOGRAD : OFF -- BUILD_LITE_INTERPRETER: OFF -- INTERN_BUILD_MOBILE : -- TRACING_BASED : 1 ``` [ghstack-poisoned]
Summary: Currently, the model tracer build is broken because of 2 reasons: 1. A few source files are missing, resulting in missing link time symbols 2. The `TRACING_BASED` flag isn't passed correctly from the command line (specified as an evnironment variable) as a CMake flag Both these issues were fixed. Pull Request resolved: #84755 Approved by: https://github.com/cccclai Test Plan: contbuild & OSS CI, see https://hud.pytorch.org/commit/pytorch/pytorch/18a31cc0448f226f4c2dd9926d24aaef86409f1c Test plan from GitHub: Ran this command: `USE_CUDA=0 TRACING_BASED=1 python setup.py develop --cmake` and saw that the tracer binary was built at `build/bin/model_tracer` - also ran it to ensure that it can generate a YAML file. Original Phabricator Test Plan: Ran this command: `USE_CUDA=0 TRACING_BASED=1 python setup.py develop --cmake` and saw that the tracer binary was built at `build/bin/model_tracer` - also ran it to ensure that it can generate a YAML file. Reviewed By: izaitsevfb, cccclai Differential Revision: D39391270 Pulled By: dhruvbird fbshipit-source-id: ff33f78b314a6fce96f4b9a99248815c251e0453
…ake/Summary.cmake (#84814) Summary: In [PR 84755](#84755), @cccclai noticed and mentioned the presence of `message(STATUS...)` logging in caffe2/CMakeLists.txt and suggested moving it to the file cmake/Summary.cmake. This PR addresses that comment/suggestion. Test Plan: Ran the build as `USE_NUMPY=0 USE_DISTRIBUTED=0 USE_CUDA=0 TRACING_BASED=1 python setup.py develop` and saw the follwing being printed: ``` -- BUILD_MOBILE_AUTOGRAD : OFF -- BUILD_LITE_INTERPRETER: OFF -- INTERN_BUILD_MOBILE : -- TRACING_BASED : 1 ``` Pull Request resolved: #84814 Approved by: https://github.com/cccclai
…ake/Summary.cmake Summary: In [PR 84755](pytorch/pytorch#84755), cccclai noticed and mentioned the presence of `message(STATUS...)` logging in caffe2/CMakeLists.txt and suggested moving it to the file cmake/Summary.cmake. This PR addresses that comment/suggestion. Test Plan: Ran the build as `USE_NUMPY=0 USE_DISTRIBUTED=0 USE_CUDA=0 TRACING_BASED=1 python setup.py develop` and saw the follwing being printed: ``` -- BUILD_MOBILE_AUTOGRAD : OFF -- BUILD_LITE_INTERPRETER: OFF -- INTERN_BUILD_MOBILE : -- TRACING_BASED : 1 ``` ghstack-source-id: 2d49f53 Pull Request resolved: pytorch/pytorch#84814
Pull Request resolved: pytorch/pytorch#84755 Currently, the model tracer build is broken because of 2 reasons: 1. A few source files are missing, resulting in missing link time symbols 2. The `TRACING_BASED` flag isn't passed correctly from the command line (specified as an evnironment variable) as a CMake flag Both these issues were fixed. Differential Revision: [D39391270](https://our.internmc.facebook.com/intern/diff/D39391270/) **NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D39391270/)! ghstack-source-id: 166946891
Stack from ghstack (oldest at bottom):
Summary: Currently, the model tracer build is broken because of 2 reasons:
TRACING_BASED
flag isn't passed correctly from the command line (specified as an evnironment variable) as a CMake flagBoth these issues were fixed.
Test Plan: Ran this command:
USE_CUDA=0 TRACING_BASED=1 python setup.py develop --cmake
and saw that the tracer binary was built at
build/bin/model_tracer
- also ran it to ensure that it can generate a YAML file.Differential Revision: D39391270