-
Notifications
You must be signed in to change notification settings - Fork 2
Bugfix stack.py to re-enable ./xla checkout, +improvements #112
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
Ruturaj4
left a comment
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.
LGTM
| /jax | ||
|
|
||
| # temporary working files | ||
| /_my |
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.
what generates this _my folder?
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.
Nothing generates it, I just use it for work scripts and tired of adding it to a local .gitignore on each new checkout.
It's good to have a dedicated dir for such stuff, dumps and whatnot...
| # pylint: disable=line-too-long | ||
| assert os.path.isdir( | ||
| kernels_jax_path | ||
| ), f"XLA path (specified as '{kernels_jax_dir}') doesn't resolve to existing directory at '{kernels_jax_path}'" |
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 am confused about this "kernels_jax_dir" variable. Could you please put detailed explanation for this one?
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.
kernels_jax_dir is the var created by Charles in his previous PR. Essentially it's a directory for the JAX parts, such as kernels, that are needed for pjrt & plugin compilation. It might and might not coincide with ./jax tests directory. Before Charles's PR ./jax was just an independent test storage, and kernels were always taken from the upsteam jax-ml/jax. In his PR, he added an override to always use ./jax (more properly the value of --kernel-jax-dir argument if is set) instead of the upstream, so it's finally used to build pjrt&plugin where it's needed. Now, the upstream jax-ml/jax is used only if --kernel-jax-dir argument is explicitly set to an empty string.
kernels_jax_path is just an abspath(kernels_jax_dir). Absolute paths are mandatory to make debug info remapping work properly.
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 understand, thanks for the detailed explanation!
Co-authored-by: Gulsum Gudukbay Akbulut <[email protected]>
gulsumgudukbay
left a comment
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!
| python3 ./build/build.py build \ | ||
| --use_clang=true \ | ||
| --wheels=jax-rocm-plugin \ | ||
| --target_cpu_features=native \ |
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.
Good idea!
Motivation
bd2fab3 introduced a regression that disabled checking out
./xladirectory by default. This PR fixes it.Additionally the PR:
--target_cpu_features=nativetobuild/build.pycalls in the Makefile to produce more optimal dev build fasterXLA_OVERRIDE_OPTIONmakefile variable to a more genericALL_BAZEL_OPTIONSto better reflect the scope and the purpose of the variable.refreshandrefresh_jaxlibrules as shortcuts to correspongingclean dist installrules.--fix-bazel-symbolsoption tostack.py. This lets the script assumes you need to build code in a release with symbolic info configuration to alleviate debugging. The script enables respective bazel options and adds./externalsymbolic links to corresponding workspaces pointing to bazel's dependencies storage.