def METHOD_NAME(executor_kind):
    def check(sh, dtype, begin, end, strides, slice_mode):
        x = relay.var("x", shape=sh, dtype=dtype)
        f = relay.Function(
            [x],
            relay.strided_slice(x, begin=begin, end=end, strides=strides, slice_mode=slice_mode),
        )
        check_grad(f, executor_kind=executor_kind)
    check((2, 3, 4), "float32", (0, 1, 0), (-1, -1, 1), (1, 1, 1), "size")
    check((2, 3, 4), "float32", (0, 1, 0), (2, 3, 1), (1, 1, 1), "end")
    # check that strides are properly ignored when using "size" mode
    check((2, 3, 4), "float32", (0, 0, 0), (-1, -1, -1), (1, 1, 2), "size")
    check((2, 3, 4), "float32", (0, 0, 0), (2, 3, 4), (1, 1, 2), "end")