Fix up memoize; bind to Python by alexreinking · Pull Request #8778 · halide/Halide · GitHub
Skip to content

Fix up memoize; bind to Python#8778

Merged
alexreinking merged 9 commits into
mainfrom
python/memoize
Aug 27, 2025
Merged

Fix up memoize; bind to Python#8778
alexreinking merged 9 commits into
mainfrom
python/memoize

Conversation

@alexreinking

Copy link
Copy Markdown
Member

Fixes #8777

@alexreinking alexreinking requested a review from rtzam August 25, 2025 18:41
rtzam
rtzam previously approved these changes Aug 25, 2025

@rtzam rtzam left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@rtzam rtzam self-requested a review August 25, 2025 18:51
@rtzam rtzam dismissed their stale review August 25, 2025 18:51

Compiler Segfaulting when using the added overload

@rtzam

rtzam commented Aug 25, 2025

Copy link
Copy Markdown

@rtzam

rtzam commented Aug 25, 2025

Copy link
Copy Markdown

Documenting slightly smaller test case demonstrating a different symptom:

from halide import Func, Var

x = Var("x")
f = Func("f")
f[x] = 0.0

print("memoize scheduled")
f.memoize()

print("JIT compiling...")
f.compile_jit()

print("realizing...")
result = f.realize([3])

print(result)

Which generates:

    f.compile_jit()
    ~~~~~~~~~~~~~^^
halide.halide_.HalideError: Error: Symbol not found: f.cache_miss

So the pure definition is also a bit broken as well as the update step

@alexreinking alexreinking changed the title Bind memoize and EvictionKey Fix up memoize; bind to Python Aug 26, 2025
@alexreinking alexreinking requested a review from abadams August 26, 2025 18:10
Comment thread python_bindings/test/correctness/memoize.py
Comment thread src/Memoization.cpp Outdated
Comment thread test/error/memoize_output_invalid.cpp
@alexreinking

Copy link
Copy Markdown
Member Author

@alexreinking alexreinking merged commit e3b0ccd into main Aug 27, 2025
11 of 19 checks passed
@alexreinking alexreinking deleted the python/memoize branch August 27, 2025 14:55
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.

Missing Func::memoize overloads and missing EvictionKey class

3 participants