pymc-devs / pymc-devs/pytensor
Cache output of numba_funcify where possible
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 644
- Forks
- 208
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 16
Description
We could add cache_by_op or cache_by_op_and_sig decorators for numba_funcitfy functions, that internally use a LRU cache to keep track of previous njit functions. Each funcify function can then choose to reuse results in a way that is appropriate.
Most funcify functions only use the op, and don't even look at the node at all.
See also #179 for context.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the numba_funcify functions and issue #179 for context. Determine which functions can reuse results by operation or by operation and signature, then verify that repeated funcification reuses cached njit functions without applying the wrong cache key.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- performance
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100