Closed utkarsh530 closed 1 year ago
We just need to make sure that behavior is well-documented.
It would probably be good to have a post-process phase that subsets.
How should we do that? Return an index from the kernel or just select the last index, which is non-zero in sol.t
?
Not non-zero but not the same as tspan[1]
Merging #199 (9077c15) into master (1b67553) will not change coverage. The diff coverage is
0.00%
.
@@ Coverage Diff @@
## master #199 +/- ##
======================================
Coverage 0.00% 0.00%
======================================
Files 9 9
Lines 1977 1990 +13
======================================
- Misses 1977 1990 +13
Impacted Files | Coverage Δ | |
---|---|---|
src/DiffEqGPU.jl | 0.00% <0.00%> (ø) |
|
src/integrators/integrator_utils.jl | 0.00% <0.00%> (ø) |
|
src/integrators/types.jl | 0.00% <ø> (ø) |
|
src/perform_step/gpu_tsit5_perform_step.jl | 0.00% <0.00%> (ø) |
|
src/perform_step/gpu_vern7_perform_step.jl | 0.00% <0.00%> (ø) |
|
src/perform_step/gpu_vern9_perform_step.jl | 0.00% <0.00%> (ø) |
|
src/solve.jl | 0.00% <0.00%> (ø) |
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more
The post-process does increase some allocations though:
Before:
julia> CUDA.@time sol = solve(monteprob, GPUTsit5(), EnsembleGPUKernel(),
trajectories = 2,
adaptive = false, dt = 1.0f0, callback = cb, merge_callbacks = true,
tstops = [2.40f0])
0.000236 seconds (147 CPU allocations: 5.891 KiB) (4 GPU allocations: 228 bytes, 8.57% memmgmt time)
After:
julia> CUDA.@time sol = solve(monteprob, GPUTsit5(), EnsembleGPUKernel(),
trajectories = 2,
adaptive = false, dt = 1.0f0, callback = cb, merge_callbacks = true,
tstops = [2.40f0])
0.000275 seconds (250 CPU allocations: 8.344 KiB) (4 GPU allocations: 228 bytes, 6.38% memmgmt time)
EnsembleSolution Solution of length 2 with uType:
ODESolution
What about using a view?
I think that could be worked on. May need to double check the higher level is type-stable.
MWE: