lamikr / rocm_sdk_builder

Other
132 stars 12 forks source link

Nice to have: attempt to patch again when sources were already downloaded #5

Closed flip111 closed 3 months ago

flip111 commented 4 months ago

I thought i could get away with not setting --global on the git user/email setting. That's required however.

Now all the sources downloaded but the patches were not applied. When i rerun ./babs.sh -i it doesn't apply the patches. Would be nice if the script could check if the patches were not applied and then attempt to patch again.

lamikr commented 4 months ago

I agree, that would be nice feature to have. I do myself a following commands always after I modify/add new patches to verify they will apply ok.

./babs.sh -co  (This will checkout all repositories to their tagged version without patches applied)
./babs.sh -ap (This will then re-apply the batches)

Another little tricky situation are submodules on large projects like pytorch where also submodules seems to have their own submodules. (gtest included multiple time in pytoch project for example). Sometimes I have seen checking out some of the pytorch submodules timing out. To really clean the pytorch project between builds, I tend to do there some manual work as I have not figured out yet a prober way to clean it.

cd src_projects/pytorch
git status | xargs -- rm -rf
rm -rf build
rm -rf torch
git reset --hard
git submodule update --init --recursive

If somebody knows how to get pytorch and other python projects to build fully under buildir/project_name while keeping the sources still on src_project/project name folder, that would be great.

With cmake and autoconf based projects, the clean rebuild is much easier. One just needs to delete the previous build project dir. (Or force for example to force the core-project reinstall step again, you can just delete single file like builddir/001_rocm_core/.result_install and then call babs.sh -b again)