pytorch/torchgen
Tugsbayasgalan Manlaibaatar 20c5add133 [export] Refactor constrain_as_value and constrain_as_size (#106591)
Some notable changes:
1. `constrain_as_size` allows min value to be less than 2 as it will unconditionally assume min >= 2 for compiler purposes. Instead, we add additional check to make sure max value is always greater than 2.
2. Previously, we used to runtime assert on the unbacked symint's val range which would be always between [2, max]. I modified this logic to assert on [0, max] unless user explicitly specifies the min range.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/106591
Approved by: https://github.com/gmagogsfm, https://github.com/ezyang
2023-08-15 05:41:43 +00:00
..
api Revert "Reland "Add forward mode AD to out-place foreach functions (#102409) (#106043)" 2023-07-31 15:50:36 +00:00
decompositions
dest Remove ExclusivelyOwned from register_dispatch_key (#106791) 2023-08-11 21:04:33 +00:00
executorch [BE] Enable ruff's UP rules and autoformat torchgen/ (#105423) 2023-07-18 06:44:20 +00:00
operator_versions [BE]: Update Ruff to 0.0.280 (#105724) 2023-07-22 23:03:34 +00:00
selective_build [BE] f-stringify torch/ and scripts (#105538) 2023-07-21 19:35:24 +00:00
shape_functions
static_runtime sparse.mm backward: performance improvements (#94991) 2023-06-12 20:57:29 +00:00
__init__.py
BUCK.oss
BUILD.bazel
build.bzl update rules_python and let bazel install its own pip dependencies (#101405) 2023-05-23 06:20:33 +00:00
code_template.py [BE] Enable ruff's UP rules and autoformat torchgen/ (#105423) 2023-07-18 06:44:20 +00:00
context.py [Specialized Kernel] Propagate Specialized Kernel Support through ComputeCodegenUnboxedKernels (#103113) 2023-06-14 10:18:16 +00:00
gen.py [BE]: Enable ruff rules PIE807 and PIE810 (#106218) 2023-07-28 22:35:56 +00:00
gen_backend_stubs.py [BE] Enable ruff's UP rules and autoformat torchgen/ (#105423) 2023-07-18 06:44:20 +00:00
gen_executorch.py [executorch] Let custom ops registration code only import ATen headers (#107064) 2023-08-13 00:34:34 +00:00
gen_functionalization_type.py REDO of dropout support for mem eff #102038 (#103704) 2023-06-26 23:05:03 +00:00
gen_lazy_tensor.py [BE] Enable ruff's UP rules and autoformat torchgen/ (#105423) 2023-07-18 06:44:20 +00:00
gen_vmap_plumbing.py
local.py
model.py Add torch.float8_e5m2 and torch.float8_e4m3 data types (#104242) 2023-07-20 16:09:11 +00:00
native_function_generation.py [export] Refactor constrain_as_value and constrain_as_size (#106591) 2023-08-15 05:41:43 +00:00
utils.py [BE] Enable ruff's UP rules and autoformat torchgen/ (#105423) 2023-07-18 06:44:20 +00:00
yaml_utils.py [Reland] Update mypy to 1.4.1 (#105227) 2023-07-15 20:30:20 +00:00