Skip to content
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

Merged
merged 5 commits into from
Jun 23, 2023

Conversation

mkitti
Copy link
Contributor

@mkitti mkitti commented Jun 12, 2023

Document JULIA_CPU_TARGET in the Environment Variables section.

https://docs.julialang.org/en/v1/manual/environment-variables/#Environment-Variables

@jishnub
Copy link
Contributor

jishnub commented Jun 13, 2023

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)
Copy link
Sponsor Member

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

@mkitti
Copy link
Contributor Author

mkitti commented Jun 14, 2023

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.

@ViralBShah ViralBShah added the domain:docs This change adds or pertains to documentation label Jun 14, 2023
@@ -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
Copy link
Sponsor Member

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/?

Copy link
Contributor Author

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.

Copy link
Contributor Author

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?

Copy link
Member

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.

Copy link
Contributor Author

@mkitti mkitti Jun 23, 2023

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 vchuravy added this to the 1.10 milestone Jun 14, 2023
@ViralBShah
Copy link
Member

@vchuravy Ok to merge?

@vchuravy vchuravy merged commit 85f19de into JuliaLang:master Jun 23, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain:docs This change adds or pertains to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants