From b38b77b95306aed9fdfa149deb46b5383d2f12c4 Mon Sep 17 00:00:00 2001 From: FredericWantiez Date: Wed, 2 Nov 2022 20:29:27 +0000 Subject: [PATCH 1/2] Cache key --- src/tapedfunction.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tapedfunction.jl b/src/tapedfunction.jl index 8f2e27b2..963fea47 100644 --- a/src/tapedfunction.jl +++ b/src/tapedfunction.jl @@ -62,7 +62,7 @@ mutable struct TapedFunction{F, TapeType} function TapedFunction{F, T}(f::F, args...; cache=false, deepcopy_types=Union{}) where {F, T} args_type = _accurate_typeof.(args) - cache_key = (f, args_type...) + cache_key = (f, deepcopy_types, args_type...) if cache && haskey(TRCache, cache_key) # use cache cached_tf = TRCache[cache_key]::TapedFunction{F, T} From 2e051ec60c7485e7fbe652bf5b3e366e5718eb58 Mon Sep 17 00:00:00 2001 From: Hong Ge <3279477+yebai@users.noreply.github.com> Date: Wed, 2 Nov 2022 20:44:09 +0000 Subject: [PATCH 2/2] Update Project.toml --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index b415ac69..7d871e50 100644 --- a/Project.toml +++ b/Project.toml @@ -3,7 +3,7 @@ uuid = "6f1fad26-d15e-5dc8-ae53-837a1d7b8c9f" license = "MIT" desc = "Tape based task copying in Turing" repo = "https://github.com/TuringLang/Libtask.jl.git" -version = "0.8.3" +version = "0.8.4" [deps] FunctionWrappers = "069b7b12-0de2-55c6-9aab-29f3d0a68a2e"