Skip to content

Commit

Permalink
use np.prod instead of np.product
Browse files Browse the repository at this point in the history
  • Loading branch information
alexfikl authored and inducer committed Jun 20, 2023
1 parent b01dc7a commit ef4f6f1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/test_c_execution.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def __get_kernel(order="C"):
# test with C-order
knl = __get_kernel("C")
a_lp = next(x for x in knl["nonsquare_strides"].args if x.name == "a")
a_np = np.reshape(np.arange(np.product(a_lp.shape), dtype=np.float32),
a_np = np.reshape(np.arange(np.prod(a_lp.shape), dtype=np.float32),
a_lp.shape,
order="C")

Expand All @@ -127,7 +127,7 @@ def __get_kernel(order="C"):
# test with F-order
knl = __get_kernel("F")
a_lp = next(x for x in knl["nonsquare_strides"].args if x.name == "a")
a_np = np.reshape(np.arange(np.product(a_lp.shape), dtype=np.float32),
a_np = np.reshape(np.arange(np.prod(a_lp.shape), dtype=np.float32),
a_lp.shape,
order="F")

Expand Down Expand Up @@ -163,7 +163,7 @@ def __get_kernel(order="C"):
# test with ILP
knl, sizes = __get_kernel("C")
knl = lp.split_iname(knl, "i", 4, inner_tag="ilp")
a_np = np.reshape(np.arange(np.product(sizes), dtype=np.float32),
a_np = np.reshape(np.arange(np.prod(sizes), dtype=np.float32),
sizes,
order="C")

Expand All @@ -172,7 +172,7 @@ def __get_kernel(order="C"):
# test with unrolling
knl, sizes = __get_kernel("C")
knl = lp.split_iname(knl, "i", 4, inner_tag="unr")
a_np = np.reshape(np.arange(np.product(sizes), dtype=np.float32),
a_np = np.reshape(np.arange(np.prod(sizes), dtype=np.float32),
sizes,
order="C")

Expand Down

0 comments on commit ef4f6f1

Please sign in to comment.