Skip to content

Fix Makefile dep so autoscheduler plugins re-cp into distrib#9136

Merged
alexreinking merged 1 commit into
mainfrom
abadams/makefile_dep_fix
May 14, 2026
Merged

Fix Makefile dep so autoscheduler plugins re-cp into distrib#9136
alexreinking merged 1 commit into
mainfrom
abadams/makefile_dep_fix

Conversation

@abadams
Copy link
Copy Markdown
Member

@abadams abadams commented May 13, 2026

The libHalide.so distrib rule runs rm -rf $(DISTRIB_DIR) before repopulating, which deletes the previously-copied autoscheduler plugins. Make decides up-front whether the plugin distrib targets need rebuilding, so it doesn't notice the deletion. The mullapudi2016 and li2018 sub-makes treat libHalide as order-only, so their bin/ files don't refresh either, leaving distrib missing those two plugins until a second make distrib.

Add libHalide.so as a prereq of the plugin distrib rule so the cp re-fires whenever libHalide is rebuilt.

This fixes a makefile bug where you have to run "make distrib" twice on any change.

The libHalide.so distrib rule runs `rm -rf $(DISTRIB_DIR)` before
repopulating, which deletes the previously-copied autoscheduler plugins.
Make decides up-front whether the plugin distrib targets need rebuilding,
so it doesn't notice the deletion. The mullapudi2016 and li2018 sub-makes
treat libHalide as order-only, so their bin/ files don't refresh either,
leaving distrib missing those two plugins until a second `make distrib`.

Add libHalide.so as a prereq of the plugin distrib rule so the cp re-fires
whenever libHalide is rebuilt.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@alexreinking alexreinking merged commit a56dea6 into main May 14, 2026
8 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants