mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-06 12:20:52 +01:00
Manipulate triton_hash_with_backend so that it doesn't contain any keywords (#128159)
Summary: See https://github.com/pytorch/pytorch/issues/127637 where "def" appears in the backend_hash and causes a problem. Pull Request resolved: https://github.com/pytorch/pytorch/pull/128159 Approved by: https://github.com/jansel
This commit is contained in:
parent
852b7b4c99
commit
8d16a73f0f
|
|
@ -61,7 +61,9 @@ def triton_hash_with_backend():
|
|||
|
||||
backend = triton_backend()
|
||||
key = f"{triton_key()}-{backend.hash()}"
|
||||
return hashlib.sha256(key.encode("utf-8")).hexdigest()
|
||||
|
||||
# Hash is upper case so that it can't contain any Python keywords.
|
||||
return hashlib.sha256(key.encode("utf-8")).hexdigest().upper()
|
||||
|
||||
|
||||
def dtype_to_string(dtype):
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user