-
Notifications
You must be signed in to change notification settings - Fork 35
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
[libshortfin] Build debug/asan #149
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. Left a number of comments but if it passes like this fine to land and iterate.
pyenv global ${{ env.PYTHON_VER }}-debug | ||
pyenv local ${{ env.PYTHON_VER }}-debug | ||
pyenv shell ${{ env.PYTHON_VER }}-debug | ||
pip install nanobind |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should add this to requirements.txt and pin it (to 2.0). This can/has broken before and will poison the cache.
(should also add the requirements.txt and requirements-tests.txt hashes to the pyenv hash if installing these packages as part of the pyenv build)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added the the dependency to the requirements-tests.txt
and pinned the version to 2.0.0
. As it also specified as a build-system dep with line
https://github.com/nod-ai/sharktank/blob/b1d09dbf1496949929c9aaf11f3cd9c551975958/libshortfin/pyproject.toml#L6
nanobind
version 2.1.0
is installed when executing pip install -v -e.
later. Should this be pinned to 2.0.0
as well?
Based on the work you've reviewed so far, I further improved caching. Instead of adding hashes for the requirements.txt files to the pyenv/python build step, I added an additional cache on top to cache the dependencies. Assuming that the dependencies are changing more rapidly, this will reduce the build time of the cache. The step to install and cache the dependencies takes about 60s whereas building pyenv/python takes ~ 5m 45s.
This adds a GitHub action to build a debug/asan version of libshortfin. Shallow cloning of dependencies obtained via FetchContent is reverted as the dependencies cannot be fetched in the CI.
Thanks for the review and the suggestions @stellaraccident. With commit 7e7b77e, the ASan build fails but it succeeds without the commit, see for example run https://github.com/marbre/sharktank/actions/runs/10560961944/job/29255953907. As it is not passing for main, please re-approve if you want me to land it. |
This adds a GitHub action to build a debug/asan version of libshortfin. Shallow cloning of dependencies obtained via FetchContent is reverted as the dependencies cannot be fetched in the CI.
Depends on #148