Now using a list of event instead of a single one

This commit is contained in:
Philippe Tillet
2015-02-08 00:56:24 -05:00
parent b768e913c9
commit 9c68704f09
7 changed files with 156 additions and 137 deletions

View File

@@ -213,7 +213,7 @@ class ArgumentsHandler:
self.blas3_size = map(int, self.blas3_size)
if __name__ == "__main__":
atd.state.queue_properties = atd.queue_properties_type.CL_QUEUE_PROFILING_ENABLE
atd.state.queue_properties = atd.CL_QUEUE_PROFILING_ENABLE
platforms = atd.get_platforms()
devices = [d for platform in platforms for d in platform.get_devices()]

View File

@@ -220,11 +220,9 @@ def benchmark(template, symbolic):
queue.models[template, atd.float32] = atd.model(template, queue)
x = atd.array(symbolic)
atd.synchronize(symbolic.context)
current_time = 0
timings = []
x, event, cache = atd.flush(symbolic)
x, events, cache = atd.flush(symbolic)
atd.synchronize(symbolic.context)
return 1e-9*(event.end - event.start)
return 1e-9*sum([e.end - e.start for e in events])
def sanitize_string(string, keep_chars = ['_']):