mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 12:54:11 +08:00
default
should be used as default value in boolean_dispatch
(#103463)
The original code mistakenly uses `False`, but should be `default` as passed in. NOTE: The behavior is silently changed in an internal package. Be aware if you use it for your own purposes. Pull Request resolved: https://github.com/pytorch/pytorch/pull/103463 Approved by: https://github.com/davidberard98
This commit is contained in:
committed by
PyTorch MergeBot
parent
cbea85b416
commit
876161983d
@ -476,7 +476,7 @@ def boolean_dispatch(
|
||||
"""
|
||||
|
||||
def fn(*args, **kwargs):
|
||||
dispatch_flag = False
|
||||
dispatch_flag = default
|
||||
if arg_name in kwargs:
|
||||
dispatch_flag = kwargs[arg_name]
|
||||
elif arg_index < len(args):
|
||||
|
Reference in New Issue
Block a user