MCPcopy Create free account
hub / github.com/NVIDIA/cuda-samples / warmup

Function warmup

python/1_GettingStarted/numpyVsCupy/numpyVsCupy.py:71–77  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

69
70
71def warmup():
72 # Pre-runs a simple GPU operation to avoid first-run overhead in benchmarking.
73 print("Warmup...")
74 a_cp = cp.ones((16, 16))
75 b_cp = cp.ones((16, 16))
76 result_cp = cp.dot(a_cp, b_cp)
77 return result_cp
78
79
80def run(n):

Callers 1

runFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected