Makes PyCallable dimension reversing logic consistent with that of PythonExtensionGen#8931
Open
Makes PyCallable dimension reversing logic consistent with that of PythonExtensionGen#8931
Conversation
jiawen
commented
Feb 4, 2026
| brew install clang-format lld llvm flatbuffers wabt python pybind11 doxygen eigen libpng libjpeg-turbo openblas | ||
| ``` | ||
|
|
||
| The `llvm` package includes `clang`, `clang-format`, and `lld`, too. To ensure |
Contributor
Author
There was a problem hiding this comment.
Homebrew pulled these out long ago.
jiawen
commented
Feb 4, 2026
|
|
||
| ```shell | ||
| $ pipx install cmake | ||
| pipx install cmake |
Contributor
Author
There was a problem hiding this comment.
Sorry for the drive-by. My vs code auto-formatted this entire file - but for the better I think.
jiawen
commented
Feb 4, 2026
| return Halide::Runtime::Buffer<T, Dims, InClassDimStorage>(t, info.ptr, (int)info.ndim, dims); | ||
| } | ||
|
|
||
| template<typename T = void, |
jiawen
commented
Feb 4, 2026
a450b21 to
0fffb5b
Compare
Contributor
Author
|
I'll work on how |
jiawen
commented
Feb 4, 2026
| @@ -1,4 +1,5 @@ | |||
| import halide as hl | |||
| import numpy as np | |||
Contributor
Author
There was a problem hiding this comment.
Are we ok with this requirement for the test?
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.
When a generator emits a Python extension, the pipeline only accepts buffers that are C or F contiguous (PythonExtensionGen.cpp), throwing an exception if it's neither.
In contrast, a callable constructed from
generator.compile_to_callable()constructs a pipeline that always reverses the dimensions of input buffers. It also non-contiguous buffers.This PR changes the latter to be consistent with the former. Callables constructed from
generator.compile_to_callable()now: