use tuple in isinstance for type checking (#9583)

This commit is contained in:
Andrey
2025-03-26 08:36:48 -03:00
committed by GitHub
parent 9115ce8860
commit 7b865ed03d
5 changed files with 5 additions and 5 deletions

View File

@@ -39,7 +39,7 @@ class DispatchLog(TorchDispatchMode):
should_call_tiny = kwargs.get('device') is not None and kwargs['device'].type == "cuda"
def can_print_arg(arg):
return args is None or isinstance(arg, str) or isinstance(arg, int) or isinstance(arg, float) or isinstance(arg, bool)
return args is None or isinstance(arg, (str, int, float, bool))
def create_tiny_mapping(arg):
if WRAP_TINY: