code: def schedule_cache_reads(sch):
      """Schedule cache reads that have been introduced.
  
      There are two things we need to happen to cache_read stages. They should be tagged
      with the 'ethosu_copy' pragma and have all their axes fused to make them 1D.
  
      Parameters
      ----------
      sch : tvm.te.Schedule
          The schedule.
  
      """
  
      def _detect_cache_read(stage):
          # Try and detect cache_reads by checking if the compute op is identity
          if isinstance(stage.op, tvm.te.ComputeOp):
              op = stage.op
              if "ethosu" in op.name:
                  return False
              axes = op.axis
              if len(op.input_tensors) == 1:
                  tensor = op.input_tensors[0]
                  try:
                      identity_op = tensor(*axes)
                  except ValueError:
                      return False
                  if tvm.tir.analysis.expr_deep_equal(
                      identity_op, op.body[0]
                  ):
                      return True
          return False
  
      for stage in sch.stages:
          if stage.attach_type != 2:  # Not inlined
              if _detect_cache_read(stage):
                  fax = stage.fuse(*stage.op.axis)
  
                  # propagate pragmas placed on the outer loop
                  if (
                      len(stage.op.axis) > 0
                      and stage.op.axis[0] in stage.iter_var_attrs
                  ):
                      attrs = stage.iter_var_attrs[stage.op.axis[0]]
                      for k, v in zip(
                          attrs.pragma_keys, attrs.pragma_values
                      ):
                          stage.pragma(fax, k.value, v)
  
                  stage.pragma(fax, "op", "ethosu_copy")
  
file_path: tvm/python/tvm/relay/backend/contrib/ethosu/tir/scheduler.py
imports: import tvm
  from tvm.contrib.ethosu.cascader import Propagator
label_desc: Use image node_id 7 for calling a global function with example usage: schedule_cache_reads(sch) and returns: False, False, True, False