pytorch/torch/_functorch
Yukio Siraichi ee8166e94f Correctly handle duplicated arguments when merging input views. (#146275)
Fix: #135099

This PR changes how we map the original inputs into the new set of
inputs that take in the tensor input's base instead of their aliases.

**Problem:** in order to create this mapping, we had a dictionary that
mapped the hashed arguments into their respective indices. However, if
there's a group of equal arguments, we will have only one mapping for
such an argument. This breaks the assumption that there will be one
mapping for each argument.

**Solution:** map the hashed arguments into a list of indices. Then, we
will be able to correctly reconstruct the parameters for the new calling
convention.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/146275
Approved by: https://github.com/bdhirsh
2025-04-26 14:50:16 +00:00
..
_activation_checkpointing [pytorch] Remove numpy dependency from Knapsack Evaluator (#150825) 2025-04-10 17:07:03 +00:00
_aot_autograd Correctly handle duplicated arguments when merging input views. (#146275) 2025-04-26 14:50:16 +00:00
__init__.py
aot_autograd.py [standalone_compile] Dynamic shape handling (#151788) 2025-04-22 20:17:24 +00:00
apis.py [BE] typing for decorators (#144161) 2025-01-04 16:40:09 +00:00
autograd_function.py Introduce unsafe way to mark functions as cacheable (#151603) 2025-04-21 17:37:38 +00:00
batch_norm_replacement.py remove allow-untyped-defs for torch/_functorch/batch_norm_replacement.py (#143438) 2024-12-18 09:01:06 +00:00
benchmark_utils.py [Functorch] Fix devices Parameter Type in benchmark_utilization Function (#138774) 2024-10-25 19:25:18 +00:00
compile_utils.py Fix unintentional deduplication of returned tensors (#134726) 2024-09-04 23:42:56 +00:00
compilers.py Remove unused Python variables in torch/[_-a]* (#133492) 2024-12-12 17:39:14 +00:00
config.py Add inductor standalone_compile API (#150670) 2025-04-15 23:38:15 +00:00
deprecated.py PEP585 update - torch/_functorch (#145139) 2025-01-19 07:06:10 +00:00
eager_transforms.py Add torch.func.debug_unwrap (#146528) 2025-02-06 18:48:09 +00:00
functional_call.py PEP585 update - torch/_functorch (#145139) 2025-01-19 07:06:10 +00:00
fx_minifier.py PEP585 update - torch/_functorch (#145139) 2025-01-19 07:06:10 +00:00
make_functional.py PEP585 update - torch/_functorch (#145139) 2025-01-19 07:06:10 +00:00
partitioners.py [inductor] Lowerings for max_pool3d (#148210) 2025-04-02 14:13:01 +00:00
pyfunctorch.py PEP585 update - torch/_functorch (#145139) 2025-01-19 07:06:10 +00:00
python_key.py [BE][Easy][14/19] enforce style for empty lines in import segments in torch/_[a-c]*/ and torch/_[e-h]*/ and torch/_[j-z]*/ (#129765) 2024-07-31 10:42:50 +00:00
pytree_hacks.py [BE] wrap deprecated function/class with typing_extensions.deprecated (#127689) 2024-06-02 12:30:43 +00:00
top_operators_github_usage.py [BE]: Apply ruff PERF403 to use dict comprehensions more often (#149257) 2025-03-18 00:46:07 +00:00
utils.py PEP585 update - torch/_functorch (#145139) 2025-01-19 07:06:10 +00:00
vmap.py [dynamo] Support functools.partial variables through inspect.signature (#146339) 2025-02-04 04:39:39 +00:00