Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@mrodden
Copy link
Contributor

@mrodden mrodden commented May 13, 2025

Updated README on how to set up environment and also added the scripts it refers to.

Copy link
Collaborator

@charleshofer charleshofer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks pretty good. Mostly minor cleanup stuff.


# install a rocm
info "Installing ROCm"
python build/tools/get_rocm.py --rocm-version 6.4.0 || die "error while installing rocm"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably fine to leave this hardcoded for now, but eventually we should figure out a way to make the ROCm version and the Python version configurable from the stacks.py script. Maybe we want to stick the supported ROCm versions in a file somewhere and make that declarative, and limit users to one of those options?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I expect there will be a lot of changes here but I wanted to keep is simple for now.

I was experimenting with how to run this inside the docker start/run with entrypoint and that kind of works but not really, and I wasn't sure how to pass the version info in yet.

It should be easy to pass all this as parameters when we need to.

}

install_clang() {
[[ -e /usr/lib/llvm-18/bin/clang ]] && return
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to check for a clang in the PATH as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually this clang doesn't seem to get added to PATH from my testing which made me do this instead.

Currently this is a fast path catch to see if we already installed clang-18 from the block we are entering and skips it. I expect it will change when we change the clang install below, which we probably will because using a packaged version would be faster. I just didn't want to solve that that problem yet.



XLA_DEV_BRANCH = "rocm-jaxlib-v0.5.0"
MAKE_TEMPLATE = r"""
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the reason for sticking the template here rather than leaving the file where it was and setting the clang path via environment variables?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh yeah, in my head I was going to be injecting a lot more so I figured it would be good to just template it out for now.

Using env var injection isn't a bad idea either. I'd like to be able to detect the gfxNNN for the current system and inject that too which could easily be done with env var as well. I'll think about it, but for now I just wanted to keep it simple.

JehandadKhan
JehandadKhan previously approved these changes May 14, 2025
@JehandadKhan JehandadKhan dismissed their stale review May 14, 2025 17:06

Second thoughts ;)

@JehandadKhan
Copy link
Collaborator

The build docker script compiles all of LLVM, can we avoid that ?
The same script needs to be configurable to get a certain ROCm version as well as pre-released ROCm versions.
The setup script misses to install patchelf

mrodden added 2 commits May 14, 2025 14:13
Updated README on how to set up environment and
also added the scripts it refers to.
@mrodden mrodden force-pushed the add-setup-tools branch from cacac28 to 4043e83 Compare May 14, 2025 19:14
@mrodden mrodden requested a review from charleshofer May 14, 2025 19:47
@mrodden mrodden merged commit 1901103 into master May 14, 2025
@mrodden mrodden deleted the add-setup-tools branch May 14, 2025 20:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants