You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by "srkreddy1238 (via GitHub)" <gi...@apache.org> on 2023/03/02 06:28:51 UTC

[GitHub] [tvm] srkreddy1238 commented on a diff in pull request #14010: [TVMC][TRANSFORMS] ToMixedPrecision transform support with custom options enabled

srkreddy1238 commented on code in PR #14010:
URL: https://github.com/apache/tvm/pull/14010#discussion_r1122647212


##########
python/tvm/driver/tvmc/transform.py:
##########
@@ -13,15 +13,97 @@
 # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 # KIND, either express or implied.  See the License for the
 # specific language
+# pylint: disable=unused-argument
 """
 TVMC Graph Transforms
 """
 
 from tvm import relay, transform
 from tvm.driver.tvmc import TVMCException
 
+# ToMixedPrecision
+ACC_DTYPE = "float32"
 
-def convert_graph_layout(mod, desired_layout):
+
+def mixed_precision_rule(call_node: "relay.Call", mixed_precision_type: str):
+    global ACC_DTYPE

Review Comment:
   Reworked without globals.



-- 
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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org