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

Submission/spack blog #64

Open
wants to merge 9 commits into
base: release
Choose a base branch
from

Conversation

garrettbyrd
Copy link

This blog outlines how to install ROCm + PyTorch using the Spack package manager. This is part of an effort to better provide resources for building the ROCm stack from source, since there are a number of open issues related to building from source. Authors are myself and @fluidnumerics-joe.

I've done my best to accommodate the metadata standards, but a review on these materials would be appreciated. If possible, AMD should provide a thumbnail to stay consistent with branding; else, I can provide one this week.

I have been in touch with AMD internal for this, let me know if anyone/who needs to be included in an email chain.

Related issues

The dependency matrix provided in this post should address Saad's issue regarding a ROCm dependency tree. I will be providing more context directly in that issue:

I have opened a few issues directly related to some talking points in this blog. It may or may not be useful to address some of these before publication.

(I was going to mention this one as well, but Kent provided a very clear, very fast reply.)

Other relevant open issues

PR Checklist

Signoff section must be completed prior to publishing.

  • Technical reviewer approves publishing: (edit and replace with @githubid)
  • Editorial team approved publishing: (edit and replace with @githubid)
  • Add a thumbnail image for your blog if one is available
  • Text nugget summarizing your article. 2-3 lines to draw the reader's attention. Possibly the opening paragraph can be used.
  • Blog author team signoffs

@saadrahim
Copy link
Member

Don't worry about the meta data. We are transitioning to a new system and don't expect external contributors to have to navigate it. An editor will correct them for you.

Copy link
Member

@saadrahim saadrahim left a comment

Choose a reason for hiding this comment

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

Thanks for the blog. I took a quick look through. Really appreciate the contribution and will work to get this out. I am off next week but will leave the additional approvals to the editorial team.

@saadrahim
Copy link
Member

saadrahim commented Mar 26, 2025

In case you are not aware, you can take a look at a preview of your blog via the github checks. Here is the link for convenience.


### ROCm Component Dependencies

Spack is useful as a from-source package manager; as such, it also serves as a great system for understanding the dependencies of the ROCm stack. The following graphic has been generated using the outputs of `spack spec <package>`.

Choose a reason for hiding this comment

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

Have you seen https://github.com/ROCm/ROCm/blob/develop/tools/rocm-build/ROCm.mk
This is the dependency matrix in Makefile form used by the internal CI.

Copy link
Author

Choose a reason for hiding this comment

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

I had not seen this, this is definitely useful for handling dependencies within the ROCm stack. I suppose the advantages that Spack brings are that 1. the verbosity of spack spec provides clarity of dependencies beyond the ROCm stack and 2. this allows one to derive ROCm dependencies for non-ROCm software, e.g. PyTorch. I have no doubt a similar graphic could be generated from the Makefile, but then connections to external packages are lost.

Regardless, I have reworded this section to better reflect why Spack is useful in this case.

Choose a reason for hiding this comment

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

Is the ROCm.mk file something that is really digestible by a typical ROCm user to understand dependencies between ROCm packages ? While it seems like a great tool for internal CI, what about end users who are asking about how to build ROCm from source ?

Choose a reason for hiding this comment

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

There are published instructions for building ROCm from source, in the same way that the internal CI does it. Essentially (i.e. I am skipping over some details, arguements to commands ... ) the steps are

  1. repo init # Pull a manifest describing the commits which make up ROCm.
  2. repo sync # Pull the actual code
  3. docker run -p $PWD:/src $container make -f /src/ROCm/tools/rocm,-build/ROCm.mk -j 50 # Do the build

It is not required to use dockerr, it is just a nice way to get a controlled build environment with all needed tools installed..

This is not to say that this way is better or worse than using spack, it is just different.

Choose a reason for hiding this comment

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

@amd-isparry - Wild. So, there's "TheRock", ROCm.mk makefile (docker-centric), and spack.

Choose a reason for hiding this comment

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

@garrettbyrd - do we call out specifically the benefit of being able to install select packages from ROCm for specific use cases, e.g., pytorch does not require all ROCm packages.

Copy link
Author

Choose a reason for hiding this comment

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

@fluidnumerics-joe Yes, this line pushes that point.

... Although mivisionx comes packaged with ROCm by default, many ROCm components do not require this component. This underscores the utility of selective component installation via Spack.

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