diff options
author | Anthony LaTorre <tlatorre9@gmail.com> | 2011-09-10 13:42:27 -0400 |
---|---|---|
committer | Anthony LaTorre <tlatorre9@gmail.com> | 2011-09-10 13:42:27 -0400 |
commit | 1e192ba2349bc70efb1090c72f318470d8920970 (patch) | |
tree | 7a664c501553b050a1391f333b67c9d164f7a4ca /benchmark.py | |
parent | 3c50c82458242d012216661e2e7eca2255f38207 (diff) | |
download | chroma-1e192ba2349bc70efb1090c72f318470d8920970.tar.gz chroma-1e192ba2349bc70efb1090c72f318470d8920970.tar.bz2 chroma-1e192ba2349bc70efb1090c72f318470d8920970.zip |
update benchmark.py
Diffstat (limited to 'benchmark.py')
-rwxr-xr-x | benchmark.py | 12 |
1 files changed, 6 insertions, 6 deletions
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() |