lhutton1 commented on code in PR #14981:
URL: https://github.com/apache/tvm/pull/14981#discussion_r1230665774


##########
src/target/target_kind.cc:
##########
@@ -257,6 +257,12 @@ TargetJSON TestTargetParser(TargetJSON target) {
 
 /**********  Register Target kinds and attributes  **********/
 
+#if defined(__arm__) || defined(__aarch64__)
+#define NATIVE_CPU "arm_cpu"
+#else
+#define NATIVE_CPU "cpu"
+#endif

Review Comment:
   To make this more generic I wonder if we can use something like: 
https://github.com/apache/tvm/pull/14946/files#diff-f61b04b100f5145f2681340c81d3f2af221239594ed01e2e24896522329ce92cR2087.
 I agree that adding architectures iteratively will likely be simpler due to CI 
breakages, but this way we can set the precedence.
   
   In addition, I think it would be good to add a warning when the host 
architecture could not be determined. E.g. something like: `Host architecture 
could not be determined. Compiling using 'cpu' fallback key which may result in 
unoptimized code. Please try adding a target key.` (probably needs thinking 
through a bit more) in order to prompt users.



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