mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 12:54:11 +08:00
More ruff SIM fixes (#164695)
This PR applies ruff `SIM` rules to more files. Most changes are about simplifying `dict.get` because `None` is already the default value. Pull Request resolved: https://github.com/pytorch/pytorch/pull/164695 Approved by: https://github.com/ezyang
This commit is contained in:
committed by
PyTorch MergeBot
parent
54ae61c573
commit
a029675f6f
@ -60,7 +60,23 @@ class Variant(Enum):
|
||||
DEFAULT_KERNEL_NAMESPACE = "at::native"
|
||||
|
||||
# NOTE: Keep the list in sync with `DispatchKey` in c10/core/DispatchKey.h
|
||||
BACKEND_COMPONENTS = "CPU CUDA HIP XLA MTIA MPS IPU XPU HPU VE Lazy Meta PrivateUse1 PrivateUse2 PrivateUse3".split()
|
||||
BACKEND_COMPONENTS = [
|
||||
"CPU",
|
||||
"CUDA",
|
||||
"HIP",
|
||||
"XLA",
|
||||
"MTIA",
|
||||
"MPS",
|
||||
"IPU",
|
||||
"XPU",
|
||||
"HPU",
|
||||
"VE",
|
||||
"Lazy",
|
||||
"Meta",
|
||||
"PrivateUse1",
|
||||
"PrivateUse2",
|
||||
"PrivateUse3",
|
||||
]
|
||||
FUNCTIONALITY_KEYS = [
|
||||
"",
|
||||
"Quantized",
|
||||
|
Reference in New Issue
Block a user