-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Target] Improve TVM Target related items (#45)
* Refactor target_detector.py to improve CUDA target handling * chore: Add get_all_nvidia_targets function to target_detector.py, and refactor the device mismatch print
- Loading branch information
1 parent
c570a76
commit efab450
Showing
5 changed files
with
36 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,3 +27,4 @@ scipy | |
tornado | ||
torch | ||
thefuzz | ||
tabulate |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,3 +20,4 @@ scipy | |
tornado | ||
torch | ||
thefuzz | ||
tabulate |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Copyright (c) Microsoft Corporation. | ||
# Licensed under the MIT License. | ||
|
||
from bitblas.utils import get_all_nvidia_targets | ||
from tabulate import tabulate | ||
|
||
def main(): | ||
# Get all available Nvidia targets | ||
targets = get_all_nvidia_targets() | ||
|
||
# Print available targets to console in a table format | ||
table = [[i + 1, target] for i, target in enumerate(targets)] | ||
headers = ["Index", "Target"] | ||
print(tabulate(table, headers, tablefmt="pretty")) | ||
|
||
if __name__ == "__main__": | ||
main() |