pytorch/torchgen/api
Aaron Gokaslan 1562dae62c [BE]: Apply RUF025 dict.fromkeys preview rule (#118637)
Simplifies and optimizes dict construction using the `fromkeys` classmethod ctor. This also makes it really obvious when all the keys will have the same static value, which could be a bug if unintentional. It is also significantly faster than using a dict comprehension. The rule is in preview, but I am adding a forward fix for when it becomes stable.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/118637
Approved by: https://github.com/albanD
2024-01-30 20:46:54 +00:00
..
types Use view name instead of view_copy name for functional inverses (#117056) 2024-01-10 00:52:36 +00:00
__init__.py Rename tools/codegen to torchgen (#76275) 2022-04-25 01:38:06 +00:00
autograd.py Add 0dim Tensor overload for _foreach_div (#113688) 2023-11-15 20:59:32 +00:00
cpp.py [torchgen] Add support for optional tensor (#112938) 2023-11-06 20:03:05 +00:00
dispatcher.py Use presence of _symint in kernel name to generate symint sig or not (#84579) 2022-09-09 18:31:56 +00:00
functionalization.py Use view name instead of view_copy name for functional inverses (#117056) 2024-01-10 00:52:36 +00:00
lazy.py [BE]: Apply RUF025 dict.fromkeys preview rule (#118637) 2024-01-30 20:46:54 +00:00
meta.py Rename tools/codegen to torchgen (#76275) 2022-04-25 01:38:06 +00:00
native.py Reland 2 Many symintifications (#87604) (#87980) 2022-10-28 13:40:11 +00:00
python.py Fix return type hint for list types (#118238) 2024-01-25 23:35:20 +00:00
structured.py [BE]: Enable RUFF PERF402 and apply fixes (#115505) 2023-12-20 18:01:24 +00:00
translate.py [pytorch] add namespace for optTypeMetaToScalarType in codegen to avoid not declared when compile (#115623) 2023-12-13 00:59:01 +00:00
ufunc.py Back out "Revert D38984222: Don't introduce new overload for SymInt (#83628)" (#84173) 2022-08-29 18:01:07 +00:00
unboxing.py [BE]: remove unnecessary enumerate calls (#111690) 2023-10-20 23:20:29 +00:00