Cleaned model building ; added some informative commented code

This commit is contained in:
Philippe Tillet
2014-10-13 03:38:19 +02:00
parent b8d339e54d
commit 6313f060cb
5 changed files with 93 additions and 61 deletions

View File

@@ -198,11 +198,11 @@ def benchmark(template, statement, device):
statement.result.context.finish_all_queues()
N = 0
current_time = 0
while current_time < 1e-2:
while current_time < 1e-1:
time_before = time.time()
template.execute(statement,False)
statement.result.context.finish_all_queues()
current_time += time.time() - time_before
current_time = current_time + time.time() - time_before
N+=1
return current_time/N