Skip to content

Commit dadb205

Browse files
authored
Merge pull request #637 from JuliaDiff/mz/nograd
add remaining `@nograd` from Zygote
2 parents e9d7d0a + cc4952c commit dadb205

File tree

5 files changed

+14
-4
lines changed

5 files changed

+14
-4
lines changed

Project.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
name = "ChainRules"
22
uuid = "082447d4-558c-5d27-93f4-14fc19e9eca2"
3-
version = "1.36.2"
3+
version = "1.37.0"
44

55
[deps]
66
ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
77
Compat = "34da2185-b29b-5c13-b0c7-acf172513d20"
8+
Distributed = "8ba89e20-285c-5b6f-9357-94700520ee1b"
89
IrrationalConstants = "92d709cd-6900-40b7-9082-c6be49f344b6"
910
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
1011
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"

src/ChainRules.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ module ChainRules
33
using Base.Broadcast: materialize, materialize!, broadcasted, Broadcasted, broadcastable
44
using ChainRulesCore
55
using Compat
6+
using Distributed
67
using IrrationalConstants: logtwo, logten
78
using LinearAlgebra
89
using LinearAlgebra.BLAS
@@ -34,8 +35,11 @@ include("rulesets/Base/indexing.jl")
3435
include("rulesets/Base/sort.jl")
3536
include("rulesets/Base/mapreduce.jl")
3637

38+
include("rulesets/Distributed/nondiff.jl")
39+
3740
include("rulesets/Statistics/statistics.jl")
3841

42+
include("rulesets/LinearAlgebra/nondiff.jl")
3943
include("rulesets/LinearAlgebra/utils.jl")
4044
include("rulesets/LinearAlgebra/blas.jl")
4145
include("rulesets/LinearAlgebra/lapack.jl")

src/rulesets/Base/nondiff.jl

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,8 @@
9393
##### Exported functions, alphabetically
9494
#####
9595

96+
@non_differentiable (:)(::Any...) # same as the Colon() singleton instance
97+
9698
@non_differentiable abspath(::AbstractString...)
9799
@non_differentiable all(::Any)
98100
@non_differentiable all(::Any, ::Any)
@@ -110,8 +112,8 @@
110112
@non_differentiable bytesavailable(::Any)
111113

112114
@non_differentiable CartesianIndices(::Any)
115+
@non_differentiable Channel(::Any...)
113116
@non_differentiable cd(::AbstractString)
114-
@non_differentiable ceil(::Any...)
115117
@non_differentiable chomp(::AbstractString)
116118
@non_differentiable chop(::AbstractString)
117119
@non_differentiable cld(::Any, ::Any)
@@ -185,7 +187,6 @@
185187
@non_differentiable fld(::Any, ::Any, ::RoundingMode)
186188
@non_differentiable floatmax(::Any)
187189
@non_differentiable floatmin(::Any)
188-
@non_differentiable floor(::Any...)
189190
@non_differentiable flush(::Any)
190191

191192
@non_differentiable gensym(::Symbol)
@@ -380,7 +381,6 @@ end
380381
@non_differentiable reset(::IO)
381382
@non_differentiable reverse(::AbstractString)
382383
@non_differentiable rm(::AbstractString)
383-
@non_differentiable round(::Any...)
384384
@non_differentiable rsplit(::AbstractString)
385385
@non_differentiable rsplit(::AbstractString, ::AbstractChar)
386386
@non_differentiable rstrip(::AbstractString)
@@ -470,6 +470,7 @@ elseif isdefined(Base, :cumulative_compile_time_ns)
470470
@non_differentiable Base.cumulative_compile_time_ns()
471471
end
472472
@non_differentiable Base.time_print(::Any...)
473+
@non_differentiable Base.OneTo(::Any...)
473474

474475
@non_differentiable Broadcast.combine_styles(::Any...)
475476
@non_differentiable Broadcast.result_style(::Any)

src/rulesets/Distributed/nondiff.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
@non_differentiable Distributed.CachingPool(::Any...)
2+
@non_differentiable Distributed.WorkerPool(::Any...)
3+
@non_differentiable workers()

src/rulesets/LinearAlgebra/nondiff.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
@non_differentiable isposdef(::Any)

0 commit comments

Comments
 (0)