Lunderberg commented on code in PR #16727:
URL: https://github.com/apache/tvm/pull/16727#discussion_r1539352746


##########
tests/python/tir-transform/test_tir_transform_lower_tvm_builtin.py:
##########
@@ -260,11 +260,13 @@ def expected():
 
 
 class TestLowerAllocateRequiresDeviceID(tvm.testing.CompareBeforeAfter):
+    """If device id is missing, error."""
+
     transform = tvm.tir.transform.LowerTVMBuiltin()
 
     def before():
         T.func_attr({"target": T.target("llvm")})
-        T.attr("dummy", "device_id", 0)
+        T.attr("dummy", "device_type", 2)  # kDLCuda

Review Comment:
   Good question, and looks like it is defined in the `tvm.runtime.Device` 
struct.  I've updated the usage here, and throughout this unit test file.



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