diff --git a/CHANGELOG.md b/CHANGELOG.md index 5f1b70280..a2ed221ad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ## [Upcoming Release] - 2024-??-?? - Improve memory usage and performance for rigid body contact handling when `self.rigid_mesh_contact_max` is zero (default behavior) +- Fix generic function caching ## [1.2.0] - 2024-06-06 diff --git a/warp/context.py b/warp/context.py index c758e8ff2..93547444a 100644 --- a/warp/context.py +++ b/warp/context.py @@ -1488,8 +1488,9 @@ def hash_recursive(module, visited): # functions source for function in module.functions.values(): - # include all overloads - for sig, func in function.user_overloads.items(): + # include all concrete and generic overloads + overloads = itertools.chain(function.user_overloads.items(), function.user_templates.items()) + for sig, func in overloads: # signature ch.update(bytes(sig, "utf-8"))