-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
cuda executables: make optional #2546
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -108,7 +108,7 @@ def get_backend(device_type: str): | |
def _path_to_binary(binary: str): | ||
base_dir = os.path.join(os.path.dirname(__file__), os.pardir) | ||
paths = [ | ||
os.environ.get("TRITON_PTXAS_PATH", ""), | ||
os.environ.get(f"TRITON_{binary.upper()}_PATH", ""), | ||
os.path.join(base_dir, "third_party", "cuda", "bin", binary) | ||
] | ||
|
||
|
@@ -174,6 +174,10 @@ def get_cuda_version_key(): | |
global _cached_cuda_version_key | ||
if _cached_cuda_version_key is None: | ||
key = compute_core_version_key() | ||
ptxas = path_to_ptxas()[0] | ||
_cached_cuda_version_key = key + '-' + hashlib.sha1(subprocess.check_output([ptxas, "--version"])).hexdigest() | ||
try: | ||
ptxas = path_to_ptxas()[0] | ||
ptxas_version = subprocess.check_output([ptxas, "--version"]) | ||
except RuntimeError: | ||
ptxas_version = b"NO_PTXAS" | ||
_cached_cuda_version_key = key + '-' + hashlib.sha1(ptxas_version).hexdigest() | ||
Comment on lines
+180
to
+182
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I had an impression that This There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I see now that in |
||
return _cached_cuda_version_key |
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.
The value wasn't being used so I dropped it. That OK?