mirror of
https://github.com/ml-explore/mlx.git
synced 2025-09-01 04:24:36 +08:00
Faster gather and scatter. (#682)
Reduce unnecessary integer ops, especially since there kernels are integer bound. Increase number of iterations for benchmarks for better smoothing. Github Issue #506 Co-authored-by: Vijay Krishnamoorthy <vijay_krish@apple.com>
This commit is contained in:
@@ -28,7 +28,7 @@ def measure_runtime(fn, **kwargs):
|
||||
fn(**kwargs)
|
||||
|
||||
tic = time.time()
|
||||
iters = 10
|
||||
iters = 100
|
||||
for _ in range(iters):
|
||||
fn(**kwargs)
|
||||
return (time.time() - tic) * 1000 / iters
|
||||
|
Reference in New Issue
Block a user