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

Improve cache usage on GHA for arm64 variants #4580

Open
rene opened this issue Feb 3, 2025 · 2 comments
Open

Improve cache usage on GHA for arm64 variants #4580

rene opened this issue Feb 3, 2025 · 2 comments
Labels
enhancement New feature or request

Comments

@rene
Copy link
Contributor

rene commented Feb 3, 2025

Use case

GH build action builds different arm64 platform variants: generic, nvidia-jp5 and nvidia-jp6. Each build generates its own cache. However, the vast majority of the packages are the same from those built for generic platform.

Describe the solution you'd like

The cache usage can be improved by sharing the cache from generic to other platforms builds.

@rene rene added the enhancement New feature or request label Feb 3, 2025
@rene
Copy link
Contributor Author

rene commented Feb 3, 2025

FYI: @yash-zededa , @deitch , @uncleDecart

@deitch
Copy link
Contributor

deitch commented Feb 5, 2025

@rene I am starting to question the approach. There are two reasons to build different matrix runs:

  • to coordinate the separate variants (i.e. having a matrix list)
  • because of different build architectures (better to build arm64 on arm64 rather than emulate on amd64, and vice-versa, where we can)

The second reason goes away with variants. For example, generic and jp5 and jp6 are variants, but all are for arm64. That leaves the only reason to use matrix as a way to ensure all variants get built. I think it normally would be equally valid to use GHA matrix or to use the Makefile, e.g. make pkgs is the default, equivalent to make pkgs PLATFORM=generic, which is different than make pkgs PLATFORM=nvidia-jp6. We equally keep the platforms list in GHA and do it in the matrix, as we could keep it in makefile and do make pkgs PLATFORM=all.

The issue you raise here indicates that it is not equal, specifically for CI, there are benefits to having the ability to do make pkgs PLATFORM=all.

I propose that we do one of the two following approaches, which are changes to our current. I am ok with either.

  1. Keep the list in the Makefile, instead of CI, and have CI do make pkgs PLATFORM=all (or similar), so the matrix is solely the 3 architectures
  2. Keep the list in the CI yaml, but instead of a separate matrix run per platform, return to separate run per architecture, and in each one, do a loop of make pkgs PLATFORM=${{ variant }}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants