From c294a9ae41a2f197376db8ae232c03285dc400b9 Mon Sep 17 00:00:00 2001 From: Ian Butterworth Date: Thu, 21 Apr 2022 20:53:01 -0400 Subject: [PATCH] Update support for timing internals (#608) * update support for timing internals * bump JuliaInterpreter compat * Patch bump --- Project.toml | 4 ++-- src/rulesets/Base/nondiff.jl | 8 ++++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Project.toml b/Project.toml index bfcd14aef..5ec4d83f5 100644 --- a/Project.toml +++ b/Project.toml @@ -1,6 +1,6 @@ name = "ChainRules" uuid = "082447d4-558c-5d27-93f4-14fc19e9eca2" -version = "1.28.1" +version = "1.28.2" [deps] ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" @@ -18,7 +18,7 @@ ChainRulesTestUtils = "1.5" Compat = "3.42.0" FiniteDifferences = "0.12.20" IrrationalConstants = "0.1.1" -JuliaInterpreter = "0.8" # latest is "0.9.1" +JuliaInterpreter = "0.8,0.9" RealDot = "0.1" StaticArrays = "1.2" julia = "1.6" diff --git a/src/rulesets/Base/nondiff.jl b/src/rulesets/Base/nondiff.jl index ebff884e3..14617595c 100644 --- a/src/rulesets/Base/nondiff.jl +++ b/src/rulesets/Base/nondiff.jl @@ -453,8 +453,12 @@ end @non_differentiable Base.time_ns() @non_differentiable Base.typename(::Any) @non_differentiable Base.depwarn(::Any...) -@non_differentiable Base.cumulative_compile_time_ns_before() -@non_differentiable Base.cumulative_compile_time_ns_after() +if isdefined(Base, :cumulative_compile_time_ns_before) + @non_differentiable Base.cumulative_compile_time_ns_before() + @non_differentiable Base.cumulative_compile_time_ns_after() +elseif isdefined(Base, :cumulative_compile_time_ns) + @non_differentiable Base.cumulative_compile_time_ns() +end @non_differentiable Base.time_print(::Any...) @non_differentiable Broadcast.combine_styles(::Any...)