summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStan Seibert <stan@mtrr.org>2011-08-11 17:41:48 -0400
committerStan Seibert <stan@mtrr.org>2011-08-11 17:41:48 -0400
commit2b7ee5fb5a20fadfa24766442d2d3609ed291b63 (patch)
tree1c98fc3667b7e1e8ee9b31efd7b778ef8b0a0617
parent1b9aef380e629c136e045412621483ebb4a4164f (diff)
downloadchroma-2b7ee5fb5a20fadfa24766442d2d3609ed291b63.tar.gz
chroma-2b7ee5fb5a20fadfa24766442d2d3609ed291b63.tar.bz2
chroma-2b7ee5fb5a20fadfa24766442d2d3609ed291b63.zip
Tell CUDA to enlarge L1 cache.
-rw-r--r--gpu.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/gpu.py b/gpu.py
index 16e6f4a..fbf1fef 100644
--- a/gpu.py
+++ b/gpu.py
@@ -72,6 +72,9 @@ class GPU(object):
device = cuda.Device(device_id)
self.context = device.make_context()
print 'device %s' % self.context.get_device().name()
+
+ self.context.set_cache_config(cuda.func_cache.PREFER_L1)
+
cuda_options = ['-I' + src.dir, '--use_fast_math', '--ptxas-options=-v']
self.module = SourceModule(src.kernel, options=cuda_options, no_extern_c=True)