We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e45ede8 commit d63e46eCopy full SHA for d63e46e
python/cuda_cccl/cuda/coop/_caching.py
@@ -5,7 +5,6 @@
5
import hashlib
6
import json
7
import os
8
-import pickle
9
10
_ENABLE_CACHE = "CCCL_ENABLE_CACHE" in os.environ
11
if _ENABLE_CACHE:
@@ -32,15 +31,15 @@ def cacher(*args, **kwargs):
32
31
if os.path.isfile(os.path.join(_CACHE_LOCATION, h)):
33
# open it
34
with open(os.path.join(_CACHE_LOCATION, h), "rb") as f:
35
- out = pickle.load(f)
+ out = json.load(f)
36
# return cache
37
return out
38
else:
39
# compute output
40
out = func(*args, **kwargs)
41
# store to file
42
with open(os.path.join(_CACHE_LOCATION, h), "wb") as f:
43
- pickle.dump(out, f)
+ json.dump(out, f)
44
45
46
return func(*args, **kwargs)
0 commit comments