From 1e192ba2349bc70efb1090c72f318470d8920970 Mon Sep 17 00:00:00 2001 From: Anthony LaTorre Date: Sat, 10 Sep 2011 13:42:27 -0400 Subject: update benchmark.py --- benchmark.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'benchmark.py') diff --git a/benchmark.py b/benchmark.py index 329986c..f21a796 100755 --- a/benchmark.py +++ b/benchmark.py @@ -147,23 +147,23 @@ if __name__ == '__main__': from chroma import detectors import gc - lbne = detectors.build_lbne_200kton() + lbne = detectors.lbne() lbne.build(bits=11) - gpu_instance = gpu.GPU() + context = gpu.create_cuda_context() gpu_geometry = gpu.GPUGeometry(lbne) - gpu_instance.print_mem_info() print '%s ray intersections/sec.' % \ tools.ufloat_to_str(intersect(gpu_geometry)) + # run garbage collection since there is a reference loop + # in the GPUArray class. gc.collect() - gpu_instance.print_mem_info() print '%s photons loaded/sec.' % tools.ufloat_to_str(load_photons()) gc.collect() - gpu_instance.print_mem_info() print '%s photons propagated/sec.' % \ tools.ufloat_to_str(propagate(gpu_geometry)) gc.collect() - gpu_instance.print_mem_info() print '%s 100 MeV events histogrammed/s' % \ tools.ufloat_to_str(pdf(gpu_geometry, max(lbne.pmtids))) + + context.pop() -- cgit