Skip to content

Instantly share code, notes, and snippets.

@asi1024
Created October 6, 2021 10:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save asi1024/3bbafaf39f51931d1b02980a6ba30d94 to your computer and use it in GitHub Desktop.
Save asi1024/3bbafaf39f51931d1b02980a6ba30d94 to your computer and use it in GitHub Desktop.
sizes = [
128,
512,
2 * 1024,
8 * 1024,
32 * 1024,
128 * 1024,
512 * 1024,
2 * 1024 * 1024,
8 * 1024 * 1024,
32 * 1024 * 1024,
128 * 1024 * 1024,
]
for n in sizes:
random_state = cupy.random.RandomState(seed=1)
array = cupy.arange(n)
name = f'size = {n}'
perf = cupyx.time.repeat(random_state.shuffle, (array,), name=name, max_duration=5)
print(perf)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment