- Notifications
You must be signed in to change notification settings - Fork886
feat: add first draft of kernel builder tutorial#2971
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Note that the `devShell` name above can be deciphered as: | ||
```nix | ||
nix develop .#devShells.torch27-cxx11-cu118-x86_64-linux |
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.
Small nit: 11.8 support is gone in Torch 2.8 (out next month), so it's probably better to use126
in the example, since it's an option for both 2.7 and 2.8.
```bash | ||
mkdir -p build | ||
cp -r --dereference ./result/* 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 recommend:
cp -r --dereference ./result/* build | |
rsync -av --deleteresult/ build/ | |
chmod -R u+w build |
--delete
makes sure that old ops dylibs are removed. With a normalcp
, a lot of different ops could accidentally linger around because they have unique suffixes, the new version doesn't overwrite the old. And the output is read-only because it comes from the Nix store, which can be annoying (there might also be an rsync flag to do it in one step).
git checkout -b main | ||
# Update to use LFS for the binary files | ||
echo "*.so filter=lfs diff=lfs merge=lfs -text" >> .gitattributes |
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 think the recommended way is:
echo "*.so filter=lfsdiff=lfs merge=lfs -text" >> .gitattributes | |
gitlfstrack "*.so" |
echo "*.so filter=lfs diff=lfs merge=lfs -text" >> .gitattributes | ||
# Add and commit your changes | ||
git add . |
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.
After the previousnix develop
andbuild2cmake
, they may have a lot of cruft lingering around (pyproject.toml
, etc.). I think we should be specific here.
This PR is an early draft for an introduction to the kernel hub and a follow up on#2777
TODO