-
-
Notifications
You must be signed in to change notification settings - Fork 636
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
call .freeze() instead of .build() in ipex launcher and add PEX_IPEX_…
…SKIP_EXECUTION env var (#10530) ### Problem The "ipex" execution method for pex files from #8793 wastes a lot of time zipping up the 3rdparty modules it just hydrated when it is first executed. This is unnecessary, as pex files can be executed as unzipped directories. ### Solution - Call `.freeze()` instead of `.build()` in `ipex_launcher.py`. - Add the capability to skip actually executing the pex after hydration if `PEX_IPEX_SKIP_EXECUTION` is set in the subprocess environment. ### Result On `1.25.x-twtr`: ```bash > ./pants binary.py --generate-ipex examples/src/python/example/tensorflow_custom_op:show-tf-version && \ time PEX_PROFILE_FILENAME=ipex.prof ./dist/show-tf-version.ipex ... 41.51s user 12.65s system 86% cpu 1:02.38 total ``` On this PR: ```bash > ./pants binary.py --generate-ipex examples/src/python/example/tensorflow_custom_op:show-tf-version && \ time PEX_PROFILE_FILENAME=ipex.prof ./dist/show-tf-version.ipex ... 16.29s user 8.48s system 77% cpu 32.000 total ```
- Loading branch information
1 parent
bf9afc2
commit de31c57
Showing
3 changed files
with
36 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters