diff options
| author | Anthony LaTorre <tlatorre9@gmail.com> | 2011-06-18 19:47:48 -0400 |
|---|---|---|
| committer | Anthony LaTorre <tlatorre9@gmail.com> | 2011-06-18 19:47:48 -0400 |
| commit | c51c2e8d9c9d841af567d8bb57217db3340efb60 (patch) | |
| tree | 727492dc890bd647fa0a2571460dd83c1a4bdc9f /gputhread.py | |
| parent | ab54917bceb4943f6750f589ffe6a032b2770fb1 (diff) | |
| download | chroma-c51c2e8d9c9d841af567d8bb57217db3340efb60.tar.gz chroma-c51c2e8d9c9d841af567d8bb57217db3340efb60.tar.bz2 chroma-c51c2e8d9c9d841af567d8bb57217db3340efb60.zip | |
forgot to initialize gpu random number states in gputhread.run()
Diffstat (limited to 'gputhread.py')
| -rw-r--r-- | gputhread.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gputhread.py b/gputhread.py index 3aa3cb2..0ee0155 100644 --- a/gputhread.py +++ b/gputhread.py @@ -75,8 +75,11 @@ class GPUThread(threading.Thread): context = device.make_context() module = SourceModule(src.kernel, options=['-I' + src.dir], no_extern_c=True, cache_dir=False) propagate = module.get_function('propagate') + init_rng = module.get_function('init_rng') texrefs = self.geometry.load(module) + init_rng(np.int32(1000000), np.int32(0), np.int32(0), block=(self.nblocks,1,1), grid=(1000000//self.nblocks,1)) + while not self.stopped(): try: job = self.jobs.get(block=False, timeout=0.5) |
