Skip to content

Cannot call RDom::domain in Python #8854

@alexreinking

Description

@alexreinking

Look at the following Python interaction

$ python
Python 3.13.9 (main, Oct 14 2025, 13:52:31) [Clang 17.0.0 (clang-1700.0.13.3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import halide as hl
>>> r = hl.RDom([(0, 10)], "r")
>>> rd = r.domain()
TypeError: Unregistered type : Halide::Internal::ReductionDomain

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "<python-input-2>", line 1, in <module>
    rd = r.domain()
TypeError: Unable to convert function return value to a Python type! The signature was
        (self: halide.halide_.RDom) -> Halide::Internal::ReductionDomain

The error complains that Internal::ReductionDomain is not bound. It's not clear to me we want to expose that. Maybe it makes more sense to return a Python list of RVars?

Metadata

Metadata

Assignees

No one assigned

    Labels

    pythonIssues related to Halide/Python interop

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions