pytorch/tools/codegen
Brian Hirsh 9ab9b12d35 free up dispatch key space (in C++) (#72402)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/72402

The original PR had an array-out-of-bounds access in `DispatchKeyExtractor.cpp`, that wasn't caught by ASAN and appeared to only manifest in a subset of android internal tests. After fixing the OOB access (and adding more asserts), I confirmed that the android internal test passes.

Reland of D33255193 (20b8653dfa)
ghstack-source-id: 148830728

Test Plan:
Steps to test:

(1) connect to a mobile OD

(2) run `one_world android emulator android-29` in a terminal to start the android emulator

(3) In a separate terminal, run the test: `buck test //fbandroid/instrumentation_tests/com/facebook/pytorch/bi_xray:instrumentation_test -c test.external_runner=tpx -- --regex 'testBIXRayModel.*PyTorchBIXRayInstrumentationTest' --force-remote-execution --run-disabled`

I also ran `buck test fbandroid/mode/dbg //fbandroid/instrumentation_tests/com/facebook/pytorch/bi_xray:instrumentation_test`, which failed before and passed after the PR.

Reviewed By: albanD

Differential Revision: D34034848

fbshipit-source-id: 9677ee2c0a1afd1183896f7055009445712523c5
2022-02-14 07:59:36 -08:00
..
api Structured Kernel Precompute codegen handle fields without replacement (#71368) 2022-02-07 19:53:19 -08:00
dest fix minor issues for ATen/ROCm (#71925) 2022-02-09 11:07:12 -08:00
operator_versions Fix upgrader codegen when constant list is 0 (#72199) 2022-02-02 16:38:15 -08:00
selective_build [Pytorch Edge] Generic Build Features for Selective Build (#67817) 2021-11-09 15:37:21 -08:00
__init__.py
code_template.py
context.py avoid error string formatting aten codegen 28s -> 23s (#59848) 2021-06-12 06:58:31 -07:00
gen_backend_stubs.py fix minor issues for ATen/ROCm (#71925) 2022-02-09 11:07:12 -08:00
gen_functionalization_type.py Functionalization: Only include headers for required ops (#68690) 2021-12-15 14:29:35 -08:00
gen_lazy_tensor.py [LTC] Sync gen_lazy_tensor.py from the staging branch (#70385) 2022-01-06 13:12:37 -08:00
gen.py fix minor issues for ATen/ROCm (#71925) 2022-02-09 11:07:12 -08:00
local.py [PyTorch] Fix const correctness for resize native functions (#55351) 2021-04-21 14:51:41 -07:00
model.py free up dispatch key space (in C++) (#72402) 2022-02-14 07:59:36 -08:00
utils.py Codegen: Do less work in dry-runs for sharded files (#69805) 2022-02-02 11:22:12 -08:00