Skip to content

Commit

Permalink
Merge pull request #637 from JuliaDiff/mz/nograd
Browse files Browse the repository at this point in the history
add remaining `@nograd` from Zygote
  • Loading branch information
mzgubic committed Jul 6, 2022
2 parents e9d7d0a + cc4952c commit dadb205
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 4 deletions.
3 changes: 2 additions & 1 deletion Project.toml
@@ -1,10 +1,11 @@
name = "ChainRules"
uuid = "082447d4-558c-5d27-93f4-14fc19e9eca2"
version = "1.36.2"
version = "1.37.0"

[deps]
ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
Compat = "34da2185-b29b-5c13-b0c7-acf172513d20"
Distributed = "8ba89e20-285c-5b6f-9357-94700520ee1b"
IrrationalConstants = "92d709cd-6900-40b7-9082-c6be49f344b6"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
Expand Down
4 changes: 4 additions & 0 deletions src/ChainRules.jl
Expand Up @@ -3,6 +3,7 @@ module ChainRules
using Base.Broadcast: materialize, materialize!, broadcasted, Broadcasted, broadcastable
using ChainRulesCore
using Compat
using Distributed
using IrrationalConstants: logtwo, logten
using LinearAlgebra
using LinearAlgebra.BLAS
Expand Down Expand Up @@ -34,8 +35,11 @@ include("rulesets/Base/indexing.jl")
include("rulesets/Base/sort.jl")
include("rulesets/Base/mapreduce.jl")

include("rulesets/Distributed/nondiff.jl")

include("rulesets/Statistics/statistics.jl")

include("rulesets/LinearAlgebra/nondiff.jl")
include("rulesets/LinearAlgebra/utils.jl")
include("rulesets/LinearAlgebra/blas.jl")
include("rulesets/LinearAlgebra/lapack.jl")
Expand Down
7 changes: 4 additions & 3 deletions src/rulesets/Base/nondiff.jl
Expand Up @@ -93,6 +93,8 @@
##### Exported functions, alphabetically
#####

@non_differentiable (:)(::Any...) # same as the Colon() singleton instance

@non_differentiable abspath(::AbstractString...)
@non_differentiable all(::Any)
@non_differentiable all(::Any, ::Any)
Expand All @@ -110,8 +112,8 @@
@non_differentiable bytesavailable(::Any)

@non_differentiable CartesianIndices(::Any)
@non_differentiable Channel(::Any...)
@non_differentiable cd(::AbstractString)
@non_differentiable ceil(::Any...)
@non_differentiable chomp(::AbstractString)
@non_differentiable chop(::AbstractString)
@non_differentiable cld(::Any, ::Any)
Expand Down Expand Up @@ -185,7 +187,6 @@
@non_differentiable fld(::Any, ::Any, ::RoundingMode)
@non_differentiable floatmax(::Any)
@non_differentiable floatmin(::Any)
@non_differentiable floor(::Any...)
@non_differentiable flush(::Any)

@non_differentiable gensym(::Symbol)
Expand Down Expand Up @@ -380,7 +381,6 @@ end
@non_differentiable reset(::IO)
@non_differentiable reverse(::AbstractString)
@non_differentiable rm(::AbstractString)
@non_differentiable round(::Any...)
@non_differentiable rsplit(::AbstractString)
@non_differentiable rsplit(::AbstractString, ::AbstractChar)
@non_differentiable rstrip(::AbstractString)
Expand Down Expand Up @@ -470,6 +470,7 @@ elseif isdefined(Base, :cumulative_compile_time_ns)
@non_differentiable Base.cumulative_compile_time_ns()
end
@non_differentiable Base.time_print(::Any...)
@non_differentiable Base.OneTo(::Any...)

@non_differentiable Broadcast.combine_styles(::Any...)
@non_differentiable Broadcast.result_style(::Any)
Expand Down
3 changes: 3 additions & 0 deletions src/rulesets/Distributed/nondiff.jl
@@ -0,0 +1,3 @@
@non_differentiable Distributed.CachingPool(::Any...)
@non_differentiable Distributed.WorkerPool(::Any...)
@non_differentiable workers()
1 change: 1 addition & 0 deletions src/rulesets/LinearAlgebra/nondiff.jl
@@ -0,0 +1 @@
@non_differentiable isposdef(::Any)

2 comments on commit dadb205

@mzgubic
Copy link
Member Author

@mzgubic mzgubic commented on dadb205 Jul 6, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/63755

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v1.37.0 -m "<description of version>" dadb2059d501f3c6bf25056e77fc3fff601234c5
git push origin v1.37.0

Please sign in to comment.