Separate the language Type from the ABI halide_type_t#9205
Separate the language Type from the ABI halide_type_t#9205alexreinking wants to merge 7 commits into
Conversation
0bd2e30 to
3f1f8c9
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #9205 +/- ##
=======================================
Coverage ? 70.32%
=======================================
Files ? 255
Lines ? 78928
Branches ? 18879
=======================================
Hits ? 55504
Misses ? 17874
Partials ? 5550 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
89ab379 to
cd20a61
Compare
IIRC, the no-scalar buffer formats would only be applicable in specific instances of vectorized inputs/outputs. |
I wonder whether they actually work on |
- ABI halide_type_t drops `lanes` -> {code, bits, reserved} (still 4 bytes;
halide_buffer_t layout unchanged). Halide::Type is decoupled and stores
its own fields; must be explicitly erased with `as_abi` (asserts scalar),
Trace event/packet carry their own `lanes`.
- Halide::Type is reduced to 8 bytes: the handle_type pointer is replaced
by a 4-byte index into a process-wide handle-type intern table.
- The IR matcher / constant folder uses Halide::Type directly; This keeps
handle C++-type metadata fidelity through matcher reconstruction.
- CodeGen intrinsic tables (ARM/X86/Hexagon/PowerPC/WebAssembly) use
Halide::Type.
- Added ostream operator<< support for halide_type_t directly.
Some open problems remain:
- d3d12 buffer element types treated as scalar (multi-channel texture format
selection is a follow-up).
- A few instances call for invalid/uninitialized `Type`s, which goes against
the overarching goal of making Type always coherent.
Fixes #9202
Fixes #9203
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1c50698 to
13cfd19
Compare
|
All green now. edit: some filesystem issue on win-worker-3 |
lanes-> {code, bits, reserved} (still 4 bytes; halide_buffer_t layout unchanged). Halide::Type is decoupled and stores its own fields; must be explicitly erased withas_abi(asserts scalar), Trace event/packet carry their ownlanes.One open problem remains for future work due to lack of testing:
Fixes #9202
Fixes #9203
Breaking changes
The
Typeandhalide_type_targuments have been significantly reworked. This is both an ABI and an API break.Checklist