JuliaGPU / JuliaGPU/BinomialGPU.jl

Use multiple indexing to avoid recomputing constants

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

Nobody has claimed this yet.

enhancement
Dominant language
Julia
Stars
8
Forks
3
PR merge metrics
No merged PRs in 30d

Description

For example, when sampling an array A of size (4, 4, 4), with count of size (4, 4) and prob of size (4,), use an index i to select among the CartesianIndices((4,4)) and an index j to select among CartesianIndices((4,)), and iterate over the remaining indices (in this case, just the third axis of A) within the kernel. This avoids recomputing the constants that are needed for the BTRS algorithm.

This should probably only be merged if it is consistently faster, or else maybe be a user option avoid_recomp.

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 locating the binomial GPU sampling kernel and the BTRS constant calculations described in the issue. Benchmark the current implementation against multiple indexing with the (4,4,4) example, and treat the change as complete only if it is consistently faster or a clear user option is defined.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
performance
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.