diff --git a/.gitignore b/.gitignore index aa25970..5e65345 100644 --- a/.gitignore +++ b/.gitignore @@ -3,5 +3,5 @@ *.jl.cov *.jl.mem .DS_Store -/Manifest.toml +Manifest.toml /dev/ diff --git a/test/Project.toml b/test/Project.toml index a3d2e41..4e383a8 100644 --- a/test/Project.toml +++ b/test/Project.toml @@ -1,6 +1,7 @@ [deps] -Combinatorics = "861a8166-3701-5b0c-9a16-15d98fcdc6aa" CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" +Combinatorics = "861a8166-3701-5b0c-9a16-15d98fcdc6aa" +ITensorGPU = "d89171c1-af8f-46b3-badf-d2a472317c15" ITensors = "9136182c-28ba-11e9-034c-db9fb085ebd5" LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" diff --git a/test/runtests.jl b/test/runtests.jl index 71a5921..751fc3a 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -4,27 +4,31 @@ end using ITensorGPU, Test, CUDA -println("Running ITensorGPU tests with a runtime CUDA version: $(CUDA.runtime_version())") +if !CUDA.has_cuda() + println("System does not have CUDA, skipping test.") +else + println("Running ITensorGPU tests with a runtime CUDA version: $(CUDA.runtime_version())") -CUDA.allowscalar(false) -@testset "ITensorGPU.jl" begin - #@testset "$filename" for filename in ("test_cucontract.jl",) - # println("Running $filename with autotune") - # cmd = `$(Base.julia_cmd()) -e 'using Pkg; Pkg.activate(".."); Pkg.instantiate(); include("test_cucontract.jl")'` - # run(pipeline(setenv(cmd, "CUTENSOR_AUTOTUNE" => 1); stdout=stdout, stderr=stderr)) - #end - @testset "$filename" for filename in ( - "test_dmrg.jl", - "test_cuitensor.jl", - "test_cudiag.jl", - "test_cudense.jl", - "test_cucontract.jl", - "test_cumpo.jl", - "test_cumps.jl", - "test_cutruncate.jl", - #"test_pastaq.jl", - ) - println("Running $filename") - include(filename) + CUDA.allowscalar(false) + @testset "ITensorGPU.jl" begin + #@testset "$filename" for filename in ("test_cucontract.jl",) + # println("Running $filename with autotune") + # cmd = `$(Base.julia_cmd()) -e 'using Pkg; Pkg.activate(".."); Pkg.instantiate(); include("test_cucontract.jl")'` + # run(pipeline(setenv(cmd, "CUTENSOR_AUTOTUNE" => 1); stdout=stdout, stderr=stderr)) + #end + @testset "$filename" for filename in ( + "test_dmrg.jl", + "test_cuitensor.jl", + "test_cudiag.jl", + "test_cudense.jl", + "test_cucontract.jl", + "test_cumpo.jl", + "test_cumps.jl", + "test_cutruncate.jl", + #"test_pastaq.jl", + ) + println("Running $filename") + include(filename) + end end end