mbs-octoml commented on code in PR #11432:
URL: https://github.com/apache/tvm/pull/11432#discussion_r883821702


##########
tests/python/relay/test_target_hooks.py:
##########
@@ -50,6 +56,49 @@ def test_tir_external_generation(check_result):
     check_result(func, inputs, (8,), x_data - y_data)
 
 
+# TODO(mbs): The check_aot_executor_result does not support list-of-targets, 
mostly because
+# tvm.testing.aot.compile_and_run requires the target to be a kind name 
string, and
+# tvm.testing.aot.compile_models requires a single Target object. However, 
code outside of
+# tvm.testing.aot is ready for this more general form.
[email protected]("check_result", [check_graph_executor_result, 
check_vm_result])
+def test_tir_external_generation_outline_with_target_instance(check_result):
+    shape = (8,)
+    x_data = np.random.randint(255, size=shape).astype("float32")
+    y_data = np.random.randint(255, size=shape).astype("float32")
+    inputs = {"x": x_data, "y": y_data}
+    # Compile with an instance of the hooked target kind to demonstrate 
plumbing target attributes
+    # into custom passes.

Review Comment:
   Good point, I wrote a 'proper' comment on the RelayToTIRTargetHook decl.
   
   At some point we should  rename that PreLoweringTargetHooks or similar since 
the 'ToTIR' part is too specific.



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