Give autoschedulers their own CMake package - #9292
Open
alexreinking wants to merge 2 commits into
Open
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #9292 +/- ##
==========================================
- Coverage 70.00% 69.95% -0.05%
==========================================
Files 258 258
Lines 77353 77353
Branches 18837 18837
==========================================
- Hits 54151 54114 -37
- Misses 17626 17643 +17
- Partials 5576 5596 +20 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
alexreinking
force-pushed
the
alexreinking/autoscheduler-packaging
branch
from
August 7, 2026 07:45
005a6a3 to
912902f
Compare
abadams
approved these changes
Aug 7, 2026
Base automatically changed from
alexreinking/fix-codegen-switch-negative-case
to
main
August 8, 2026 02:05
HalideCompilerConfigVersion.cmake correctly rejects a mismatched-bitness install, since Halide::Generator/Halide::PyStubs are real linked host binaries. But that check uses CMAKE_SIZEOF_VOID_P, which reflects the target ABI while cross-compiling, not the real host running CMake -- so add_halide_library(... AUTOSCHEDULER ...)'s find_package(HalideCompiler) spuriously fails whenever host and target word sizes differ (e.g. a 64-bit host cross-compiling for a 32-bit bare-metal target). Autoscheduler plugins are dlopen()'d by the generator process at Generator run time and never linked, so nothing about their compiled ABI is exposed to or constrained by the consuming project. Split them into their own HalideAutoschedulers package, marked ARCH_INDEPENDENT -- a deliberate, documented use of the flag that doesn't apply to HalideCompiler's other (actually linked) targets. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Generators write their outputs there directly, so previously any OUTPUT_DIR other than an existing target directory (e.g. one already implied by another CMake target) failed with "No such file or directory". Drops the equivalent workaround from HelloWasm, which hit this since each of its wasm variants needs its own OUTPUT_DIR to avoid filename collisions.
alexreinking
force-pushed
the
alexreinking/autoscheduler-packaging
branch
from
August 8, 2026 02:05
912902f to
4ffe611
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
HalideCompilerConfigVersion.cmakecorrectly rejects a mismatched-bitness install, sinceHalide::Generator/Halide::PyStubsare real linked host binaries. But that check usesCMAKE_SIZEOF_VOID_P, which reflects the target ABI while cross-compiling, not the real host running CMake -- soadd_halide_library(... AUTOSCHEDULER ...)'sfind_package(HalideCompiler)spuriously fails whenever host and target word sizes differ (e.g. a 64-bit host cross-compiling for a 32-bit bare-metal target).Autoscheduler plugins are
dlopen()'d by the generator process at Generator run time and never linked, so nothing about their compiled ABI is exposed to or constrained by the consuming project. Split them into their ownHalideAutoschedulerspackage, markedARCH_INDEPENDENT-- a deliberate, documented (ab)use of the flag that doesn't apply toHalideCompiler's other (actually linked) targets.Breaking changes
None
Checklist
Stack created with GitHub Stacks CLI • Give Feedback 💬