From 1dabc4ab249b9e635b012df0f53b2478425a221b Mon Sep 17 00:00:00 2001 From: TheZombie1999 Date: Thu, 8 Sep 2022 16:40:17 +0200 Subject: [PATCH 1/3] Add a test for the lu_instance function --- lib/ArrayInterfaceCUDA/Project.toml | 1 + lib/ArrayInterfaceCUDA/src/ArrayInterfaceCUDA.jl | 1 + lib/ArrayInterfaceCUDA/test/runtests.jl | 11 ++++++++++- 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/lib/ArrayInterfaceCUDA/Project.toml b/lib/ArrayInterfaceCUDA/Project.toml index 0732c708e..0d31f7b0d 100644 --- a/lib/ArrayInterfaceCUDA/Project.toml +++ b/lib/ArrayInterfaceCUDA/Project.toml @@ -8,6 +8,7 @@ ArrayInterface = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9" ArrayInterfaceGPUArrays = "6ba088a2-8465-4c0a-af30-387133b534db" CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [compat] Adapt = "3" diff --git a/lib/ArrayInterfaceCUDA/src/ArrayInterfaceCUDA.jl b/lib/ArrayInterfaceCUDA/src/ArrayInterfaceCUDA.jl index 07b741d31..2dde0cf73 100644 --- a/lib/ArrayInterfaceCUDA/src/ArrayInterfaceCUDA.jl +++ b/lib/ArrayInterfaceCUDA/src/ArrayInterfaceCUDA.jl @@ -3,6 +3,7 @@ module ArrayInterfaceCUDA using Adapt using ArrayInterface, ArrayInterfaceGPUArrays using CUDA +using CUDA.CUSOLVER using LinearAlgebra diff --git a/lib/ArrayInterfaceCUDA/test/runtests.jl b/lib/ArrayInterfaceCUDA/test/runtests.jl index ab77576cc..7ebcb6396 100644 --- a/lib/ArrayInterfaceCUDA/test/runtests.jl +++ b/lib/ArrayInterfaceCUDA/test/runtests.jl @@ -1 +1,10 @@ -using ArrayInterfaceCUDA \ No newline at end of file + +using CUDA +using ArrayInterface +using ArrayInterfaceCUDA +using LinearAlgebra + +using Test + +# Test whether lu_instance throws an error when invoked with an gpu array +@test !isa(try ArrayInterface.lu_instance(CUDA.CuArray([1.f0 1.f0; 1.f0 1.f0])) catch ex ex end, Exception) From 1ed38f234a31ab4e62a0b668335c30b930ef0630 Mon Sep 17 00:00:00 2001 From: TheZombie1999 Date: Thu, 8 Sep 2022 17:34:37 +0200 Subject: [PATCH 2/3] Make Test an test dependency --- lib/ArrayInterfaceCUDA/Project.toml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/ArrayInterfaceCUDA/Project.toml b/lib/ArrayInterfaceCUDA/Project.toml index 0d31f7b0d..253a12f40 100644 --- a/lib/ArrayInterfaceCUDA/Project.toml +++ b/lib/ArrayInterfaceCUDA/Project.toml @@ -8,11 +8,15 @@ ArrayInterface = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9" ArrayInterfaceGPUArrays = "6ba088a2-8465-4c0a-af30-387133b534db" CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" -Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [compat] Adapt = "3" ArrayInterface = "5, 6" ArrayInterfaceGPUArrays = "0.1" CUDA = "3.9" -julia = "1.6" + +[extras] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[targets] +test = ["Test"] From c9be6544ad84c14afd4f15e7342a58e3fc6f5451 Mon Sep 17 00:00:00 2001 From: Christopher Rackauckas Date: Thu, 8 Sep 2022 10:28:52 -1000 Subject: [PATCH 3/3] Update lib/ArrayInterfaceCUDA/Project.toml --- lib/ArrayInterfaceCUDA/Project.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/ArrayInterfaceCUDA/Project.toml b/lib/ArrayInterfaceCUDA/Project.toml index 253a12f40..b3f4fb913 100644 --- a/lib/ArrayInterfaceCUDA/Project.toml +++ b/lib/ArrayInterfaceCUDA/Project.toml @@ -14,6 +14,7 @@ Adapt = "3" ArrayInterface = "5, 6" ArrayInterfaceGPUArrays = "0.1" CUDA = "3.9" +julia = "1.6" [extras] Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"