code: def test_scan_fix_point():
      m = te.var("m")
      n = te.var("n")
      l = te.var("l")
      x = te.compute(
          (l, m, n), lambda *i: tvm.tir.const(1, "float32"), name="x"
      )
      s_state = te.placeholder((l, m, n))
      s_init = te.compute(
          (1, m, n), lambda _, i, j: x[0, i, j], name="s_init"
      )
  
      def test_scan0():
          s_update = te.compute(
              (l, m, n),
              lambda t, i, j: x[t, j, i] + s_state[t - 1, i, j],
              name="update",
          )
          s_scan = tvm.te.scan(s_init, s_update, s_state)
          body = tvm.te.schedule.ScanGetBody(s_scan.op)
          fxpt = tvm.te.schedule.ScanFixPointAnalysis(s_scan.op)
          assert fxpt[s_scan.op.spatial_axis_[0]].value == 1
          assert fxpt[s_scan.op.spatial_axis_[1]].value == 1
  
      def test_scan1():
          s_update = te.compute(
              (l, m, n),
              lambda t, i, j: x[t, j, i] + s_state[t - 1, j, i],
              name="update",
          )
          s_scan = tvm.te.scan(s_init, s_update, s_state)
          body = tvm.te.schedule.ScanGetBody(s_scan.op)
          fxpt = tvm.te.schedule.ScanFixPointAnalysis(s_scan.op)
          assert fxpt[s_scan.op.spatial_axis_[0]].value == 0
          assert fxpt[s_scan.op.spatial_axis_[1]].value == 0
  
      def test_scan3_not_exact_reach():
          s_h1 = te.compute(
              (l, n, m), lambda t, j, i: s_state[t - 1, i, j], name="h1"
          )
          s_h2 = te.compute(
              (l, m, n),
              lambda t, i, j: s_state[t - 1, i, 10] * 2,
              name="h1",
          )
          s_update = te.compute(
              (l, m, n),
              lambda t, i, j: s_h1[t, j, i] + s_h2[t, i, j],
              name="update",
          )
          s_scan = tvm.te.scan(s_init, s_update, s_state)
          body = tvm.te.schedule.ScanGetBody(s_scan.op)
          fxpt = tvm.te.schedule.ScanFixPointAnalysis(s_scan.op)
          assert fxpt[s_scan.op.spatial_axis_[0]].value == 1
          assert fxpt[s_scan.op.spatial_axis_[1]].value == 0
  
      def test_scan4_reach_other():
          s_h1 = te.compute(
              (l, n, m), lambda t, j, i: s_state[t - 1, j, j], name="h1"
          )
          s_h2 = te.compute(
              (l, m, n),
              lambda t, i, j: s_state[t - 1, i, j] * 2,
              name="h1",
          )
          s_update = te.compute(
              (l, m, n),
              lambda t, i, j: s_h1[t, j, i] + s_h2[t, i, j],
              name="update",
          )
          s_scan = tvm.te.scan(s_init, s_update, s_state)
          fxpt = tvm.te.schedule.ScanFixPointAnalysis(s_scan.op)
          assert fxpt[s_scan.op.spatial_axis_[0]].value == 0
          assert fxpt[s_scan.op.spatial_axis_[1]].value == 0
  
      def test_scan5_multi_output():
          m = te.var("m")
          n = te.var("n")
          x1 = te.placeholder((m, n))
          s1 = te.placeholder((m, n))
          x2 = te.placeholder((m, n))
          s2 = te.placeholder((m, n))
          s1_init = te.compute((1, n), lambda _, i: x1[0, i])
          s2_init = te.compute((1, n), lambda _, i: x2[0, i])
          s1_update = te.compute(
              (m, n), lambda t, i: s1[t - 1, i] + x1[t, i]
          )
          s2_update = te.compute(
              (m, n), lambda t, i: x2[t, i] + s2[t - 1, i]
          )
          r0, r1 = tvm.te.scan(
              [s1_init, s2_init], [s1_update, s2_update], [s1, s2]
          )
          body = tvm.te.schedule.ScanGetBody(r0.op)
          fxpt = tvm.te.schedule.ScanFixPointAnalysis(r0.op)
          assert fxpt[r1.op.spatial_axis_[0]].value == 1
  
      test_scan0()
      test_scan1()
      test_scan3_not_exact_reach()
      test_scan4_reach_other()
      test_scan5_multi_output()
  
imports: import tvm
  from tvm import te
label_desc: Use image node_id 2 for calling a global function with example usage: test_scan_fix_point() without return types