stan-dev / stan-dev/stanc3

Optimization efficacy and efficiency

Open
#555 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

No one has yet worked on:

  • Tuning optimizations to improve performance for real Stan programs, including:
    • Optimization behavior (e.g., should lazy code motion extract constants?)
    • Optimization repetitions
    • Optimization ordering (the current order is my educated guess but is not empirical)
  • Making sure that optimizations are applied whenever safe
  • 'Optimizing' the optimization code (e.g. some large data structures are recomputed for each optimization)

I want to make it clear that #522 was about solving instances when optimizations produced non-compiling or non-correct code. I solved all issues that arose with our corpus and with all of the optimizations activated. I did not do any performance tuning. In addition, some of the changes I made which decreased the efficacy of the optimizations may have been unnecessarily conservative.

I'd be happy to help out anyone who wanted to work on these, and I'll work on them myself when I have time.

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

Start by reviewing the optimization behavior, repetitions, ordering, and safety concerns listed in the issue, along with the corpus and optimizations referenced in #522. Profile real Stan programs and compare optimization efficacy and efficiency before deciding what to change. Done means the optimization choices are supported by empirical results and remain safe for the corpus.

Written by the indexing model from the issue text.

Assessment

Tech stack
ocaml
Domain
compilers, performance
Issue type
Refactor
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.