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


##########
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:
   Is this constant defined anywhere on the Python side? Perhaps it should be, 
to avoid such magic numbers (if we expect that to happen again).



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