lhutton1 commented on code in PR #13216:
URL: https://github.com/apache/tvm/pull/13216#discussion_r1008006810


##########
tests/python/driver/tvmc/test_transform.py:
##########
@@ -0,0 +1,57 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+import pytest
+import numpy as np
+
+import tvm
+from tvm import relay
+from tvm.driver.tvmc.transform import convert_graph_layout
+
+
+def test_layout_transform():

Review Comment:
   I think the issue with the current test is that it checks more than it 
really needs to and might become a maintenance burden going forwards. Ideally 
I'd like to make use of pass instruments to check that `ConvertLayout` and 
`FoldConstant` are run in the correct order, which means that we aren't tied to 
the implementation details of the passes. However, the use of `PassContext` 
here overwrites any context set by the user (and therefore by the test that 
adds the instrumentation) so I think we should remove this and set the context 
from the callee(s) - given the test works for now, could we do this in a follow 
up?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to