mbs-octoml commented on a change in pull request #9421:
URL: https://github.com/apache/tvm/pull/9421#discussion_r741210407



##########
File path: tests/python/relay/test_vm.py
##########
@@ -999,6 +999,71 @@ def test_shape_func_nested_function():
     compiler.lower(mod, "llvm")
 
 
+def test_storage_size_and_offset_on_cpu():
+    """Tests allocations place sizes and offsets on the CPU host even if the 
rest
+    of the computation is on a different device type."""
+
+    # CPU = device type 1
+    # GPU = device type 2
+    def input():
+        return tvm.parser.fromtext(
+            """
+            #[version = "0.0.5"]
+            def @main(%a: Tensor[(5, 7), float32],
+                      param_device_types=[2], result_device_type=2) {
+              add(%a, %a)
+            }
+        """
+        )
+
+    exe = relay.vm.compile(
+        input(),
+        tvm.target.Target("cuda"),
+    )
+
+    print(exe.constants)

Review comment:
       done




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