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

[VL][CI] Use cached Velox build binary to accelerate GHA workflow #7474

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

PHILO-HE
Copy link
Contributor

@PHILO-HE PHILO-HE commented Oct 11, 2024

What changes were proposed in this pull request?

In the current main code, libgluten.so and libvelox.so are cached. If the cache is hit (depending on the hashing result on some directories including gluten/cpp), they can be re-used to accelerate workflow. However, any code change for gluten/cpp in a pr will make the cache missed. Then, needs to re-build Velox code, which is quite time-consuming.

This pr makes Velox build binary cached. If cache is hit, directly let the workflow build Gluten CPP, which only requires few minutes. Otherwise, re-build Velox code.

For Gluten CI's static build that build_test/benchmark are not enabled, we only need to cache libvelox.a. For Gluten CI's dynamic build that build_test/benchamrk are enabled, building Gluten cpp needs some other velox libs, like libdbgen.a, and one extra generated header, so we just cache the whole velox build path.

How was this patch tested?

CI.

Copy link

Thanks for opening a pull request!

Could you open an issue for this pull request on Github Issues?

https://github.com/apache/incubator-gluten/issues

Then could you also rename commit message and pull request title in the following format?

[GLUTEN-${ISSUES_ID}][COMPONENT]feat/fix: ${detailed message}

See also:

steps:
- uses: actions/checkout@v2
- name: Generate cache key
run: |
echo ${{ hashFiles('./ep/build-velox/src/**', './dev/**', './cpp/*', './.github/workflows/*') }} > cache-key
echo ${{ hashFiles('./ep/build-velox/src/**', './dev/**', './.github/workflows/velox_backend.yml') }} > cache-key
Copy link
Member

@zhztheplayer zhztheplayer Oct 11, 2024

Choose a reason for hiding this comment

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

./ep/build-velox/src/**

I think we could change our OAP Velox dependency from branches to tags while landing this PR. Branches can be updated without invalidating the new cache.

Edit: Similar issue already existed even with current cache policy. It's fine till now so no need to put to high priority.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@zhztheplayer, yes, this is a potential issue. But before a velox rebase branch is finalized, we may still need oap/velox to hold it as a branch that allows updating (e.g., needs some fixes due to Gluten CI failure). So maybe, we should just have a internal convention to forbid updating oap/velox branch once it is already referenced by Gluten code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants