Skip to content

Commit db1dcf9

Browse files
Test GPU
Fixes #19 fixes #70
1 parent edf3fbc commit db1dcf9

File tree

4 files changed

+39
-2
lines changed

4 files changed

+39
-2
lines changed

.buildkite/pipeline.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
steps:
2+
- label: "Julia 1"
3+
plugins:
4+
- JuliaCI/julia#v1:
5+
version: "1"
6+
- JuliaCI/julia-test#v1:
7+
coverage: false # 1000x slowdown
8+
agents:
9+
queue: "juliagpu"
10+
cuda: "*"
11+
timeout_in_minutes: 30
12+
# Don't run Buildkite if the commit message includes the text [skip tests]
13+
if: build.message !~ /\[skip tests\]/
14+
15+
env:
16+
GROUP: GPU
17+
JULIA_PKG_SERVER: "" # it often struggles with our large artifacts
18+
# SECRET_CODECOV_TOKEN: "..."

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

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

910
[![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)
1011
[![SciML Code Style](https://img.shields.io/static/v1?label=code%20style&message=SciML&color=9558b2&labelColor=389826)](https://github.com/SciML/SciMLStyle)
@@ -45,7 +46,7 @@ you can now use SimpleNonlinearSolve.jl. `Falsi`, `Bisection`, and `NewtonRahpso
4546
implementations designed for scalar and static vector inputs have all moved to the
4647
lower dependency version. NonlinearSolve.jl is thus designed for the larger scale
4748
more complex implementations, with `NewtonRahpson` now sporting support for
48-
LinearSolve.jl and soon SparseDiffTools.jl to allow for preconditioned Newton-Krylov and
49+
LinearSolve.jl and soon SparseDiffTools.jl to allow for preconditioned Newton-Krylov and
4950
exploitation of sparsity. The two pieces will continue to grow in this direction,
5051
with NonlinearSolve.jl gaining more and more wrapped solver libraries and support
5152
for more complex methods, while SimpleNonlinearSolve.jl will keep a lower dependency

test/gpu.jl

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
using CUDA, NonlinearSolve
2+
3+
A = cu(rand(4,4))
4+
u0 = cu(rand(4))
5+
b = cu(rand(4))
6+
7+
function f(du,u,p)
8+
du .= A*u .+ b
9+
end
10+
11+
prob = NonlinearProblem(f, u0)
12+
sol = solve(prob, NewtonRaphson())

test/runtests.jl

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,10 @@ const is_APPVEYOR = Sys.iswindows() && haskey(ENV, "APPVEYOR")
1010
if GROUP == "All" || GROUP == "Core"
1111
@time @safetestset "Basic Tests + Some AD" begin include("basictests.jl") end
1212
@time @safetestset "Sparsity Tests" begin include("sparse.jl") end
13-
end end
13+
end
14+
15+
if GROUP == "GPU"
16+
@time @safetestset "GPU Tests" begin include("gpu.jl") end
17+
end
18+
19+
end

0 commit comments

Comments
 (0)