Skip to content

Commit 83f6ad3

Browse files
authored
do not check for thunks (#175)
1 parent 0c7884d commit 83f6ad3

File tree

2 files changed

+1
-12
lines changed

2 files changed

+1
-12
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "ChainRulesTestUtils"
22
uuid = "cdddcdb0-9152-4a09-a978-84456f9df70a"
3-
version = "0.7.7"
3+
version = "0.7.8"
44

55
[deps]
66
ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"

src/testers.jl

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -229,20 +229,9 @@ function test_rrule(
229229
_test_add!!_behaviour(accum_cotangent, ad_cotangent; isapprox_kwargs...)
230230
end
231231
end
232-
233-
check_thunking_is_appropriate(ad_cotangents)
234232
end # top-level testset
235233
end
236234

237-
function check_thunking_is_appropriate(x̄s)
238-
num_zeros = count(x -> x isa AbstractZero, x̄s)
239-
num_thunks = count(x -> x isa Thunk, x̄s)
240-
if num_zeros + num_thunks == length(x̄s)
241-
# num_thunks can be either 0, or greater than 1.
242-
@test_msg "Should not thunk only non_zero argument" num_thunks != 1
243-
end
244-
end
245-
246235
"""
247236
@maybe_inferred [Type] f(...)
248237

0 commit comments

Comments
 (0)