@pytest.mark.parametrize('seed', [123])
@pytest.mark.parametrize('test_case', test_cases)
@pytest.mark.parametrize('exclusive', [False, True])
@pytest.mark.parametrize('reverse', [False, True])
@pytest.mark.parametrize('with_mask', [True, False])
def test_cumprod(seed, test_case, exclusive, reverse, with_mask, nnabla_opts):
    x_shape = test_case.shape
    axis = test_case.axis

    def init(shape):
        rng = np.random.RandomState(seed)
        return create_cumprod_input(rng, shape, axis, with_mask)
    need_grad = True
    inputs = [Inspec(x_shape, init, need_grad)]
    func_kwargs = dict(axis=axis, exclusive=exclusive, reverse=reverse)
    fb = FunctionBenchmark(F.cumprod, inputs, [], func_kwargs, nnabla_opts.ext, nnabla_opts.ext_kwargs)
    fb.benchmark()
    fb.write(writer=nnabla_opts.function_benchmark_writer)
@pytest.mark.parametrize('seed', [123])
@pytest.mark.parametrize('test_case', test_cases)
@pytest.mark.parametrize('exclusive', [False, True])
@pytest.mark.parametrize('reverse', [False, True])
@pytest.mark.parametrize('with_mask', [True, False])
def test_cumprod(seed, test_case, exclusive, reverse, with_mask, nnabla_opts):
    x_shape = test_case.shape
    axis = test_case.axis

    def init(shape):
        rng = np.random.RandomState(seed)
        return create_cumprod_input(rng, shape, axis, with_mask)
    need_grad = True
    inputs = [Inspec(x_shape, init, need_grad)]
    func_kwargs = dict(axis=axis, exclusive=exclusive, reverse=reverse)
    fb = FunctionBenchmark(F.cumprod, inputs, [], func_kwargs, nnabla_opts.ext, nnabla_opts.ext_kwargs)
    fb.benchmark()
    fb.write(writer=nnabla_opts.function_benchmark_writer)