diff --git a/test/test_loopy.py b/test/test_loopy.py index 2438829f481735b0fdf4e5d5d822ac4b4c60e277..579215092a41ef3f5b512d1c0e2010a52922c885 100644 --- a/test/test_loopy.py +++ b/test/test_loopy.py @@ -1935,34 +1935,35 @@ def test_unscheduled_insn_detection(): def test_integer_reduction(): n = 200 - var_int = np.random.randint(1000, size=n, dtype=np.int32) - var_lp = lp.TemporaryVariable('var', initializer=var_int, - scope=scopes.PRIVATE, - read_only=True, - dtype=np.int32, - shape=lp.auto) - - reductions = [('max', lambda x: x == np.max(var_int)), - ('min', lambda x: x == np.min(var_int)), - ('sum', lambda x: x == np.sum(var_int)), - ('product', lambda x: x == np.prod(var_int)), - ('argmax', lambda x: (x[0] == np.max(var_int) and - x[1] == np.argmax(var_int))), - ('argmin', lambda x: (x[0] == np.min(var_int) and - x[1] == np.argmin(var_int)))] - - for reduction, function in reductions: - kstr = (("out" if not 'arg' in reduction - else "out[0], out[1]") + ' = {}(k, var[k])'.format(reduction)) - knl = lp.make_kernel('{[k]: 0<=k 1: