-
Notifications
You must be signed in to change notification settings - Fork 680
Make _get_program_from_buffer work for bundled programs take 2 #14503
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
Add some cmake to only do this if executorch is built with bundleio. codegen/tools subdirectory needs to be moved in top-level CmakeLists.txt to have access to the bundled_program target. Signed-off-by: Erik Lundell <[email protected]> Change-Id: Ic953bdfd5223eb835e46150bde19b08b082e8444
Signed-off-by: Erik Lundell <[email protected]> Change-Id: Ib7fbdb7190312320d73a937bc285db7140d2bb1a
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/14503
Note: Links to docs will display an error until the docs builds have been completed. ❌ 5 New Failures, 2 Cancelled Jobs, 3 Unrelated FailuresAs of commit 390840c with merge base df5bfd5 ( NEW FAILURES - The following jobs have failed:
CANCELLED JOBS - The following jobs were cancelled. Please retry:
BROKEN TRUNK - The following jobs failed but were present on the merge base:👉 Rebase onto the `viable/strict` branch to avoid these failures
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
Merge should wait until #14488 to make sure Meta's internal build is not broken |
) | ||
|
||
# Link against required libraries | ||
if(TARGET bundled_program) |
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.
Should you check EXECUTORCH_BUILD_DEVTOOLS?
Something like
if (EXECUTORCH_BUILD_DEVTOOLS and TARGET bundled_program)
...
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 went with this since it is done that way on L754 in top-level CMakeLists.txt. Is there a benefit in additionally checking the flag or just to be on the safe side?
target_compile_definitions(selective_build PRIVATE -DET_BUNDLE_IO) | ||
target_link_libraries(selective_build PRIVATE bundled_program) |
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.
You also wanna change the targets.bzl file too
I added a CI to build buck target for selective_build
For future reference, here's how you can download buck:
python tools/cmake/resolve_buck.py --cache_dir==/tmp/
# it will download and output a buck executable file within /tmp/ file
Once you have the buck file, you can do something like this:
/tmp/buck2 build //codegen/tools/...
# build all targets within //codegen/tools/...
/tmp/buck2 build codegen/tools:selective_build
# build all targets
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 had a look and the bundled_program seems to have multiple targets runtime
and runtime_aten
, depending on some get_aten_mode_options(). I need some assistance to figure this out. From what I can tell, if I add the different targets to selective_build that target is also split which means that targets depending on it will also split and so on... That doesn't sound right.
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.
@Erik-Lundell -- no need to bifurcate on aten vs not. You can add dependency on "//executorch/devtools/bundled_program:runtime
Historically, runtime_aten
is mainly for internal customers when portable ops coverage was low. That's not the case, so you should be able to just depend on "//executorch/devtools/bundled_program:runtime
directly
@mergennachin has imported this pull request. If you are a Meta employee, you can view this in D83148788. |
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.
Looks good with internal CI as well. Stamping..
This is a re-upload of #14435, with variables moved inside #ifdef to not get unused variables when building without devtools.
Add some cmake to only do this if executorch is built with bundleio.
codegen/tools subdirectory include needs to be moved in top-level CmakeLists.txt
to have access to the bundled_program target.
Follow-up patch to enable the fix in arm backend.
cc @digantdesai @freddan80 @per @zingo @oscarandersson8218