Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
charleskawczynski committed Jun 17, 2024
1 parent a4a34f9 commit bcecc63
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion test/MatrixFields/field_matrix_solvers.jl
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ function test_field_matrix_solver(; test_name, alg, A, b, use_rel_error = false)
# from CUBLAS (norm), KrylovKit (eigsolve), and CoreLogging (@debug).
ignored = (
ignore_cuda...,
using_cuda ? AnyFrameModule(CUDA.CUBLAS) :
using_cuda ? AnyFrameModule(eval(Meta.parse("CUDA.CUBLAS"))) :
AnyFrameModule(MatrixFields.KrylovKit),
AnyFrameModule(Base.CoreLogging),
)
Expand Down
9 changes: 5 additions & 4 deletions test/MatrixFields/matrix_field_test_utils.jl
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
using Test
using JET
import CUDA
import Random: seed!

import ClimaComms
ClimaComms.@import_required_backends
import ClimaCore:
Geometry,
Domains,
Expand Down Expand Up @@ -45,7 +45,8 @@ const comms_device = ClimaComms.device()
# comms_device = ClimaComms.CPUSingleThreaded()
@show comms_device
const using_cuda = comms_device isa ClimaComms.CUDADevice
const ignore_cuda = using_cuda ? (AnyFrameModule(CUDA),) : ()
const ignore_cuda =
using_cuda ? (AnyFrameModule(eval(Meta.parse("CUDA"))),) : ()

# Test the allocating and non-allocating versions of a field broadcast against
# a reference non-allocating implementation. Ensure that they are performant,
Expand All @@ -63,7 +64,7 @@ function test_field_broadcast(;
) where {F1, F2, F3}
@testset "$test_name" begin
if test_broken_with_cuda && using_cuda
@test_throws CUDA.InvalidIRError get_result()
@test_throws eval(Meta.parse("CUDA")).InvalidIRError get_result()
@warn "$test_name:\n\tCUDA.InvalidIRError"
return
end
Expand Down Expand Up @@ -133,7 +134,7 @@ function test_field_broadcast_against_array_reference(;
) where {F1, F2, F3}
@testset "$test_name" begin
if test_broken_with_cuda && using_cuda
@test_throws CUDA.InvalidIRError get_result()
@test_throws eval(Meta.parse("CUDA")).InvalidIRError get_result()
@warn "$test_name:\n\tCUDA.InvalidIRError"
return
end
Expand Down

0 comments on commit bcecc63

Please sign in to comment.