-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[target] Use native architecture for llvm target
#14981
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Thanks for contributing to TVM! Please refer to the contributing guidelines https://tvm.apache.org/docs/contribute/ for useful information and tips. Please request code reviews from Reviewers by @-ing them in a comment.
Generated by tvm-bot |
2b790f5 to
2d40ac0
Compare
ekalda
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @FranklandJack, I think it's a really good improvement to the testing of Arm targets and lowering the amount of duplicated testing we do in the upstream CI. Mostly clarifications and nits...
8b60c09 to
7150bd6
Compare
lhutton1
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @FranklandJack, I think it's very important to be testing the arm_cpu schedules in CI. Just a couple of comments
7150bd6 to
e32b5b7
Compare
Set the default `-device=` key for llvm targets based on the native architecture rather than hard coding to `cpu` which is x86 specific. This means that when llvm target triples are not specified we will test `arm_cpu` schedules on Arm®-based architectures and `cpu` schedules on x86 based architectures. Fix any schedule test failures that result from this fix.
e32b5b7 to
9edd20d
Compare
… user Currently, when a default compile target such as llvm is specified, it implies llvm -keys=cpu which tends to imply x86 related components being used during compilation e.g. the schedules registered in TOPI. This can be confusing for a user when compiling on other architectures, especially when other tools such as llc infer the default target based on the host. When the target kind is llvm, this commit uses the "target.llvm_get_system_triple" functionality to automatically detect mtriple when one has not been provided in the target string. The target will be updated to one that uses the mtriple of the host: llvm -> llvm -mtriple=<system-triple>. When compiling on Arm(R)-based targets, this has the added benfit of automatially introducing -keys=arm_cpu to the target improving the schedule selection. Lots of tests are currently using targets such as llvm or similar which has resulted in a lack of coverage of other targets such as arm_cpu. As part of this commit, failing test cases which have simple / obvious issues have been fixed. Others that likely need more thought have been skipped. In doing so, it reduces the number of modifications and simplifies the review for this change. Note: This PR is marked as draft while checking and fixing other failures in CI. Tests marked as skipped containing "<Issue link>" in the reason will be have issues added and the related reason will be updated when CI is green. This commit is a follow up of the changes made in: apache#14981 Co-authored-by: Jack Frankland <[email protected]> Change-Id: Icee7f5c00d58fc77367c823273fccae128260471
… user Currently, when a default compile target such as llvm is specified, it implies llvm -keys=cpu which tends to imply x86 related components being used during compilation e.g. the schedules registered in TOPI. This can be confusing for a user when compiling on other architectures, especially when other tools such as llc infer the default target based on the host. When the target kind is llvm, this commit uses the "target.llvm_get_system_triple" functionality to automatically detect mtriple when one has not been provided in the target string. The target will be updated to one that uses the mtriple of the host: llvm -> llvm -mtriple=<system-triple>. When compiling on Arm(R)-based targets, this has the added benfit of automatially introducing -keys=arm_cpu to the target improving the schedule selection. Lots of tests are currently using targets such as llvm or similar which has resulted in a lack of coverage of other targets such as arm_cpu. As part of this commit, failing test cases which have simple / obvious issues have been fixed. Others that likely need more thought have been skipped. In doing so, it reduces the number of modifications and simplifies the review for this change. Note: This PR is marked as draft while checking and fixing other failures in CI. Tests marked as skipped containing "<Issue link>" in the reason will be have issues added and the related reason will be updated when CI is green. This commit is a follow up of the changes made in: apache#14981 Change-Id: Icee7f5c00d58fc77367c823273fccae128260471 Co-authored-by: Jack Frankland <[email protected]>
… user Currently, when a default compile target such as llvm is specified, it implies llvm -keys=cpu which tends to imply x86 related components being used during compilation e.g. the schedules registered in TOPI. This can be confusing for a user when compiling on other architectures, especially when other tools such as llc infer the default target based on the host. When the target kind is llvm, this commit uses the "target.llvm_get_system_triple" functionality to automatically detect mtriple when one has not been provided in the target string. The target will be updated to one that uses the mtriple of the host: llvm -> llvm -mtriple=<system-triple>. When compiling on Arm(R)-based targets, this has the added benfit of automatially introducing -keys=arm_cpu to the target improving the schedule selection. Lots of tests are currently using targets such as llvm or similar which has resulted in a lack of coverage of other targets such as arm_cpu. As part of this commit, failing test cases which have simple / obvious issues have been fixed. Others that likely need more thought have been skipped. In doing so, it reduces the number of modifications and simplifies the review for this change. Note: This PR is marked as draft while checking and fixing other failures in CI. Tests marked as skipped containing "<Issue link>" in the reason will be have issues added and the related reason will be updated when CI is green. This commit is a follow up of the changes made in: apache#14981 Change-Id: Icee7f5c00d58fc77367c823273fccae128260471 Co-authored-by: Jack Frankland <[email protected]>
… user (#16513) Currently, when a default compile target such as llvm is specified, it implies llvm -keys=cpu which tends to imply x86 related components being used during compilation e.g. the schedules registered in TOPI. This can be confusing for a user when compiling on other architectures, especially when other tools such as llc infer the default target based on the host. When the target kind is llvm, this commit uses the "target.llvm_get_system_triple" functionality to automatically detect mtriple when one has not been provided in the target string. The target will be updated to one that uses the mtriple of the host: llvm -> llvm -mtriple=<system-triple>. When compiling on Arm(R)-based targets, this has the added benfit of automatially introducing -keys=arm_cpu to the target improving the schedule selection. Lots of tests are currently using targets such as llvm or similar which has resulted in a lack of coverage of other targets such as arm_cpu. As part of this commit, failing test cases which have simple / obvious issues have been fixed. Others that likely need more thought have been skipped. In doing so, it reduces the number of modifications and simplifies the review for this change. This commit is a follow up of the changes made in: #14981 Change-Id: Icee7f5c00d58fc77367c823273fccae128260471 Co-authored-by: Jack Frankland <[email protected]> --------- Co-authored-by: Jack Frankland <[email protected]>
… user (apache#16513) Currently, when a default compile target such as llvm is specified, it implies llvm -keys=cpu which tends to imply x86 related components being used during compilation e.g. the schedules registered in TOPI. This can be confusing for a user when compiling on other architectures, especially when other tools such as llc infer the default target based on the host. When the target kind is llvm, this commit uses the "target.llvm_get_system_triple" functionality to automatically detect mtriple when one has not been provided in the target string. The target will be updated to one that uses the mtriple of the host: llvm -> llvm -mtriple=<system-triple>. When compiling on Arm(R)-based targets, this has the added benfit of automatially introducing -keys=arm_cpu to the target improving the schedule selection. Lots of tests are currently using targets such as llvm or similar which has resulted in a lack of coverage of other targets such as arm_cpu. As part of this commit, failing test cases which have simple / obvious issues have been fixed. Others that likely need more thought have been skipped. In doing so, it reduces the number of modifications and simplifies the review for this change. This commit is a follow up of the changes made in: apache#14981 Change-Id: Icee7f5c00d58fc77367c823273fccae128260471 Co-authored-by: Jack Frankland <[email protected]> --------- Co-authored-by: Jack Frankland <[email protected]>
|
Closing as superseded by: #16513 |
Set the default
-device=key for llvm targets based on the native architecture rather than hard coding tocpuwhich is x86 specific. This means that when llvm target triples are not specified we will testarm_cpuschedules on Arm®-based architectures andcpuschedules on x86 based architectures.Fix any schedule test failures that result from this fix.