Broadcasting in Kernels
Open
Nobody has claimed this yet.
upstream
- Dominant language
- Julia
- Stars
- 327
- Forks
- 42
- Avg merge
- 14h 13m
- Merged PRs (30d)
- 34
Description
using DiffEqGPU, OrdinaryDiffEq
pa = [1.0]
u0 = [3.0]
function f(du,u,p,t)
du[1] = 1.01 * u[1] * p[1]
end
function f2(du,u,p,t)
du .= 1.01 .* u .* p
end
prob = ODEProblem(f2, u0, (0.0, 1.0), pa)
function prob_func(prob, i, repeat)
remake(prob, u0 = 0.5 .+ i/100 .* prob.u0)
end
ensemble_prob = EnsembleProblem(prob, prob_func = prob_func)
sim = solve(ensemble_prob, Tsit5(), EnsembleGPUArray(), saveat = 0.1, trajectories = 100)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running the Julia example with EnsembleGPUArray and compare the f and f2 definitions, focusing on the broadcasted operations in f2. Trace how solve handles this kernel path and establish whether the example should run successfully; done means the intended broadcasting behavior is reproducible and verified for the shown ODE problem.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- hpc
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100