pymc-devs / pymc-devs/pytensor

Scan untraced_sit_sot inplace on python/cython backend

Open
#2,025 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

C-backend memory opt scan
Dominant language
Python
Stars
644
Forks
208
Avg merge
2d 14h
Merged PRs (30d)
16

Description

Description

Adapt #2003 and the last commit of #2005 (inplace optimization on untraced_sit_sot) to python/cython scan which don't currently exploit it.

Note we don't do the automatic conversion to sit_sot to untraced_sit_sot in those backends because scan always gives it at least 2 entries in the circular buffer (as it tries to pass the next entry for the inner function to write directly to).

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing issue #2003 and the last commit of #2005, then inspect the Python/Cython scan implementation and how untraced_sit_sot is handled. Confirm that the inplace optimization is adapted for both backends without adding automatic sit_sot conversion, and add or update coverage showing the optimization works.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend, performance
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.