def METHOD_NAME(
    batch,
    in_size,
    in_channel,
    num_filter,
    kernel,
    stride,
    padding,
    activation_bits,
    weight_bits,
    unipolar,
):
    in_height = in_width = in_size
    input_dtype = "uint32"
    out_dtype = "int32"
    with tvm.target.Target("llvm"):
        A = te.placeholder((batch, in_channel, in_height, in_width), dtype=input_dtype, name="A")
        W = te.placeholder((num_filter, in_channel, kernel, kernel), dtype=input_dtype, name="W")
        B = topi.x86.bitserial_conv2d_nchw(
            A, W, stride, padding, activation_bits, weight_bits, input_dtype, out_dtype, unipolar
        )
        s = topi.x86.schedule_bitserial_conv2d_nchw([B])
    a_shape = get_const_tuple(A.shape)
    w_shape = get_const_tuple(W.shape)
    @memoize("topi.tests.test_topi_bitseral_conv2d_nchw")
    def get_ref_data():
        a_np = generate_quantized_np(get_const_tuple(a_shape), activation_bits, input_dtype)
        w_np = generate_quantized_np(get_const_tuple(w_shape), weight_bits, input_dtype)
        if unipolar:
            w_ = np.copy(w_np).astype(out_dtype)
            for x in np.nditer(w_, op_flags=["readwrite"]):
                x[...] = 1 if x == 1 else -1
            b_np = tvm.topi.testing.conv2d_nchw_python(a_np.astype(out_dtype), w_, stride, padding)
        else:
            b_np = tvm.topi.testing.conv2d_nchw_python(a_np, w_np, stride, padding)
        return a_np, w_np, b_np
    a_np, w_np, b_np = get_ref_data()
    dev = tvm.cpu(0)
    a = tvm.nd.array(a_np, dev)
    w = tvm.nd.array(w_np, dev)
    b = tvm.nd.array(np.zeros(get_const_tuple(B.shape), dtype=B.dtype), dev)
    func = tvm.build(s, [A, W, B], "llvm")
    func(a, w, b)
    tvm.testing.assert_allclose(b.numpy(), b_np, rtol=1e-5)