-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Labels
pythonIssues related to Halide/Python interopIssues related to Halide/Python interop
Description
>>> from halide import Func
>>> f = Func("f")
>>> f.memoize()
Traceback (most recent call last):
File "<python-input-2>", line 1, in <module>
f.memoize()
~~~~~~~~~^^
TypeError: memoize(): incompatible function arguments. The following argument types are supported:
1. (self: halide.halide_.Func, arg0: Halide::EvictionKey) -> halide.halide_.Func
Invoked with: <halide.Func 'f'>Although the error message gives the second issue away by using the C++ name for EvictionKey instead of a Python name
>>> from halide import EvictionKey
Traceback (most recent call last):
File "<python-input-3>", line 1, in <module>
from halide import EvictionKey
ImportError: cannot import name 'EvictionKey' from 'halide' (.venv/lib/python3.13/site-packages/halide/__init__.py)So memoize() and memoize(EvictionKey) aren't usable from Python. Can both be added please? Thank you!
Metadata
Metadata
Assignees
Labels
pythonIssues related to Halide/Python interopIssues related to Halide/Python interop