-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Document JULIA_CPU_TARGET in environment-variables.md #50147
Conversation
Perhaps worth mentioning that this is of particular importance on heterogeneous systems? At the risk of being redundant, I feel this needs to be more visible, given how crucial this is to the user experience |
|
||
### `JULIA_CPU_TARGET` | ||
|
||
Modify the target machine architecture for (pre)compiling system and package images. See [`System image optimized for multiple microarchitectures`](@ref sysimg-multi-versioning) |
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 might also want to link to the pkgimage docs, but crucially these are currently in the dev-docs and we don;t have a good "user-level" section that talks about precompilation & caching.
cc: @timholy
I borrowed some additional text from https://github.com/mkitti/julia/blob/0a05a5b05d382bdf38da7fdd0c069dff8bdc072c/src/processor.cpp#L26-L80 I added an explict note for HPC systems and linked package images. |
@@ -376,6 +376,53 @@ should have at the terminal. | |||
The formatting `Base.answer_color()` (default: normal, `"\033[0m"`) that output | |||
should have at the terminal. | |||
|
|||
## System and Package Image Building |
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.
This is great! Thank you. My only comment is that it is odd to place it in the environment-variables section.
Maybe a better place would be under https://docs.julialang.org/en/v1.10-dev/manual/code-loading/?
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.
We do need a reference in the Environment Variables section for JULIA_CPU_TARGET
though, so I guess the question is where should the details go. I initially started with a few minimal notes here and then expanded.
Here I've tried to focus primarily on what does the environment variable does and what are the valid settings for it.
In what I copied, I specifically omitted this part of the comments that deal with loading and dispatch:
https://github.com/mkitti/julia/blob/0a05a5b05d382bdf38da7fdd0c069dff8bdc072c/src/processor.cpp#L31-L54
I think a dicussion of that part should go into code loading... or perhaps a new section called "code generation".
In this pull request, I would like to focus on documenting the environment variable. If there are too many details here, I would be happy to edit it down.
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.
@simonbyrne , where you would expect to find this documentation?
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 it be in code loading, with a link in environment variables - or the other way around? I do feel it is good to have either fully or as a link in the env variables section.
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.
If it pertains the value of JULIA_CPU_TARGET
it should be documented here.
A detailed discussion of code loading can be expanded in a separate section.
I think this pull request should focus on the environment variable section. I think another pull request by someone with a better understanding of code loading would be appropriate, but I would be willing to take a shot at it. I'm largely unfamiliar with the post 1.9 changes to loading.
My current sense is that we may want to edit the text here down, but it is otherwise accurate and good to merge. We may even want to backport it because people need this documentation of the JULIA_CPU_TARGET
to deploy Julia 1.9 on HPC clusters today.
@vchuravy Ok to merge? |
Document
JULIA_CPU_TARGET
in the Environment Variables section.https://docs.julialang.org/en/v1/manual/environment-variables/#Environment-Variables