pytorch/torchgen
Brian Vaughan dbb96ef30d improve annotation device parameters where a device ordinal is allowed (#113647)
Using mypy in code that depends on pytorch, I noticed that the type annotation doesn't allow a device ordinal.

`error: Argument "device" to "to_empty" of "Module" has incompatible type "int"; expected "str | device"  [arg-type]`

Pull Request resolved: https://github.com/pytorch/pytorch/pull/113647
Approved by: https://github.com/albanD
2023-11-17 14:41:22 +00:00
..
api improve annotation device parameters where a device ordinal is allowed (#113647) 2023-11-17 14:41:22 +00:00
decompositions
dest Revert "Add support for torch.Generator type in TorchScript (#110413)" 2023-11-15 00:51:23 +00:00
executorch Fix typo under torchgen directory (#111154) 2023-10-13 16:43:46 +00:00
fuse_attention_patterns
operator_versions
selective_build
shape_functions
static_runtime [BE]: ruff apply rule PLW1510 to find silent subprocess errors (#113644) 2023-11-14 20:59:40 +00:00
__init__.py
BUCK.oss
BUILD.bazel
build.bzl
code_template.py
context.py
gen.py
gen_backend_stubs.py
gen_executorch.py Fix typo under torchgen directory (#111154) 2023-10-13 16:43:46 +00:00
gen_functionalization_type.py Revert "AOTAutograd: handle set_(), detect metadata mutations that cancel out (#111554)" 2023-11-13 21:46:57 +00:00
gen_lazy_tensor.py Fix typo under torchgen directory (#111154) 2023-10-13 16:43:46 +00:00
gen_vmap_plumbing.py
local.py
model.py Add support for float8_e4m3fnuz and _e5m2fnuz (#107586) 2023-11-15 15:01:11 +00:00
native_function_generation.py Grandfather autogen'ed ops as pt2_compliant (#113036) 2023-11-06 23:43:17 +00:00
utils.py [BE] Enable Ruff's Flake8 PYI034 (#111105) 2023-10-13 21:19:53 +00:00
yaml_utils.py