Skip to content

Commit

Permalink
Test GPU
Browse files Browse the repository at this point in the history
Fixes #19 fixes #70
  • Loading branch information
ChrisRackauckas committed Dec 4, 2022
1 parent edf3fbc commit db1dcf9
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 2 deletions.
18 changes: 18 additions & 0 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
steps:
- label: "Julia 1"
plugins:
- JuliaCI/julia#v1:
version: "1"
- JuliaCI/julia-test#v1:
coverage: false # 1000x slowdown
agents:
queue: "juliagpu"
cuda: "*"
timeout_in_minutes: 30
# Don't run Buildkite if the commit message includes the text [skip tests]
if: build.message !~ /\[skip tests\]/

env:
GROUP: GPU
JULIA_PKG_SERVER: "" # it often struggles with our large artifacts
# SECRET_CODECOV_TOKEN: "..."
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

[![codecov](https://codecov.io/gh/SciML/NonlinearSolve.jl/branch/master/graph/badge.svg)](https://codecov.io/gh/SciML/NonlinearSolve.jl)
[![Build Status](https://github.com/SciML/NonlinearSolve.jl/workflows/CI/badge.svg)](https://github.com/SciML/NonlinearSolve.jl/actions?query=workflow%3ACI)
[![Build status](https://badge.buildkite.com/413dc8df7d555cc14c262aba066503a9e7a42023f9cfb75a55.svg)](https://buildkite.com/julialang/nonlinearsolve-dot-jl)

[![ColPrac: Contributor's Guide on Collaborative Practices for Community Packages](https://img.shields.io/badge/ColPrac-Contributor's%20Guide-blueviolet)](https://github.com/SciML/ColPrac)
[![SciML Code Style](https://img.shields.io/static/v1?label=code%20style&message=SciML&color=9558b2&labelColor=389826)](https://github.com/SciML/SciMLStyle)
Expand Down Expand Up @@ -45,7 +46,7 @@ you can now use SimpleNonlinearSolve.jl. `Falsi`, `Bisection`, and `NewtonRahpso
implementations designed for scalar and static vector inputs have all moved to the
lower dependency version. NonlinearSolve.jl is thus designed for the larger scale
more complex implementations, with `NewtonRahpson` now sporting support for
LinearSolve.jl and soon SparseDiffTools.jl to allow for preconditioned Newton-Krylov and
LinearSolve.jl and soon SparseDiffTools.jl to allow for preconditioned Newton-Krylov and
exploitation of sparsity. The two pieces will continue to grow in this direction,
with NonlinearSolve.jl gaining more and more wrapped solver libraries and support
for more complex methods, while SimpleNonlinearSolve.jl will keep a lower dependency
Expand Down
12 changes: 12 additions & 0 deletions test/gpu.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
using CUDA, NonlinearSolve

A = cu(rand(4,4))
u0 = cu(rand(4))
b = cu(rand(4))

function f(du,u,p)
du .= A*u .+ b
end

prob = NonlinearProblem(f, u0)
sol = solve(prob, NewtonRaphson())
8 changes: 7 additions & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,10 @@ const is_APPVEYOR = Sys.iswindows() && haskey(ENV, "APPVEYOR")
if GROUP == "All" || GROUP == "Core"
@time @safetestset "Basic Tests + Some AD" begin include("basictests.jl") end
@time @safetestset "Sparsity Tests" begin include("sparse.jl") end
end end
end

if GROUP == "GPU"
@time @safetestset "GPU Tests" begin include("gpu.jl") end
end

end

0 comments on commit db1dcf9

Please sign in to comment.