File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed
Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change 11name = " LuxTestUtils"
22uuid = " ac9de150-d08f-4546-94fb-7472b5760531"
3- version = " 2.1 .0"
3+ version = " 2.2 .0"
44authors = [" Avik Pal <avikpal@mit.edu>" ]
55
66[deps ]
Original file line number Diff line number Diff line change @@ -181,10 +181,11 @@ function test_gradients(
181181
182182 # Choose the backends to test
183183 backends = []
184- push!(backends, AutoZygote())
184+ if ZYGOTE_TESTING_ENABLED[]
185+ push!(backends, AutoZygote())
186+ end
185187 if ! on_gpu
186188 total_length ≤ 32 && push!(backends, AutoForwardDiff())
187- # TODO : Move Enzyme out of here once it supports GPUs
188189 if enable_enzyme_reverse_mode || ENZYME_TESTING_ENABLED[]
189190 mode = if enzyme_set_runtime_activity
190191 Enzyme. set_runtime_activity(Enzyme. Reverse)
@@ -210,6 +211,11 @@ function test_gradients(
210211 typeof(backend). name. name != typeof(ground_truth_backend). name. name
211212 ]
212213
214+ if isempty(backends)
215+ @warn " No backends to test. Skipping test..."
216+ return nothing
217+ end
218+
213219 return @testset " gradtest($(f) )" begin
214220 @testset " $(nameof(typeof(backend))) ()" for backend in backends
215221 local_test_expr = :([$ (nameof(typeof(backend)))] - $ (test_expr))
You can’t perform that action at this time.
0 commit comments