summaryrefslogtreecommitdiff
path: root/chroma/gpu/tools.py
diff options
context:
space:
mode:
authorStan Seibert <stan@mtrr.org>2012-01-31 19:44:54 -0500
committertlatorre <tlatorre@uchicago.edu>2021-05-09 08:42:38 -0700
commitbd4a0d0cc59b80dca84471174b2928bbd4c1586e (patch)
treea6e13519c955fc67f55ab1092d9a162a0464a318 /chroma/gpu/tools.py
parentfa0d480ca71b59cac938dfd5ff8538a36f7a2d67 (diff)
downloadchroma-bd4a0d0cc59b80dca84471174b2928bbd4c1586e.tar.gz
chroma-bd4a0d0cc59b80dca84471174b2928bbd4c1586e.tar.bz2
chroma-bd4a0d0cc59b80dca84471174b2928bbd4c1586e.zip
Import memoize decorator directly from pytools as it is not present in the old location in newer pycuda releases.
Diffstat (limited to 'chroma/gpu/tools.py')
-rw-r--r--chroma/gpu/tools.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/chroma/gpu/tools.py b/chroma/gpu/tools.py
index b151f80..34b4166 100644
--- a/chroma/gpu/tools.py
+++ b/chroma/gpu/tools.py
@@ -1,4 +1,5 @@
import numpy as np
+import pytools
import pycuda.tools
from pycuda import characterize
import pycuda.driver as cuda
@@ -32,7 +33,7 @@ def get_cu_module(name, options=None, include_source_directory=True):
return pycuda.compiler.SourceModule(source, options=options,
no_extern_c=True)
-@pycuda.tools.memoize
+@pytools.memoize
def get_cu_source(name):
"""Get the source code for a CUDA source file located in the chroma cuda
directory at src/[name]."""