-
-
Notifications
You must be signed in to change notification settings - Fork 38
Kernels For SSAStepper #499
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
||
# test different saving behaviors | ||
|
||
sol = solve(EnsembleProblem(jump_prob), SSAStepper(), EnsembleGPUKernel(CUDABackend()), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make the same test in the CPU tests just using the CPU backend to kernel abstractions.
# GPU-compatible random number generation | ||
@inline function exponential_rand(lambda::T, seed::UInt64, idx::Int64) where T | ||
seed = (1103515245 * (seed ⊻ UInt64(idx)) + 12345) % 2^31 | ||
u = Float64(seed) / 2^31 | ||
return -log(u) / lambda | ||
end | ||
|
||
@inline function uniform_rand(seed::UInt64, idx::Int64) | ||
seed = (1103515245 * (seed ⊻ UInt64(idx)) + 12345) % 2^31 | ||
return Float64(seed) / 2^31 | ||
end No newline at end of file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Chop this out with the new tooling.
end | ||
|
||
# Modified Gillespie Direct kernel for arbitrary dependencies | ||
@kernel function gillespie_direct_kernel(@Const(prob_data), @Const(num_jumps), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is this not using SSAStepper?
@sivasathyaseeelan do you plan to update per @ChrisRackauckas comments? |
I will get back after merging adaptive and implicit tau leaping |
Checklist
contributor guidelines, in particular the SciML Style Guide and
COLPRAC.
Additional context
Add any other context about the problem here.