Skip to content

Conversation

@utkarsh530
Copy link
Member

@utkarsh530 utkarsh530 commented Jul 7, 2023

MWE:

using DiffEqGPU, DiffEqBase, StaticArrays

function lorenz!(du,u,p,t)
 du[1] = 10.0(u[2]-u[1])
 du[2] = u[1]*(28.0-u[3]) - u[2]
 du[3] = u[1]*u[2] - (8/3)*u[3]
end
u0 = @MArray [1.0;0.0;0.0]
tspan = (0.0,100.0)
prob = ODEProblem(lorenz!,u0,tspan)

ensembleProb = EnsembleProblem(prob)

using CUDA

sol = solve(ensembleProb, GPUTsit5(), EnsembleGPUKernel(CUDABackend()), dt = 0.01, adaptive = false, trajectories = 2)

Current issue:

Tries to dynamically allocate. Hence, it fails for high number of trajectories. Similar to #219

@utkarsh530 utkarsh530 changed the title Start implementation of kernels compatible with out-of-place problems Start implementation of kernels compatible with in-place problems Jul 7, 2023
@ChrisRackauckas-Claude
Copy link
Contributor

Status Check - PR #291

This PR has been reviewed as part of automated dependency monitoring.

Current State

  • Created: July 7, 2023
  • Status: Draft (Work in Progress)
  • Last Updated: July 7, 2023 (over 2 years ago)
  • CI Status: No CI checks have run on this PR

Implementation Review

The PR implements initial support for in-place (IIP) kernels with the following changes:

Completed:

  1. Added step! method for GPUT5I{true, S, T} in src/perform_step/gpu_tsit5_perform_step.jl (lines 1-80)
  2. Modified kernel in src/solve.jl to convert MArray u0/p for in-place problems (lines 223-229)
  3. Added handle_iip_prob helper function in src/DiffEqGPU.jl (lines 886-894)
  4. Removed IIP assertion from integrator type constructors
  5. Added type conversions in integrator_utils.jl and solve.jl

Incomplete/Issues:

  1. Line 939 in src/DiffEqGPU.jl: handle_iip_prob call is commented out
  2. Cannot verify functionality - test suite has dependency conflicts (CUDA 4.1.0 compatibility issue with current Julia/GPUCompiler versions, unrelated to this PR)
  3. No tests added for the new IIP functionality
  4. Implementation appears abandoned mid-development

Recommendation

This PR needs significant work to be mergeable:

  1. Complete the implementation - Uncomment or remove the handle_iip_prob function and its commented usage
  2. Add tests - Create tests specifically for in-place GPU kernels with MArrays
  3. Update dependencies - The test suite needs CUDA version bounds updated to work with modern Julia versions
  4. Rebase on master - PR is 2+ years old and may have conflicts

Given the age and incomplete state, consider:

  • Closing this PR and opening a fresh one with a complete implementation
  • OR reviving this PR with the necessary fixes and tests

cc @ChrisRackauckas - This PR has been dormant since July 2023. Should it be closed or revived?

@ChrisRackauckas ChrisRackauckas deleted the u/marrays branch December 30, 2025 01:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants