Skip to content

Commit ca5f155

Browse files
Fix for #158 (#159)
* Cache key * Update Project.toml Co-authored-by: Hong Ge <[email protected]>
1 parent 5ec9f2b commit ca5f155

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Diff for: Project.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ uuid = "6f1fad26-d15e-5dc8-ae53-837a1d7b8c9f"
33
license = "MIT"
44
desc = "Tape based task copying in Turing"
55
repo = "https://github.com/TuringLang/Libtask.jl.git"
6-
version = "0.8.3"
6+
version = "0.8.4"
77

88
[deps]
99
FunctionWrappers = "069b7b12-0de2-55c6-9aab-29f3d0a68a2e"

Diff for: src/tapedfunction.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ mutable struct TapedFunction{F, TapeType}
6262

6363
function TapedFunction{F, T}(f::F, args...; cache=false, deepcopy_types=Union{}) where {F, T}
6464
args_type = _accurate_typeof.(args)
65-
cache_key = (f, args_type...)
65+
cache_key = (f, deepcopy_types, args_type...)
6666

6767
if cache && haskey(TRCache, cache_key) # use cache
6868
cached_tf = TRCache[cache_key]::TapedFunction{F, T}

0 commit comments

Comments
 (0)