You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2022/01/06 18:37:41 UTC

[GitHub] [tvm] comaniac commented on a change in pull request #9856: [AMP] Fix IsMixedPrecisionType Edge Case

comaniac commented on a change in pull request #9856:
URL: https://github.com/apache/tvm/pull/9856#discussion_r779771429



##########
File path: tests/python/relay/test_to_mixed_precision.py
##########
@@ -459,5 +459,34 @@ def test_batch_matmul_simple():
     assert tvm.ir.structural_equal(expected_mod, output_mod)
 
 
+def test_convert_follow_node_with_integer_arguments():
+    """Tests the conversion of a follow op with integer arguments + constant float args.
+
+    The follow op should convert the floating point argument into fp16 as constants/vars
+    will always be converted if safe to do so.
+    """
+
+    data = relay.var("data", shape=[1, 10], dtype="float32")
+
+    # We add have an addition to make sure the input indices to take are not a
+    # var (which are always casted if safe)

Review comment:
       ```suggestion
       # We use an addition to make sure the input indices are not a var
       # (which are always casted if safe)
   ```




-- 
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