code: def test_size_one_buffer(shape, transform):
      # This test is to catch a failure mode that occurred if a
      # transformation were applied to a te.compute buffer, and one of
      # the dimensions of the buffer was 1.  Prior to bugfix,
      # arith::DetectIterMap would fold the variable as a constant,
      # causing an error when attempting to solve for the variable using
      # arith::InverseAffineIterMap.
  
      dtype = "int8"
      A = te.placeholder(shape, dtype, name="A")
      B = te.compute(
          shape=A.shape,
          fcompute=lambda *indices: A[indices].astype(dtype),
          name="B",
      )
      s = te.create_schedule(B.op)
  
      # If layout transformation is on the output buffer, and any
      # dimension of the output buffer is 1, failure occurs in
      # CheckFusePattern.
      s[B].transform_layout(transform)
  
imports: import functools
  import sys
  import pytest
  import numpy
  import tvm
  import tvm.testing
  from tvm import te
  from tvm.tir.stmt_functor import post_order_visit
  from tvm.driver.build_module import schedule_to_module
label_desc: Use image node_id 5 for calling a global function with example usage: test_size_one_buffer(shape, transform) without return types