stan-dev / stan-dev/stanc3

See if we can do map_rect data transfers in stanc3 and get rid of call_id template parameter

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

Nobody has claimed this yet.

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

Description

Right now map_rect asks the compiler to emit a call_id integer as a template parameter to basically allow some caching to happen in the Math library. As we did with the GPU functions, this logic would better live in the compiler both for code sanity reasons but also because I believe the current caching scheme is subtly wrong.

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 tracing how stanc3 compiles map_rect and how its generated calls use the call_id template parameter in the Math library. Compare this with the existing GPU-function data-transfer logic; done means the compiler owns the transfers, the caching behavior is preserved, and map_rect no longer requires call_id.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, ocaml
Domain
compilers
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.