stan-dev / stan-dev/stanc3

Check correctness of partial_evaluation

Open
#283 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature help wanted optimization robustness
Dominant language
OCaml
Stars
160
Forks
59
Avg merge
21h 45m
Merged PRs (30d)
26

Description

The issue is to check correctness of the optimization in the issue title and to wire it up in the Stan_math backend (after the backend specific transformations). For now, it should be hidden behind a command line flag.

Check list:

  • you've gone over all the code in the optimization and you've convinced yourself it is correct, taking particular care with all the possibilities for expressions (including _lp-functions, _rng-functions, compiler internal functions like ReadParam__) to side effect (where the particular kind of side effect determines which optimizations are allowed: e.g. _rng functions cannot be CSE'd but can be dead-code eliminated; _lp functions cannot be touced by either optimization)
  • you've gone over all the unit tests and added to them to convince yourself that the implementation does on the MIR what it should do
  • the optimization is wired up in the backend, after the backend specific transformations, and is exposed under a command line flag
  • you've gone over the stat-comp-benchmarks or other models that are being run on Jenkins and have made sure the optimization is stressed and is passing tests on those (for example, convince yourself that the optimization would actually do non-trivial work on the models being tested).

Contributor guide

No contributing guide indexed for this repository

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

Begin with the partial_evaluation implementation and its MIR unit tests, then inspect the Stan_math backend wiring after backend-specific transformations and the command-line flag entry point. Review the stat-comp-benchmarks and Jenkins models for coverage; done means correctness is established for side-effecting expressions, tests pass, and the optimization is exposed and exercised by the flag.

Written by the indexing model from the issue text.

Assessment

Tech stack
ocaml
Domain
backend, compilers
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.