Skip to content

Give autoschedulers their own CMake package - #9292

Open
alexreinking wants to merge 2 commits into
mainfrom
alexreinking/autoscheduler-packaging
Open

Give autoschedulers their own CMake package#9292
alexreinking wants to merge 2 commits into
mainfrom
alexreinking/autoscheduler-packaging

Conversation

@alexreinking

Copy link
Copy Markdown
Member

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 (ab)use of the flag that doesn't apply to HalideCompiler's other (actually linked) targets.

Breaking changes

None

Checklist

  • Tests added or updated (not required for docs, CI config, or typo fixes)
  • Documentation updated (if public API changed)
  • Commits include AI attribution where applicable (see Code of Conduct)

Stack created with GitHub Stacks CLIGive Feedback 💬

@codecov

codecov Bot commented Aug 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 69.95%. Comparing base (aa169dc) to head (4ffe611).
⚠️ Report is 1 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@alexreinking alexreinking changed the title Give autoscheduler plugins their own HalideAutoschedulers CMake package Give autoschedulers their own CMake package Aug 7, 2026
@alexreinking
alexreinking force-pushed the alexreinking/autoscheduler-packaging branch from 005a6a3 to 912902f Compare August 7, 2026 07:45
Base automatically changed from alexreinking/fix-codegen-switch-negative-case to main August 8, 2026 02:05
alexreinking and others added 2 commits August 7, 2026 22: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
alexreinking force-pushed the alexreinking/autoscheduler-packaging branch from 912902f to 4ffe611 Compare August 8, 2026 02:05
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