Creates tests/cpp/test_mutator.cpp and moves the OptOutMutator tests from test_dynamic_transform.cpp into that file.
Adds a new test that repros #3409
Adds an additional argument const std::vector<IterDomain*>& additional_ids to one of the TensorDomain constructors.
Uses that constructor in OptOutMutator::mutate(TensorDomain*) to pass a mutated additional_ids.
A bit off-topic maybe: implementing this got me thinking more about traversals and whether or not StmtSort::getStmts(fusion, /*traverse_members=*/true) will still guarantee full traversals now that the loop domain is not necessarily the set of leaf IterDomains in the TensorDomain:
https://github.com/NVIDIA/Fuser/blob/f1a7e23604dc8639bec488e472909eca8bdbbb31/csrc/iter_visitor.cpp#L71-L74
I think in another PR we might want to modify this code to ensure that we traverse all of domain->allIDs() in topological order.
Fixes #3409
This PR does the following:
tests/cpp/test_mutator.cpp
and moves theOptOutMutator
tests fromtest_dynamic_transform.cpp
into that file.const std::vector<IterDomain*>& additional_ids
to one of theTensorDomain
constructors.OptOutMutator::mutate(TensorDomain*)
to pass a mutatedadditional_ids
.A bit off-topic maybe: implementing this got me thinking more about traversals and whether or not
StmtSort::getStmts(fusion, /*traverse_members=*/true)
will still guarantee full traversals now that the loop domain is not necessarily the set of leaf IterDomains in the TensorDomain: https://github.com/NVIDIA/Fuser/blob/f1a7e23604dc8639bec488e472909eca8bdbbb31/csrc/iter_visitor.cpp#L71-L74 I think in another PR we might want to modify this code to ensure that we traverse all ofdomain->allIDs()
in topological order.