Skip to content

Commit

Permalink
Linter
Browse files Browse the repository at this point in the history
  • Loading branch information
frostedoyster committed Nov 14, 2023
1 parent a6453fd commit a452284
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions python/mops/benchmarks/sasax.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import numpy as np
from benchmark import benchmark, format_mean_std
from mops.reference_implementations import (
sparse_accumulation_scatter_add_with_weights as ref_sasax,
)

from mops import sparse_accumulation_scatter_add_with_weights as sasax

# from mops.reference_implementations import (
# sparse_accumulation_scatter_add_with_weights as ref_sasax,
# )

np.random.seed(0xDEADBEEF)

A = np.random.rand(60000, 13)
Expand All @@ -19,7 +20,9 @@
M_2 = np.random.randint(7, size=(900,))
M_3 = np.random.randint(n_O, size=(900,))

# ref_mean, ref_std = benchmark(lambda: ref_sasax(A, R, X, C, I, J, M_1, M_2, M_3, n_O), repeats=3, warmup=1) # very slow
# ref_mean, ref_std = benchmark(
# lambda: ref_sasax(A, R, X, C, I, J, M_1, M_2, M_3, n_O), repeats=3, warmup=1
# ) # very slow
mean, std = benchmark(lambda: sasax(A, R, X, C, I, J, M_1, M_2, M_3, n_O))

# print("Reference implementation:", format_mean_std(ref_mean, ref_std))
Expand Down

0 comments on commit a452284

Please sign in to comment.