pytorch/torch/_library
Laith Sakka 7c1d93944e Proper handling of arguments passed by in kwargs inside zip_schema (#137311)
if the function is

```func(a, b, c) ```
and is called as
```func(a=1, b=.., c=..)```
before this change we do not iterate on the a, b, c, since those appear in kwargs this diff fix that issue.

This function is used in _inductor/ir.py to iterate over custom op arguments and when a custom pass does changes
and pass arguments as kwargs, we do not process them.
```
        for info, arg in torch._library.utils.zip_schema(schema, args, kwargs):
            handle_aliasing_and_mutation(info, arg)
```
Fix https://github.com/pytorch/pytorch/issues/137057

Pull Request resolved: https://github.com/pytorch/pytorch/pull/137311
Approved by: https://github.com/zou3519
2024-10-04 21:50:31 +00:00
..
__init__.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
autograd.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
custom_ops.py Improve custom ops aliasing error message (#134688) 2024-08-28 22:22:04 +00:00
fake_class_registry.py [Doc] fix some typos (found by codespell and typos) (#132544) 2024-08-05 17:21:56 +00:00
fake_impl.py Improve data-dependent-output meta kernel error message (#136671) 2024-09-26 03:46:04 +00:00
infer_schema.py [BE]: Update mypy to 1.11.2 (#133816) 2024-09-16 19:44:11 +00:00
simple_registry.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
triton.py [triton_op] Skip HOP dispatch when possible (#132822) 2024-08-08 15:56:40 +00:00
utils.py Proper handling of arguments passed by in kwargs inside zip_schema (#137311) 2024-10-04 21:50:31 +00:00