diff --git a/python/tvm/relay/backend/contrib/ethosu/tir/passes.py b/python/tvm/relay/backend/contrib/ethosu/tir/passes.py index 365649ca25cae..10315ed93fad3 100644 --- a/python/tvm/relay/backend/contrib/ethosu/tir/passes.py +++ b/python/tvm/relay/backend/contrib/ethosu/tir/passes.py @@ -824,7 +824,7 @@ def CopyComputeReordering(max_copy_movements: Optional[int] = None) -> tvm.IRMod ---------- max_copy_movements: Optional[int] The maximum number of movements allowed for a copy. - If None, the pass context option tir.copy_compute_reordering_max_copy_movements + If None, the pass context option tir.ethosu.copy_compute_reordering_max_copy_movements is used if provided, otherwise the default value will be 1. Returns diff --git a/src/tir/contrib/ethosu/passes.cc b/src/tir/contrib/ethosu/passes.cc index cd35a5f17675c..731c83d52b2d9 100644 --- a/src/tir/contrib/ethosu/passes.cc +++ b/src/tir/contrib/ethosu/passes.cc @@ -35,7 +35,7 @@ namespace tvm { * \brief The maximum number of movements allowed for a copy in the CopyComputeReordering pass. */ constexpr const char* kCopyComputeReorderingMaxCopyMovements = - "tir.copy_compute_reordering_max_copy_movements"; + "tir.ethosu.copy_compute_reordering_max_copy_movements"; TVM_REGISTER_PASS_CONFIG_OPTION(kCopyComputeReorderingMaxCopyMovements, Integer); namespace tir { @@ -197,7 +197,7 @@ class CopyComputeReorderingMutator : public StmtExprMutator { * and computes happen in parallel. * * \param max_copy_movements: The maximum number of movements allowed for a copy. - * If None, the pass context option tir.copy_compute_reordering_max_copy_movements + * If None, the pass context option tir.ethosu.copy_compute_reordering_max_copy_movements * is used if provided, otherwise the default value will be 1. * \return tvm::transform::Pass */ diff --git a/tests/python/contrib/test_ethosu/test_copy_compute_reordering.py b/tests/python/contrib/test_ethosu/test_copy_compute_reordering.py index 27a8a8076848b..7db3a4c3ec462 100644 --- a/tests/python/contrib/test_ethosu/test_copy_compute_reordering.py +++ b/tests/python/contrib/test_ethosu/test_copy_compute_reordering.py @@ -460,7 +460,9 @@ def main() -> None: T.evaluate(T.call_extern("ethosu_conv2d", "int8", 214, 114, 5, 214, 0, 114, p4[0], 0, 0, 0, T.float32(0.0174839), -128, "NHCWB16", 1824, 16, 1, "int8", 214, 114, 3, 214, 0, 114, buffer3[0], 0, 0, 0, T.float32(0.104816), -128, "NHWC", 342, 3, 1, 3, 1, 1, 1, 1, 2, p5[0], 96, 0, p6[0], 32, 0, 1, 0, 1, "CLIP", -128, 127, "TFL", "NONE", 0, 0, 0, dtype="handle")) # fmt: on - with tvm.transform.PassContext(config={"tir.copy_compute_reordering_max_copy_movements": 2}): + with tvm.transform.PassContext( + config={"tir.ethosu.copy_compute_reordering_max_copy_movements": 2} + ): test_mod = CopyComputeReordering()(OperatorsWithAndWithoutWeights) reference_mod = ReferenceModule tvm.ir.assert_structural_equal(test_mod, reference_mod, True)