Skip to content

Commit

Permalink
Fix for #158 (#159)
Browse files Browse the repository at this point in the history
* Cache key

* Update Project.toml

Co-authored-by: Hong Ge <[email protected]>
  • Loading branch information
FredericWantiez and yebai authored Nov 2, 2022
1 parent 5ec9f2b commit ca5f155
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion src/tapedfunction.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down

2 comments on commit ca5f155

@yebai
Copy link
Member

@yebai yebai commented on ca5f155 Nov 2, 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/71526

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 v0.8.4 -m "<description of version>" ca5f155f77a2b7bdaf7829d2dd3476f62e62addf
git push origin v0.8.4

Please sign in to comment.