mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Enable all SIM rules except disabled ones (#164645)
`SIM` rules are useful for simplifying boolean expressions and enhances code readability. Pull Request resolved: https://github.com/pytorch/pytorch/pull/164645 Approved by: https://github.com/ezyang
This commit is contained in:
committed by
PyTorch MergeBot
parent
3c5ca685d6
commit
321e602692
@ -482,15 +482,11 @@ def get_wrapper_codegen_for_device(
|
||||
|
||||
|
||||
def get_custom_backend_pass_for_device(device: str) -> Optional[CustomGraphModulePass]:
|
||||
return custom_backend_passes[device] if device in custom_backend_passes else None
|
||||
return custom_backend_passes.get(device)
|
||||
|
||||
|
||||
def get_custom_backend_config_for_device(device: str) -> Optional[ConfigModule]:
|
||||
return (
|
||||
custom_backend_codegen_configs[device]
|
||||
if device in custom_backend_codegen_configs
|
||||
else None
|
||||
)
|
||||
return custom_backend_codegen_configs.get(device)
|
||||
|
||||
|
||||
@functools.cache
|
||||
|
||||
Reference in New Issue
Block a user