Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion python/dump-properties.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def print_info(obj, info_cls):
try:
print(f"{info_name}: {info_value}")
except Exception:
print("%s: <error>" % info_name)
print(f"{info_name}: <error>")


for platform in cl.get_platforms():
Expand Down
9 changes: 3 additions & 6 deletions python/transpose.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ def benchmark_transpose():
mem_bandwidths = {}

methods = [SillyTranspose, NaiveTranspose, TransposeWithLocal]
count = 12
for cls in methods:
name = cls.__name__.replace("Transpose", "")

Expand All @@ -183,14 +184,10 @@ def benchmark_transpose():
a_t_buf = cl.Buffer(ctx, mf.WRITE_ONLY, size=source.nbytes)
method = cls(ctx)

for i in range(4):
for _ in range(4):
method(queue, a_t_buf, a_buf, source.shape)

count = 12
events = []
for i in range(count):
events.append(method(queue, a_t_buf, a_buf, source.shape))

events = [method(queue, a_t_buf, a_buf, source.shape) for _ in range(count)]
events[-1].wait()
time = sum(evt.profile.end - evt.profile.start for evt in events)

Expand Down