diff options
author | Stan Seibert <stan@mtrr.org> | 2011-08-09 20:10:32 -0400 |
---|---|---|
committer | Stan Seibert <stan@mtrr.org> | 2011-08-09 20:10:32 -0400 |
commit | d6f134b477968b8a375612351098735c5f6d53eb (patch) | |
tree | 53b6ff3f5491f553835dde01b9d95ac5025e37c2 | |
parent | 0f0028484c3b8168d54c4c8b0f490cc573a6190e (diff) | |
download | chroma-d6f134b477968b8a375612351098735c5f6d53eb.tar.gz chroma-d6f134b477968b8a375612351098735c5f6d53eb.tar.bz2 chroma-d6f134b477968b8a375612351098735c5f6d53eb.zip |
The --use-fast-math gives the simulation another 25% speed boost.
-rw-r--r-- | gpu.py | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -72,13 +72,15 @@ class GPU(object): device = cuda.Device(device_id) self.context = device.make_context() print 'device %s' % self.context.get_device().name() - self.module = SourceModule(src.kernel, options=['-I' + src.dir], no_extern_c=True) + cuda_options = ['-I' + src.dir, '--use_fast_math'] + + self.module = SourceModule(src.kernel, options=cuda_options, no_extern_c=True) self.geo_funcs = CUDAFuncs(self.module, ['set_wavelength_range', 'set_material', 'set_surface', 'set_global_mesh_variables', 'color_solids']) self.prop_funcs = CUDAFuncs(self.module, ['init_rng', 'propagate']) self.nthread_per_block = 64 self.max_blocks = 1024 - self.daq_module = SourceModule(src.daq, options=['-I' + src.dir], no_extern_c=True) + self.daq_module = SourceModule(src.daq, options=cuda_options, no_extern_c=True) self.daq_funcs = CUDAFuncs(self.daq_module, ['reset_earliest_time_int', 'run_daq', 'convert_sortable_int_to_float']) |