pytorch
/
.lintrunner.toml
2671 строка · 100.0 Кб
1[[linter]]2code = 'FLAKE8'3include_patterns = ['**/*.py']4exclude_patterns = [5'.git/**',6'build_test_custom_build/**',7'build/**',8'caffe2/**',9'docs/caffe2/**',10'docs/cpp/src/**',11'docs/src/**',12'fb/**',13'**/fb/**',14'functorch/docs/**',15'functorch/examples/**',16'functorch/notebooks/**',17'torch/_inductor/fx_passes/serialized_patterns/**',18'scripts/**',19'test/generated_type_hints_smoketest.py',20# Tests from the NumPy test suite21'test/torch_np/numpy_test/**/*.py',22'third_party/**',23'torch/include/**',24'torch/lib/**',25'venv/**',26'**/*.pyi',27'tools/test/test_selective_build.py',28]
29command = [30'python3',31'tools/linter/adapters/flake8_linter.py',32'--',33'@{{PATHSFILE}}'34]
35init_command = [36'python3',37'tools/linter/adapters/pip_init.py',38'--dry-run={{DRYRUN}}',39'flake8==6.1.0',40'flake8-bugbear==23.3.23',41'flake8-comprehensions==3.12.0',42'flake8-executable==2.1.3',43'flake8-logging-format==0.9.0',44'flake8-pyi==23.3.1',45'flake8-simplify==0.19.3',46'mccabe==0.7.0',47'pycodestyle==2.11.1',48'pyflakes==3.1.0',49'torchfix==0.4.0',50]
51
52
53[[linter]]54code = 'CLANGFORMAT'55include_patterns = [56'aten/src/ATen/*.h',57'aten/src/ATen/mps/**/*.mm',58'aten/src/ATen/xpu/**/*.h',59'aten/src/ATen/xpu/**/*.cpp',60'aten/src/ATen/native/mps/**/*.mm',61'aten/src/ATen/native/vulkan/**/*.h',62'aten/src/ATen/native/vulkan/**/*.cpp',63'aten/src/ATen/native/cuda/MultiTensorApply.cuh',64'aten/src/ATen/native/**/Foreach*.*',65'aten/src/ATen/native/cuda/fused*.*',66'aten/src/ATen/native/cuda/Fused*.cu',67'aten/src/ATen/native/cudnn/*.h',68'aten/src/ATen/native/cudnn/*.cpp',69'c10/**/*.h',70'c10/**/*.cpp',71'torch/csrc/**/*.h',72'torch/csrc/**/*.hpp',73'torch/csrc/**/*.cpp',74'test/cpp/**/*.h',75'test/cpp/**/*.cpp',76]
77exclude_patterns = [78'aten/src/ATen/native/vulkan/api/vk_mem_alloc.h',79'c10/util/strong_type.h',80'**/fb/**',81'torch/csrc/jit/serialization/mobile_bytecode_generated.h',82'torch/csrc/utils/pythoncapi_compat.h',83'aten/src/ATen/dlpack.h',84]
85init_command = [86'python3',87'tools/linter/adapters/s3_init.py',88'--config-json=tools/linter/adapters/s3_init_config.json',89'--linter=clang-format',90'--dry-run={{DRYRUN}}',91'--output-dir=.lintbin',92'--output-name=clang-format',93]
94command = [95'python3',96'tools/linter/adapters/clangformat_linter.py',97'--binary=.lintbin/clang-format',98'--',99'@{{PATHSFILE}}'100]
101is_formatter = true102
103[[linter]]104code = 'MYPY'105include_patterns = [106'torch/**/*.py',107'torch/**/*.pyi',108'caffe2/**/*.py',109'caffe2/**/*.pyi',110'test/test_bundled_images.py',111'test/test_bundled_inputs.py',112'test/test_complex.py',113'test/test_datapipe.py',114'test/test_futures.py',115# 'test/test_numpy_interop.py',116'test/test_torch.py',117'test/test_type_hints.py',118'test/test_type_info.py',119'test/test_utils.py',120]
121exclude_patterns = [122'**/fb/**',123]
124command = [125'python3',126'tools/linter/adapters/mypy_linter.py',127'--config=mypy.ini',128'--',129'@{{PATHSFILE}}'130]
131init_command = [132'python3',133'tools/linter/adapters/pip_init.py',134'--dry-run={{DRYRUN}}',135'numpy==1.24.3 ; python_version == "3.8"',136'numpy==1.26.0 ; python_version >= "3.9"',137'expecttest==0.1.6',138'mypy==1.8.0',139'sympy==1.11.1',140'types-requests==2.27.25',141'types-PyYAML==6.0.7',142'types-tabulate==0.8.8',143'types-protobuf==3.19.18',144'types-pkg-resources==0.1.3',145'types-Jinja2==2.11.9',146'types-colorama==0.4.6',147'filelock==3.13.1',148'junitparser==2.1.1',149'rich==10.9.0',150'pyyaml==6.0',151'optree==0.10.0',152]
153
154[[linter]]155code = 'MYPYSTRICT'156include_patterns = [157'.github/**/*.py',158'benchmarks/instruction_counts/**/*.py',159'tools/**/*.py',160'torchgen/**/*.py',161'torch/utils/_pytree.py',162'torch/utils/_cxx_pytree.py',163'torch/utils/benchmark/utils/common.py',164'torch/utils/benchmark/utils/timer.py',165'torch/utils/benchmark/utils/valgrind_wrapper/**/*.py',166]
167exclude_patterns = [168# (linbinyu) copied from internal repo169'**/fb/**',170'tools/code_analyzer/gen_operators_yaml.py',171'tools/dynamo/verify_dynamo.py',172'tools/gen_vulkan_spv.py',173'tools/test/gen_operators_yaml_test.py',174'tools/test/gen_oplist_test.py',175'tools/test/test_selective_build.py',176]
177command = [178'python3',179'tools/linter/adapters/mypy_linter.py',180'--config=mypy-strict.ini',181'--code=MYPYSTRICT',182'--',183'@{{PATHSFILE}}'184]
185
186[[linter]]187code = 'CLANGTIDY'188include_patterns = [189'aten/src/ATen/core/*.cpp',190'c10/**/*.cpp',191'c10/**/*.h',192# Enable coverage of headers in torch/csrc and excluding sub-directories for now.193'torch/csrc/*.h',194'torch/csrc/*.cpp',195'torch/csrc/**/*.h',196'torch/csrc/**/*.cpp',197]
198exclude_patterns = [199# The negative filters below are to exclude files that include onnx_pb.h or200# caffe2_pb.h, otherwise we'd have to build protos as part of this CI job.201# CUDA files are also excluded.202'**/fb/**',203'**/*pb.h',204'c10/**/cuda/*pp',205'aten/**/cuda/*pp',206'**/cuda/*pp',207'c10/xpu/**/*.h',208'c10/xpu/**/*.cpp',209'c10/cuda/CUDAAlgorithm.h',210'c10/util/complex_math.h',211'c10/util/complex_utils.h',212'c10/util/flat_hash_map.h',213'c10/util/Float8*.h',214'c10/util/logging*.h',215'c10/util/hash.h',216'c10/util/strong_type.h',217'c10/util/SmallVector.h',218'c10/util/win32-headers.h',219'c10/util/*inl.h',220'c10/test/**/*.h',221'aten/src/ATen/core/TensorImpl_test.cpp',222'third_party/**/*',223'torch/csrc/api/**',224'torch/csrc/autograd/generated/**',225'torch/csrc/dynamo/*',226'torch/csrc/distributed/**/*',227'torch/csrc/inductor/**/*',228'torch/csrc/jit/**/*',229'torch/csrc/jit/serialization/import_legacy.cpp',230'torch/csrc/jit/serialization/export.cpp',231'torch/csrc/lazy/**/*',232'torch/csrc/onnx/init.cpp',233'torch/csrc/mps/**/*',234]
235init_command = [236'python3',237'tools/linter/adapters/s3_init.py',238'--config-json=tools/linter/adapters/s3_init_config.json',239'--linter=clang-tidy',240'--dry-run={{DRYRUN}}',241'--output-dir=.lintbin',242'--output-name=clang-tidy',243]
244command = [245'python3',246'tools/linter/adapters/clangtidy_linter.py',247'--binary=.lintbin/clang-tidy',248'--build_dir=./build',249'--',250'@{{PATHSFILE}}'251]
252
253[[linter]]254code = 'TYPEIGNORE'255include_patterns = ['**/*.py', '**/*.pyi']256exclude_patterns = [257'fb/**',258'**/fb/**',259'test/test_jit.py',260]
261command = [262'python3',263'tools/linter/adapters/grep_linter.py',264'--pattern=# type:\s*ignore([^\[]|$)',265'--linter-name=TYPEIGNORE',266'--error-name=unqualified type: ignore',267"""--error-description=\268This line has an unqualified `type: ignore`; \
269please convert it to `type: ignore[xxxx]`\
270""",271'--',272'@{{PATHSFILE}}'273]
274
275[[linter]]276code = 'TYPENOSKIP'277include_patterns = ['mypy.ini']278command = [279'python3',280'tools/linter/adapters/grep_linter.py',281'--pattern=follow_imports\s*=\s*skip',282'--linter-name=TYPENOSKIP',283'--error-name=use of follow_imports = skip',284"""--error-description=\285follow_imports = skip is forbidden from mypy.ini configuration as it \
286is extremely easy to accidentally turn off type checking unintentionally. If \
287you need to suppress type errors, use a top level # mypy: ignore-errors. \
288Do not rely on automatic Any substitution; instead, manually # type: ignore \
289at use sites or define a pyi type stub with more relaxed types. \
290""",291'--',292'@{{PATHSFILE}}'293]
294
295[[linter]]296code = 'NOQA'297include_patterns = ['**/*.py', '**/*.pyi']298exclude_patterns = [299'caffe2/**',300'fb/**',301'**/fb/**'302]303command = [304'python3',305'tools/linter/adapters/grep_linter.py',306'--pattern=# noqa([^:]|$)',307'--linter-name=NOQA',308'--error-name=unqualified noqa',309"""--error-description=\310This line has an unqualified `noqa`; \
311please convert it to `noqa: XXXX`\
312""",313'--',314'@{{PATHSFILE}}'315]
316
317[[linter]]318code = 'NATIVEFUNCTIONS'319include_patterns=['aten/src/ATen/native/native_functions.yaml']320command = [321'python3',322'tools/linter/adapters/nativefunctions_linter.py',323'--native-functions-yml=aten/src/ATen/native/native_functions.yaml',324]
325init_command = [326'python3',327'tools/linter/adapters/pip_init.py',328'--dry-run={{DRYRUN}}',329'ruamel.yaml==0.17.4',330]
331is_formatter = true332
333[[linter]]334code = 'NEWLINE'335include_patterns=['**']336exclude_patterns=[337'**/contrib/**',338'third_party/**',339'**/*.bat',340'**/*.expect',341'**/*.ipynb',342'**/*.ps1',343'**/*.ptl',344'fb/**',345'**/fb/**',346'tools/clang_format_hash/**',347'test/cpp/jit/upgrader_models/*.ptl',348'test/cpp/jit/upgrader_models/*.ptl.ff',349'**/*.png',350'**/*.gz',351]
352command = [353'python3',354'tools/linter/adapters/newlines_linter.py',355'--',356'@{{PATHSFILE}}',357]
358is_formatter = true359
360[[linter]]361code = 'CONSTEXPR'362include_patterns=['aten/src/ATen/native/cuda/*.cu']363command = [364'python3',365'tools/linter/adapters/constexpr_linter.py',366'--',367'@{{PATHSFILE}}',368]
369is_formatter = true370
371[[linter]]372code = 'SPACES'373include_patterns = ['**']374exclude_patterns = [375'**/contrib/**',376'**/*.diff',377'**/*.patch',378'third_party/**',379'aten/src/ATen/native/vulkan/api/vk_mem_alloc.h',380'fb/**',381'**/fb/**',382'test/cpp/jit/upgrader_models/*.ptl',383'test/cpp/jit/upgrader_models/*.ptl.ff',384]
385command = [386'python3',387'tools/linter/adapters/grep_linter.py',388'--pattern=[[:blank:]]$',389'--linter-name=SPACES',390'--error-name=trailing spaces',391'--replace-pattern=s/[[:blank:]]+$//',392"""--error-description=\393This line has trailing spaces; please remove them.\
394""",395'--',396'@{{PATHSFILE}}'397]
398
399[[linter]]400code = 'TABS'401include_patterns = ['**']402exclude_patterns = [403'**/*.svg',404'**/*Makefile',405'**/contrib/**',406'third_party/**',407'**/.gitattributes',408'**/.gitmodules',409'fb/**',410'**/fb/**',411'aten/src/ATen/native/vulkan/api/vk_mem_alloc.h',412'test/cpp/jit/upgrader_models/*.ptl',413'test/cpp/jit/upgrader_models/*.ptl.ff',414'.lintrunner.toml',415]
416command = [417'python3',418'tools/linter/adapters/grep_linter.py',419# @lint-ignore TXT2420'--pattern= ',421'--linter-name=TABS',422'--error-name=saw some tabs',423'--replace-pattern=s/\t/ /',424"""--error-description=\425This line has tabs; please replace them with spaces.\
426""",427'--',428'@{{PATHSFILE}}'429]
430
431[[linter]]432code = 'INCLUDE'433include_patterns = [434'c10/**',435'aten/**',436'torch/csrc/**',437]
438exclude_patterns = [439'aten/src/ATen/native/quantized/cpu/qnnpack/**',440'aten/src/ATen/native/vulkan/api/vk_mem_alloc.h',441'aten/src/ATen/native/vulkan/glsl/**',442'**/fb/**',443'torch/csrc/jit/serialization/mobile_bytecode_generated.h',444'torch/csrc/utils/pythoncapi_compat.h',445]
446command = [447'python3',448'tools/linter/adapters/grep_linter.py',449'--pattern=#include "',450'--linter-name=INCLUDE',451'--error-name=quoted include',452'--replace-pattern=s/#include "(.*)"$/#include <\1>/',453"""--error-description=\454This #include uses quotes; please convert it to #include <xxxx>\
455""",456'--',457'@{{PATHSFILE}}'458]
459
460[[linter]]461code = 'PYBIND11_INCLUDE'462include_patterns = [463'**/*.cpp',464'**/*.h',465]
466exclude_patterns = [467'torch/csrc/utils/pybind.h',468'torch/utils/benchmark/utils/valgrind_wrapper/compat_bindings.cpp',469'caffe2/**/*',470]
471command = [472'python3',473'tools/linter/adapters/grep_linter.py',474'--pattern=#include <pybind11\/',475'--allowlist-pattern=#include <torch\/csrc\/utils\/pybind.h>',476'--linter-name=PYBIND11_INCLUDE',477'--match-first-only',478'--error-name=direct include of pybind11',479# https://stackoverflow.com/a/33416489/23845480# NB: this won't work if the pybind11 include is on the first line;481# but that's fine because it will just mean the lint will still fail482# after applying the change and you will have to fix it manually483'--replace-pattern=1,/(#include <pybind11\/)/ s/(#include <pybind11\/)/#include <torch\/csrc\/utils\/pybind.h>\n\1/',484"""--error-description=\485This #include directly includes pybind11 without also including \
486#include <torch/csrc/utils/pybind.h>; this means some important \
487specializations may not be included.\
488""",489'--',490'@{{PATHSFILE}}'491]
492
493[[linter]]494code = 'ERROR_PRONE_ISINSTANCE'495include_patterns = [496'torch/_refs/**/*.py',497'torch/_prims/**/*.py',498'torch/_prims_common/**/*.py',499'torch/_decomp/**/*.py',500'torch/_meta_registrations.py',501]
502exclude_patterns = [503'**/fb/**',504]
505command = [506'python3',507'tools/linter/adapters/grep_linter.py',508'--pattern=isinstance\([^)]+(int|float)\)',509'--linter-name=ERROR_PRONE_ISINSTANCE',510'--error-name=error prone isinstance',511"""--error-description=\512This line has an isinstance call that directly refers to \
513int or float. This is error-prone because you may also \
514have wanted to allow SymInt or SymFloat in your test. \
515To suppress this lint, use an appropriate type alias defined \
516in torch._prims_common; use IntLike/FloatLike when you would accept \
517both regular and symbolic numbers, Dim for ints representing \
518dimensions, or IntWithoutSymInt/FloatWithoutSymFloat if you really \
519meant to exclude symbolic numbers.
520""",521'--',522'@{{PATHSFILE}}'523]
524
525[[linter]]526code = 'PYBIND11_SPECIALIZATION'527include_patterns = [528'**/*.cpp',529'**/*.h',530]
531exclude_patterns = [532# The place for all orphan specializations533'torch/csrc/utils/pybind.h',534# These specializations are non-orphan535'torch/csrc/distributed/c10d/init.cpp',536'torch/csrc/jit/python/pybind.h',537'fb/**',538'**/fb/**',539# These are safe to exclude as they do not have Python540'c10/**/*',541]
542command = [543'python3',544'tools/linter/adapters/grep_linter.py',545'--pattern=PYBIND11_DECLARE_HOLDER_TYPE',546'--linter-name=PYBIND11_SPECIALIZATION',547'--error-name=pybind11 specialization in non-standard location',548"""--error-description=\549This pybind11 specialization (PYBIND11_DECLARE_HOLDER_TYPE) should \
550be placed in torch/csrc/utils/pybind.h so that it is guaranteed to be \
551included at any site that may potentially make use of it via py::cast. \
552If your specialization is in the same header file as the definition \
553of the holder type, you can ignore this lint by adding your header to \
554the exclude_patterns for this lint in .lintrunner.toml. For more \
555information see https://github.com/pybind/pybind11/issues/4099 \
556""",557'--',558'@{{PATHSFILE}}'559]
560
561[[linter]]562code = 'PYPIDEP'563include_patterns = ['.github/**']564exclude_patterns = [565'**/*.rst',566'**/*.py',567'**/*.md',568'**/*.diff',569'**/fb/**',570]
571command = [572'python3',573'tools/linter/adapters/grep_linter.py',574"""--pattern=\575(pip|pip3|python -m pip|python3 -m pip|python3 -mpip|python -mpip) \
576install ([a-zA-Z0-9][A-Za-z0-9\\._\\-]+)([^/=<>~!]+)[A-Za-z0-9\\._\\-\\*\\+\\!]*$\
577""",578'--linter-name=PYPIDEP',579'--error-name=unpinned PyPI install',580"""--error-description=\581This line has unpinned PyPi installs; \
582please pin them to a specific version: e.g. 'thepackage==1.2'\
583""",584'--',585'@{{PATHSFILE}}'586]
587
588[[linter]]589code = 'EXEC'590include_patterns = ['**']591exclude_patterns = [592'third_party/**',593'torch/bin/**',594'**/*.so',595'**/*.py',596'**/*.sh',597'**/*.bash',598'**/git-pre-commit',599'**/git-clang-format',600'**/gradlew',601'fb/**',602'**/fb/**',603]
604command = [605'python3',606'tools/linter/adapters/exec_linter.py',607'--',608'@{{PATHSFILE}}',609]
610
611[[linter]]612code = 'CUBINCLUDE'613include_patterns = ['aten/**']614exclude_patterns = [615'aten/src/ATen/cuda/cub*.cuh',616'**/fb/**',617]
618command = [619'python3',620'tools/linter/adapters/grep_linter.py',621'--pattern=#include <cub/',622'--linter-name=CUBINCLUDE',623'--error-name=direct cub include',624"""--error-description=\625This line has a direct cub include; please include \
626ATen/cuda/cub.cuh instead and wrap your cub calls in \
627at::native namespace if necessary.
628""",629'--',630'@{{PATHSFILE}}'631]
632
633[[linter]]634code = 'RAWCUDA'635include_patterns = [636'aten/**',637'c10/**',638]
639exclude_patterns = [640'aten/src/ATen/test/**',641'c10/cuda/CUDAFunctions.h',642'c10/cuda/CUDACachingAllocator.cpp',643'**/fb/**',644]
645command = [646'python3',647'tools/linter/adapters/grep_linter.py',648'--pattern=cudaStreamSynchronize',649'--linter-name=RAWCUDA',650'--error-name=raw CUDA API usage',651"""--error-description=\652This line calls raw CUDA APIs directly; please use at::cuda wrappers instead.
653""",654'--',655'@{{PATHSFILE}}'656]
657
658[[linter]]659code = 'RAWCUDADEVICE'660include_patterns = [661'aten/**',662'c10/**',663'torch/csrc/**',664]
665exclude_patterns = [666'aten/src/ATen/cuda/CUDAContext.cpp',667'aten/src/ATen/cuda/CUDAGeneratorImpl.cpp',668'aten/src/ATen/test/**',669'c10/core/impl/InlineDeviceGuard.h',670'c10/cuda/CUDAFunctions.cpp',671'c10/cuda/CUDAGuard.h',672'c10/cuda/impl/CUDATest.cpp',673'torch/csrc/cuda/nccl.cpp',674'**/fb/**',675]
676command = [677'python3',678'tools/linter/adapters/grep_linter.py',679'--pattern=cudaSetDevice(',680'--pattern=cudaGetDevice(',681'--linter-name=RAWCUDADEVICE',682'--error-name=raw CUDA API usage',683"""--error-description=\684This line calls raw CUDA APIs directly; please use c10::cuda wrappers instead.
685""",686'--',687'@{{PATHSFILE}}'688]
689
690[[linter]]691code = 'ROOT_LOGGING'692include_patterns = [693'**/*.py',694]
695# These are not library code, but scripts in their own right, and so
696# therefore are permitted to use logging
697exclude_patterns = [698'tools/**',699'test/**',700'benchmarks/**',701'torch/distributed/run.py',702'functorch/benchmarks/**',703# Grandfathered in704'caffe2/**',705'fb/**',706'**/fb/**',707]
708command = [709'python3',710'tools/linter/adapters/grep_linter.py',711'--pattern=logging\.(debug|info|warn|warning|error|critical|log|exception)\(',712'--replace-pattern=s/logging\.(debug|info|warn|warning|error|critical|log|exception)\(/log.\1(/',713'--linter-name=ROOT_LOGGING',714'--error-name=use of root logger',715"""--error-description=\716Do not use root logger (logging.info, etc) directly; instead \
717define 'log = logging.getLogger(__name__)' and call, e.g., log.info().
718""",719'--',720'@{{PATHSFILE}}'721]
722
723[[linter]]724code = 'DEPLOY_DETECTION'725include_patterns = [726'**/*.py',727]
728command = [729'python3',730'tools/linter/adapters/grep_linter.py',731'--pattern=sys\.executable == .torch_deploy.',732'--replace-pattern=s/sys\.executable == .torch_deploy./torch._running_with_deploy\(\)/',733'--linter-name=DEPLOY_DETECTION',734'--error-name=properly detect deploy runner',735"""--error-description=\736Do not use sys.executable to detect if running within deploy/multipy, use torch._running_with_deploy().
737""",738'--',739'@{{PATHSFILE}}'740]
741
742[[linter]]743code = 'CMAKE'744include_patterns = [745"**/*.cmake",746"**/*.cmake.in",747"**/CMakeLists.txt",748]
749exclude_patterns = [750'cmake/Modules/**',751'cmake/Modules_CUDA_fix/**',752'cmake/Caffe2Config.cmake.in',753'aten/src/ATen/ATenConfig.cmake.in',754'cmake/TorchConfig.cmake.in',755'cmake/TorchConfigVersion.cmake.in',756'cmake/cmake_uninstall.cmake.i',757'fb/**',758'**/fb/**',759]
760command = [761'python3',762'tools/linter/adapters/cmake_linter.py',763'--config=.cmakelintrc',764'--',765'@{{PATHSFILE}}',766]
767init_command = [768'python3',769'tools/linter/adapters/pip_init.py',770'--dry-run={{DRYRUN}}',771'cmakelint==1.4.1',772]
773
774[[linter]]775code = 'SHELLCHECK'776include_patterns = [777'.ci/pytorch/**/*.sh'778]
779exclude_patterns = [780'**/fb/**',781]
782command = [783'python3',784'tools/linter/adapters/shellcheck_linter.py',785'--',786'@{{PATHSFILE}}',787]
788init_command = [789'python3',790'tools/linter/adapters/pip_init.py',791'--dry-run={{DRYRUN}}',792'shellcheck-py==0.7.2.1',793]
794
795[[linter]]796code = 'ACTIONLINT'797include_patterns = [798'.github/workflows/*.yml',799'.github/workflows/*.yaml',800# actionlint does not support composite actions yet801# '.github/actions/**/*.yml',802# '.github/actions/**/*.yaml',803]
804exclude_patterns = [805'**/fb/**',806]
807command = [808'python3',809'tools/linter/adapters/actionlint_linter.py',810'--binary=.lintbin/actionlint',811'--',812'@{{PATHSFILE}}',813]
814init_command = [815'python3',816'tools/linter/adapters/s3_init.py',817'--config-json=tools/linter/adapters/s3_init_config.json',818'--linter=actionlint',819'--dry-run={{DRYRUN}}',820'--output-dir=.lintbin',821'--output-name=actionlint',822]
823
824[[linter]]825code = 'TESTOWNERS'826include_patterns = [827'test/**/test_*.py',828'test/**/*_test.py',829]
830exclude_patterns = [831'test/run_test.py',832'**/fb/**',833]
834command = [835'python3',836'tools/linter/adapters/testowners_linter.py',837'--',838'@{{PATHSFILE}}',839]
840
841[[linter]]842code = 'TEST_HAS_MAIN'843include_patterns = [844'test/**/test_*.py',845]
846exclude_patterns = [847'test/run_test.py',848'**/fb/**',849'test/quantization/**', # should be run through test/test_quantization.py850'test/jit/**', # should be run through test/test_jit.py851'test/ao/sparsity/**', # should be run through test/test_ao_sparsity.py852'test/fx/**', # should be run through test/test_fx.py853'test/bottleneck_test/**', # excluded by test/run_test.py854'test/package/**', # excluded by test/run_test.py855'test/distributed/argparse_util_test.py',856'test/distributed/bin/test_script.py',857'test/distributed/elastic/agent/server/test/local_elastic_agent_test.py',858'test/distributed/elastic/multiprocessing/bin/test_script.py',859'test/distributed/elastic/multiprocessing/bin/zombie_test.py',860'test/distributed/elastic/multiprocessing/errors/api_test.py',861'test/distributed/elastic/multiprocessing/errors/error_handler_test.py',862'test/distributed/elastic/multiprocessing/redirects_test.py',863'test/distributed/elastic/multiprocessing/tail_log_test.py',864'test/distributed/elastic/rendezvous/api_test.py',865'test/distributed/elastic/rendezvous/c10d_rendezvous_backend_test.py',866'test/distributed/elastic/rendezvous/dynamic_rendezvous_test.py',867'test/distributed/elastic/rendezvous/etcd_rendezvous_backend_test.py',868'test/distributed/elastic/rendezvous/etcd_rendezvous_test.py',869'test/distributed/elastic/rendezvous/etcd_server_test.py',870'test/distributed/elastic/rendezvous/rendezvous_backend_test.py',871'test/distributed/elastic/rendezvous/static_rendezvous_test.py',872'test/distributed/elastic/rendezvous/utils_test.py',873'test/distributed/elastic/timer/api_test.py',874'test/distributed/elastic/utils/data/cycling_iterator_test.py',875'test/distributed/launcher/api_test.py',876'test/distributed/launcher/bin/test_script.py',877'test/distributed/launcher/bin/test_script_init_method.py',878'test/distributed/launcher/bin/test_script_is_torchelastic_launched.py',879'test/distributed/launcher/bin/test_script_local_rank.py',880'test/distributed/launcher/launch_test.py',881'test/distributed/launcher/run_test.py',882'test/distributed/optim/test_apply_optimizer_in_backward.py',883'test/distributed/optim/test_named_optimizer.py',884'test/distributed/test_c10d_spawn.py',885'test/distributed/test_collective_utils.py',886'test/distributions/test_distributions.py',887'test/inductor/test_aot_inductor_utils.py',888'test/lazy/test_bindings.py',889'test/lazy/test_extract_compiled_graph.py',890'test/lazy/test_meta_kernel.py',891'test/nn/test_init.py',892'test/onnx/model_defs/op_test.py',893'test/onnx/test_models_quantized_onnxruntime.py',894'test/onnx/test_onnxscript_no_runtime.py',895'test/onnx_caffe2/test_caffe2_common.py',896'test/optim/test_lrscheduler.py',897'test/optim/test_optim.py',898'test/optim/test_swa_utils.py',899'test/run_test.py',900'test/test_bundled_images.py',901'test/test_cuda_expandable_segments.py',902'test/test_hub.py',903]
904command = [905'python3',906'tools/linter/adapters/test_has_main_linter.py',907'--',908'@{{PATHSFILE}}',909]
910
911[[linter]]912code = 'CALL_ONCE'913include_patterns = [914'c10/**',915'aten/**',916'torch/csrc/**',917]
918exclude_patterns = [919'c10/util/CallOnce.h',920'**/fb/**',921]
922command = [923'python3',924'tools/linter/adapters/grep_linter.py',925'--pattern=std::call_once',926'--linter-name=CALL_ONCE',927'--error-name=invalid call_once',928'--replace-pattern=s/std::call_once/c10::call_once/',929"""--error-description=\930Use of std::call_once is forbidden and should be replaced with c10::call_once\
931""",932'--',933'@{{PATHSFILE}}'934]
935
936[[linter]]937code = 'ONCE_FLAG'938include_patterns = [939'c10/**',940'aten/**',941'torch/csrc/**',942]
943exclude_patterns = [944'**/fb/**',945]
946command = [947'python3',948'tools/linter/adapters/grep_linter.py',949'--pattern=std::once_flag',950'--linter-name=ONCE_FLAG',951'--error-name=invalid once_flag',952'--replace-pattern=s/std::once_flag/c10::once_flag/',953"""--error-description=\954Use of std::once_flag is forbidden and should be replaced with c10::once_flag\
955""",956'--',957'@{{PATHSFILE}}'958]
959
960[[linter]]961code = 'WORKFLOWSYNC'962include_patterns = [963'.github/workflows/pull.yml',964'.github/workflows/trunk.yml',965'.github/workflows/periodic.yml',966'.github/workflows/mac-mps.yml',967'.github/workflows/slow.yml',968]
969command = [970'python3',971'tools/linter/adapters/workflow_consistency_linter.py',972'--',973'@{{PATHSFILE}}'974]
975init_command = [976'python3',977'tools/linter/adapters/pip_init.py',978'--dry-run={{DRYRUN}}',979'PyYAML==6.0',980]
981
982# Black + usort
983[[linter]]984code = 'UFMT'985include_patterns = [986'**/*.py',987'**/*.pyi',988]
989command = [990'python3',991'tools/linter/adapters/ufmt_linter.py',992'--',993'@{{PATHSFILE}}'994]
995exclude_patterns = [996'tools/gen_vulkan_spv.py',997'torch/__init__.py', # Skip this file to format because it's part of the public API998# We don't care too much about files in this directory, don't enforce999# formatting on them1000'caffe2/**/*.py',1001'caffe2/**/*.pyi',1002'fb/**',1003'**/fb/**',1004'third_party/**/*.py',1005'third_party/**/*.pyi',1006'torch/_inductor/fx_passes/serialized_patterns/**',1007# These files are all grandfathered in, feel free to remove from this list1008# as necessary1009'test/_nvfuser/__init__.py',1010'test/_nvfuser/test_dynamo.py',1011'test/_nvfuser/test_python_frontend.py',1012'test/_nvfuser/test_torchscript.py',1013'test/_test_bazel.py',1014'test/ao/sparsity/test_activation_sparsifier.py',1015'test/ao/sparsity/test_composability.py',1016'test/ao/sparsity/test_data_scheduler.py',1017'test/ao/sparsity/test_data_sparsifier.py',1018'test/ao/sparsity/test_kernels.py',1019'test/ao/sparsity/test_parametrization.py',1020'test/ao/sparsity/test_qlinear_packed_params.py',1021'test/ao/sparsity/test_scheduler.py',1022'test/ao/sparsity/test_sparsifier.py',1023'test/ao/sparsity/test_sparsity_utils.py',1024'test/ao/sparsity/test_structured_sparsifier.py',1025'test/autograd/test_complex.py',1026'test/autograd/test_fallback.py',1027'test/autograd/test_functional.py',1028'test/backends/xeon/test_launch.py',1029'test/benchmark_utils/test_benchmark_utils.py',1030'test/bottleneck_test/test.py',1031'test/bottleneck_test/test_args.py',1032'test/bottleneck_test/test_cuda.py',1033'test/conftest.py',1034'test/cpp/__init__.py',1035'test/cpp/aot_inductor/test.py',1036'test/cpp/api/init_baseline.py',1037'test/cpp/api/optim_baseline.py',1038'test/cpp/jit/__init__.py',1039'test/cpp/jit/tests_setup.py',1040'test/cpp_api_parity/__init__.py',1041'test/cpp_api_parity/functional_impl_check.py',1042'test/cpp_api_parity/module_impl_check.py',1043'test/cpp_api_parity/parity_table_parser.py',1044'test/cpp_api_parity/sample_functional.py',1045'test/cpp_api_parity/sample_module.py',1046'test/cpp_api_parity/utils.py',1047'test/cpp_extensions/no_python_abi_suffix_test/setup.py',1048'test/cpp_extensions/setup.py',1049'test/cpp_extensions/torch_test_cpp_extension/__init__.py',1050'test/create_dummy_torchscript_model.py',1051'test/custom_backend/backend.py',1052'test/custom_backend/test_custom_backend.py',1053'test/custom_operator/model.py',1054'test/custom_operator/test_custom_ops.py',1055'test/delete.py',1056'test/distributed/_shard/sharded_optim/test_sharded_optim.py',1057'test/distributed/_shard/sharded_tensor/ops/test_binary_cmp.py',1058'test/distributed/_shard/sharded_tensor/ops/test_embedding.py',1059'test/distributed/_shard/sharded_tensor/ops/test_embedding_bag.py',1060'test/distributed/_shard/sharded_tensor/ops/test_init.py',1061'test/distributed/_shard/sharded_tensor/ops/test_tensor_ops.py',1062'test/distributed/_shard/sharded_tensor/test_logger.py',1063'test/distributed/_shard/sharded_tensor/test_sharded_tensor.py',1064'test/distributed/_shard/sharded_tensor/test_sharded_tensor_reshard.py',1065'test/distributed/_shard/sharding_plan/test_sharding_plan.py',1066'test/distributed/_shard/sharding_spec/test_sharding_spec.py',1067'test/distributed/_shard/test_sharder.py',1068'test/distributed/_tools/test_memory_tracker.py',1069'test/distributed/algorithms/ddp_comm_hooks/test_ddp_hooks.py',1070'test/distributed/algorithms/quantization/test_quantization.py',1071'test/distributed/algorithms/test_join.py',1072'test/distributed/argparse_util_test.py',1073'test/distributed/bin/test_script.py',1074'test/distributed/elastic/agent/server/test/__init__.py',1075'test/distributed/elastic/agent/server/test/api_test.py',1076'test/distributed/elastic/agent/server/test/local_elastic_agent_test.py',1077'test/distributed/elastic/events/lib_test.py',1078'test/distributed/elastic/metrics/__init__.py',1079'test/distributed/elastic/metrics/api_test.py',1080'test/distributed/elastic/multiprocessing/api_test.py',1081'test/distributed/elastic/multiprocessing/bin/echo1.py',1082'test/distributed/elastic/multiprocessing/bin/echo2.py',1083'test/distributed/elastic/multiprocessing/bin/echo3.py',1084'test/distributed/elastic/multiprocessing/bin/test_script.py',1085'test/distributed/elastic/multiprocessing/bin/zombie_test.py',1086'test/distributed/elastic/multiprocessing/errors/api_test.py',1087'test/distributed/elastic/multiprocessing/errors/error_handler_test.py',1088'test/distributed/elastic/multiprocessing/redirects_test.py',1089'test/distributed/elastic/multiprocessing/tail_log_test.py',1090'test/distributed/elastic/rendezvous/__init__.py',1091'test/distributed/elastic/rendezvous/api_test.py',1092'test/distributed/elastic/rendezvous/c10d_rendezvous_backend_test.py',1093'test/distributed/elastic/rendezvous/dynamic_rendezvous_test.py',1094'test/distributed/elastic/rendezvous/etcd_rendezvous_backend_test.py',1095'test/distributed/elastic/rendezvous/etcd_rendezvous_test.py',1096'test/distributed/elastic/rendezvous/etcd_server_test.py',1097'test/distributed/elastic/rendezvous/rendezvous_backend_test.py',1098'test/distributed/elastic/rendezvous/static_rendezvous_test.py',1099'test/distributed/elastic/rendezvous/utils_test.py',1100'test/distributed/elastic/timer/__init__.py',1101'test/distributed/elastic/timer/api_test.py',1102'test/distributed/elastic/timer/file_based_local_timer_test.py',1103'test/distributed/elastic/timer/local_timer_example.py',1104'test/distributed/elastic/timer/local_timer_test.py',1105'test/distributed/elastic/utils/__init__.py',1106'test/distributed/elastic/utils/data/__init__.py',1107'test/distributed/elastic/utils/data/cycling_iterator_test.py',1108'test/distributed/elastic/utils/distributed_test.py',1109'test/distributed/elastic/utils/logging_test.py',1110'test/distributed/elastic/utils/util_test.py',1111'test/distributed/launcher/__init__.py',1112'test/distributed/launcher/api_test.py',1113'test/distributed/launcher/bin/test_script.py',1114'test/distributed/launcher/bin/test_script_init_method.py',1115'test/distributed/launcher/bin/test_script_is_torchelastic_launched.py',1116'test/distributed/launcher/bin/test_script_local_rank.py',1117'test/distributed/launcher/launch_test.py',1118'test/distributed/launcher/run_test.py',1119'test/distributed/nn/jit/__init__.py',1120'test/distributed/nn/jit/test_instantiator.py',1121'test/distributed/optim/test_apply_optimizer_in_backward.py',1122'test/distributed/optim/test_named_optimizer.py',1123'test/distributed/optim/test_zero_redundancy_optimizer.py',1124'test/distributed/pipeline/sync/__init__.py',1125'test/distributed/pipeline/sync/conftest.py',1126'test/distributed/pipeline/sync/skip/__init__.py',1127'test/distributed/pipeline/sync/skip/test_api.py',1128'test/distributed/pipeline/sync/skip/test_gpipe.py',1129'test/distributed/pipeline/sync/skip/test_inspect_skip_layout.py',1130'test/distributed/pipeline/sync/skip/test_leak.py',1131'test/distributed/pipeline/sync/skip/test_portal.py',1132'test/distributed/pipeline/sync/skip/test_stash_pop.py',1133'test/distributed/pipeline/sync/skip/test_tracker.py',1134'test/distributed/pipeline/sync/skip/test_verify_skippables.py',1135'test/distributed/pipeline/sync/test_balance.py',1136'test/distributed/pipeline/sync/test_bugs.py',1137'test/distributed/pipeline/sync/test_checkpoint.py',1138'test/distributed/pipeline/sync/test_copy.py',1139'test/distributed/pipeline/sync/test_deferred_batch_norm.py',1140'test/distributed/pipeline/sync/test_dependency.py',1141'test/distributed/pipeline/sync/test_inplace.py',1142'test/distributed/pipeline/sync/test_microbatch.py',1143'test/distributed/pipeline/sync/test_phony.py',1144'test/distributed/pipeline/sync/test_pipe.py',1145'test/distributed/pipeline/sync/test_pipeline.py',1146'test/distributed/pipeline/sync/test_stream.py',1147'test/distributed/pipeline/sync/test_transparency.py',1148'test/distributed/pipeline/sync/test_worker.py',1149'test/distributed/rpc/cuda/test_tensorpipe_agent.py',1150'test/distributed/rpc/test_faulty_agent.py',1151'test/distributed/rpc/test_share_memory.py',1152'test/distributed/rpc/test_tensorpipe_agent.py',1153'test/distributed/tensor/parallel/__init__.py',1154'test/distributed/tensor/parallel/test_ddp_2d_parallel.py',1155'test/distributed/tensor/parallel/test_fsdp_2d_parallel.py',1156'test/distributed/tensor/parallel/test_parallelize_api.py',1157'test/distributed/tensor/parallel/test_tp_examples.py',1158'test/distributed/tensor/parallel/test_tp_random_state.py',1159'test/distributed/tensor/parallel/test_tp_style.py',1160'test/distributed/tensor/parallel/test_view_sharding_dim_change.py',1161'test/distributed/test_c10d_common.py',1162'test/distributed/test_c10d_gloo.py',1163'test/distributed/test_c10d_logger.py',1164'test/distributed/test_c10d_nccl.py',1165'test/distributed/test_c10d_object_collectives.py',1166'test/distributed/test_c10d_pypg.py',1167'test/distributed/test_c10d_spawn.py',1168'test/distributed/test_c10d_spawn_gloo.py',1169'test/distributed/test_c10d_spawn_nccl.py',1170'test/distributed/test_c10d_spawn_ucc.py',1171'test/distributed/test_c10d_ucc.py',1172'test/distributed/test_collective_utils.py',1173'test/distributed/test_data_parallel.py',1174'test/distributed/test_distributed_spawn.py',1175'test/distributed/test_dynamo_distributed.py',1176'test/distributed/test_fake_pg.py',1177'test/distributed/test_functional_api.py',1178'test/distributed/test_inductor_collectives.py',1179'test/distributed/test_launcher.py',1180'test/distributed/test_multi_threaded_pg.py',1181'test/distributed/test_nccl.py',1182'test/distributed/test_pg_wrapper.py',1183'test/distributed/test_store.py',1184'test/distributions/test_constraints.py',1185'test/distributions/test_distributions.py',1186'test/distributions/test_transforms.py',1187'test/distributions/test_utils.py',1188'test/error_messages/storage.py',1189'test/expect/__init__.py',1190'test/export/test_db.py',1191'test/export/test_export.py',1192'test/export/test_funtionalized_assertions.py',1193'test/export/test_pass_infra.py',1194'test/export/test_passes.py',1195'test/export/test_serialize.py',1196'test/export/test_upgrade.py',1197'test/export/test_verifier.py',1198'test/export/test_unflatten.py',1199'test/forward_backward_compatibility/check_forward_backward_compatibility.py',1200'test/forward_backward_compatibility/dump_all_function_schemas.py',1201'test/functorch/attn_ft.py',1202'test/functorch/attn_positional.py',1203'test/functorch/common_utils.py',1204'test/functorch/discover_coverage.py',1205'test/functorch/functorch_additional_op_db.py',1206'test/functorch/test_aotdispatch.py',1207'test/functorch/test_control_flow.py',1208'test/functorch/test_dims.py',1209'test/functorch/test_eager_transforms.py',1210'test/functorch/test_logging.py',1211'test/functorch/test_memory_efficient_fusion.py',1212'test/functorch/test_minifier.py',1213'test/functorch/test_ops.py',1214'test/functorch/test_parsing.py',1215'test/functorch/test_rearrange.py',1216'test/functorch/test_vmap.py',1217'test/functorch/test_vmap_registrations.py',1218'test/functorch/xfail_suggester.py',1219'test/fx/named_tup.py',1220'test/fx/quantization.py',1221'test/fx/test_common_passes.py',1222'test/fx/test_cse_pass.py',1223'test/fx/test_dce_pass.py',1224'test/fx/test_future.py',1225'test/fx/test_fx_const_fold.py',1226'test/fx/test_fx_param_shape_control_flow.py',1227'test/fx/test_gradual_type.py',1228'test/fx/test_matcher_utils.py',1229'test/fx/test_pass_infra.py',1230'test/fx/test_source_matcher_utils.py',1231'test/fx/test_subgraph_rewriter.py',1232'test/fx/test_z3_gradual_types.py',1233'test/fx/test_fx_split.py',1234'test/jit/__init__.py',1235'test/jit/_imported_class_test/__init__.py',1236'test/jit/_imported_class_test/bar.py',1237'test/jit/_imported_class_test/foo.py',1238'test/jit/_imported_class_test/very/__init__.py',1239'test/jit/_imported_class_test/very/very/__init__.py',1240'test/jit/_imported_class_test/very/very/nested.py',1241'test/jit/fixtures_srcs/__init__.py',1242'test/jit/fixtures_srcs/fixtures_src.py',1243'test/jit/fixtures_srcs/generate_models.py',1244'test/jit/fixtures_srcs/test_upgrader_models_generation.py',1245'test/jit/myexception.py',1246'test/jit/test_alias_analysis.py',1247'test/jit/test_async.py',1248'test/jit/test_aten_pow.py',1249'test/jit/test_attr.py',1250'test/jit/test_autodiff.py',1251'test/jit/test_autodiff_subgraph_slicing.py',1252'test/jit/test_await.py',1253'test/jit/test_backend_nnapi.py',1254'test/jit/test_backends.py',1255'test/jit/test_batch_mm.py',1256'test/jit/test_builtins.py',1257'test/jit/test_class_type.py',1258'test/jit/test_complex.py',1259'test/jit/test_complexity.py',1260'test/jit/test_convert_activation.py',1261'test/jit/test_cuda.py',1262'test/jit/test_custom_operators.py',1263'test/jit/test_data_parallel.py',1264'test/jit/test_dataclasses.py',1265'test/jit/test_dce.py',1266'test/jit/test_device_analysis.py',1267'test/jit/test_dtype_analysis.py',1268'test/jit/test_enum.py',1269'test/jit/test_exception.py',1270'test/jit/test_freezing.py',1271'test/jit/test_functional_blocks.py',1272'test/jit/test_fuser_common.py',1273'test/jit/test_graph_rewrite_passes.py',1274'test/jit/test_hash.py',1275'test/jit/test_hooks.py',1276'test/jit/test_hooks_modules.py',1277'test/jit/test_ignorable_args.py',1278'test/jit/test_ignore_context_manager.py',1279'test/jit/test_isinstance.py',1280'test/jit/test_jit_utils.py',1281'test/jit/test_list_dict.py',1282'test/jit/test_logging.py',1283'test/jit/test_misc.py',1284'test/jit/test_models.py',1285'test/jit/test_module_apis.py',1286'test/jit/test_module_containers.py',1287'test/jit/test_module_interface.py',1288'test/jit/test_modules.py',1289'test/jit/test_op_decompositions.py',1290'test/jit/test_optimize_for_mobile_preserve_debug_info.py',1291'test/jit/test_parametrization.py',1292'test/jit/test_pdt.py',1293'test/jit/test_peephole.py',1294'test/jit/test_profiler.py',1295'test/jit/test_python_bindings.py',1296'test/jit/test_python_builtins.py',1297'test/jit/test_python_ir.py',1298'test/jit/test_recursive_script.py',1299'test/jit/test_remove_mutation.py',1300'test/jit/test_save_load.py',1301'test/jit/test_save_load_for_op_version.py',1302'test/jit/test_script_profile.py',1303'test/jit/test_scriptmod_ann.py',1304'test/jit/test_slice.py',1305'test/jit/test_sparse.py',1306'test/jit/test_string_formatting.py',1307'test/jit/test_symbolic_shape_analysis.py',1308'test/jit/test_tensor_creation_ops.py',1309'test/jit/test_tensor_methods.py',1310'test/jit/test_torchbind.py',1311'test/jit/test_tracer.py',1312'test/jit/test_type_sharing.py',1313'test/jit/test_types.py',1314'test/jit/test_typing.py',1315'test/jit/test_union.py',1316'test/jit/test_unsupported_ops.py',1317'test/jit/test_upgraders.py',1318'test/jit/test_warn.py',1319'test/jit/test_with.py',1320'test/jit/xnnpack/test_xnnpack_delegate.py',1321'test/jit_hooks/model.py',1322'test/lazy/__init__.py',1323'test/lazy/test_bindings.py',1324'test/lazy/test_debug_util.py',1325'test/lazy/test_extract_compiled_graph.py',1326'test/lazy/test_meta_kernel.py',1327'test/lazy/test_reuse_ir.py',1328'test/lazy/test_step_closures.py',1329'test/lazy/test_ts_opinfo.py',1330'test/linear.py',1331'test/load_torchscript_model.py',1332'test/mkl_verbose.py',1333'test/mkldnn_verbose.py',1334'test/mobile/custom_build/prepare_model.py',1335'test/mobile/lightweight_dispatch/tests_setup.py',1336'test/mobile/model_test/android_api_module.py',1337'test/mobile/model_test/builtin_ops.py',1338'test/mobile/model_test/gen_test_model.py',1339'test/mobile/model_test/math_ops.py',1340'test/mobile/model_test/nn_ops.py',1341'test/mobile/model_test/quantization_ops.py',1342'test/mobile/model_test/sampling_ops.py',1343'test/mobile/model_test/tensor_ops.py',1344'test/mobile/model_test/torchvision_models.py',1345'test/mobile/model_test/update_production_ops.py',1346'test/mobile/nnc/aot_test_model.py',1347'test/mobile/test_bytecode.py',1348'test/mobile/test_lite_script_module.py',1349'test/mobile/test_lite_script_type.py',1350'test/mobile/test_quantize_fx_lite_script_module.py',1351'test/mobile/test_upgrader_codegen.py',1352'test/mobile/test_upgraders.py',1353'test/nn/test_convolution.py',1354'test/nn/test_dropout.py',1355'test/nn/test_embedding.py',1356'test/nn/test_init.py',1357'test/nn/test_lazy_modules.py',1358'test/nn/test_load_state_dict.py',1359'test/nn/test_module_hooks.py',1360'test/nn/test_multihead_attention.py',1361'test/nn/test_packed_sequence.py',1362'test/nn/test_parametrization.py',1363'test/nn/test_pooling.py',1364'test/nn/test_pruning.py',1365'test/onnx_caffe2/export_onnx_tests_filter.py',1366'test/onnx_caffe2/export_onnx_tests_generator.py',1367'test/onnx_caffe2/test_caffe2_common.py',1368'test/onnx_caffe2/test_custom_ops.py',1369'test/onnx_caffe2/test_pytorch_helper.py',1370'test/onnx_caffe2/test_pytorch_onnx_caffe2.py',1371'test/onnx_caffe2/test_pytorch_onnx_caffe2_quantized.py',1372'test/onnx_caffe2/test_verify.py',1373'test/optim/test_lrscheduler.py',1374'test/optim/test_optim.py',1375'test/optim/test_swa_utils.py',1376'test/package/__init__.py',1377'test/package/common.py',1378'test/package/generate_bc_packages.py',1379'test/package/module_a.py',1380'test/package/module_a_remapped_path.py',1381'test/package/package_a/__init__.py',1382'test/package/package_a/fake_interface.py',1383'test/package/package_a/fake_script_class.py',1384'test/package/package_a/long_name.py',1385'test/package/package_a/std_sys_module_hacks.py',1386'test/package/package_a/subpackage.py',1387'test/package/package_a/test_all_leaf_modules_tracer.py',1388'test/package/package_a/test_module.py',1389'test/package/package_a/test_nn_module.py',1390'test/package/package_a/use_dunder_package.py',1391'test/package/package_a/use_torch_package_importer.py',1392'test/package/package_b/__init__.py',1393'test/package/package_b/subpackage_0/__init__.py',1394'test/package/package_b/subpackage_0/subsubpackage_0/__init__.py',1395'test/package/package_b/subpackage_1.py',1396'test/package/package_b/subpackage_2.py',1397'test/package/package_c/__init__.py',1398'test/package/package_c/test_module.py',1399'test/package/package_d/__init__.py',1400'test/package/package_d/imports_directly.py',1401'test/package/package_d/imports_indirectly.py',1402'test/package/package_d/subpackage_0/__init__.py',1403'test/package/package_d/subpackage_0/subsubpackage_0/__init__.py',1404'test/package/test_analyze.py',1405'test/package/test_dependency_api.py',1406'test/package/test_dependency_hooks.py',1407'test/package/test_digraph.py',1408'test/package/test_directory_reader.py',1409'test/package/test_glob_group.py',1410'test/package/test_importer.py',1411'test/package/test_load_bc_packages.py',1412'test/package/test_mangling.py',1413'test/package/test_misc.py',1414'test/package/test_model.py',1415'test/package/test_package_fx.py',1416'test/package/test_package_script.py',1417'test/package/test_repackage.py',1418'test/package/test_resources.py',1419'test/package/test_save_load.py',1420'test/package/test_trace_dep/__init__.py',1421'test/profiler/test_memory_profiler.py',1422'test/profiler/test_profiler.py',1423'test/profiler/test_profiler_tree.py',1424'test/quantization/__init__.py',1425'test/quantization/ao_migration/__init__.py',1426'test/quantization/ao_migration/common.py',1427'test/quantization/ao_migration/test_ao_migration.py',1428'test/quantization/ao_migration/test_quantization.py',1429'test/quantization/ao_migration/test_quantization_fx.py',1430'test/quantization/bc/__init__.py',1431'test/quantization/bc/test_backward_compatibility.py',1432'test/quantization/core/__init__.py',1433'test/quantization/core/experimental/apot_fx_graph_mode_ptq.py',1434'test/quantization/core/experimental/apot_fx_graph_mode_qat.py',1435'test/quantization/core/experimental/quantization_util.py',1436'test/quantization/core/experimental/test_bits.py',1437'test/quantization/core/experimental/test_fake_quantize.py',1438'test/quantization/core/experimental/test_linear.py',1439'test/quantization/core/experimental/test_nonuniform_observer.py',1440'test/quantization/core/experimental/test_quantized_tensor.py',1441'test/quantization/core/experimental/test_quantizer.py',1442'test/quantization/core/test_backend_config.py',1443'test/quantization/core/test_docs.py',1444'test/quantization/core/test_quantized_functional.py',1445'test/quantization/core/test_quantized_module.py',1446'test/quantization/core/test_quantized_op.py',1447'test/quantization/core/test_quantized_tensor.py',1448'test/quantization/core/test_top_level_apis.py',1449'test/quantization/core/test_utils.py',1450'test/quantization/core/test_workflow_module.py',1451'test/quantization/core/test_workflow_ops.py',1452'test/quantization/eager/__init__.py',1453'test/quantization/eager/test_bias_correction_eager.py',1454'test/quantization/eager/test_equalize_eager.py',1455'test/quantization/eager/test_fuse_eager.py',1456'test/quantization/eager/test_model_numerics.py',1457'test/quantization/eager/test_numeric_suite_eager.py',1458'test/quantization/eager/test_quantize_eager_ptq.py',1459'test/quantization/eager/test_quantize_eager_qat.py',1460'test/quantization/fx/__init__.py',1461'test/quantization/fx/test_equalize_fx.py',1462'test/quantization/fx/test_model_report_fx.py',1463'test/quantization/fx/test_numeric_suite_fx.py',1464'test/quantization/fx/test_quantize_fx.py',1465'test/quantization/fx/test_subgraph_rewriter.py',1466'test/quantization/jit/__init__.py',1467'test/quantization/jit/test_deprecated_jit_quant.py',1468'test/quantization/jit/test_fusion_passes.py',1469'test/quantization/jit/test_ondevice_quantization.py',1470'test/quantization/jit/test_quantize_jit.py',1471'test/quantization/pt2e/test_graph_utils.py',1472'test/quantization/pt2e/test_quantize_pt2e.py',1473'test/quantization/pt2e/test_x86inductor_quantizer.py',1474'test/scripts/cuda_memcheck_common.py',1475'test/scripts/run_cuda_memcheck.py',1476'test/simulate_nccl_errors.py',1477'test/test_ao_sparsity.py',1478'test/test_autocast.py',1479'test/test_autograd.py',1480'test/test_binary_ufuncs.py',1481'test/test_bundled_images.py',1482'test/test_bundled_inputs.py',1483'test/test_comparison_utils.py',1484'test/test_compile_benchmark_util.py',1485'test/test_complex.py',1486'test/test_cpp_api_parity.py',1487'test/test_cpp_extensions_aot.py',1488'test/test_cpp_extensions_jit.py',1489'test/test_cpp_extensions_open_device_registration.py',1490'test/test_cuda.py',1491'test/test_cuda_expandable_segments.py',1492'test/test_cuda_multigpu.py',1493'test/test_cuda_nvml_based_avail.py',1494'test/test_cuda_primary_ctx.py',1495'test/test_cuda_sanitizer.py',1496'test/test_cuda_trace.py',1497'test/test_custom_op_testing.py',1498'test/test_dataloader.py',1499'test/test_datapipe.py',1500'test/test_decomp.py',1501'test/test_deploy.py',1502'test/test_determination.py',1503'test/test_dispatch.py',1504'test/test_dlpack.py',1505'test/test_dynamic_shapes.py',1506'test/test_expanded_weights.py',1507'test/test_fake_tensor.py',1508'test/test_flop_counter.py',1509'test/test_foreach.py',1510'test/test_function_schema.py',1511'test/test_functional_autograd_benchmark.py',1512'test/test_functional_optim.py',1513'test/test_functionalization.py',1514'test/test_functionalization_of_rng_ops.py',1515'test/test_futures.py',1516'test/test_fx.py',1517'test/test_fx_experimental.py',1518'test/test_fx_passes.py',1519'test/test_fx_reinplace_pass.py',1520'test/test_hub.py',1521'test/test_import_stats.py',1522'test/test_indexing.py',1523'test/test_itt.py',1524'test/test_jit.py',1525'test/test_jit_autocast.py',1526'test/test_jit_cuda_fuser.py',1527'test/test_jit_disabled.py',1528'test/test_jit_fuser.py',1529'test/test_jit_fuser_legacy.py',1530'test/test_jit_fuser_te.py',1531'test/test_jit_legacy.py',1532'test/test_jit_llga_fuser.py',1533'test/test_jit_profiling.py',1534'test/test_jit_simple.py',1535'test/test_jit_string.py',1536'test/test_jiterator.py',1537'test/test_kernel_launch_checks.py',1538'test/test_legacy_vmap.py',1539'test/test_license.py',1540'test/test_linalg.py',1541'test/test_logging.py',1542'test/test_masked.py',1543'test/test_maskedtensor.py',1544'test/test_matmul_cuda.py',1545'test/test_meta.py',1546'test/test_metal.py',1547'test/test_mkl_verbose.py',1548'test/test_mkldnn.py',1549'test/test_mkldnn_fusion.py',1550'test/test_mkldnn_verbose.py',1551'test/test_mobile_optimizer.py',1552'test/test_model_dump.py',1553'test/test_modules.py',1554'test/test_monitor.py',1555'test/test_mps.py',1556'test/test_multiprocessing.py',1557'test/test_multiprocessing_spawn.py',1558'test/test_namedtensor.py',1559'test/test_namedtuple_return_api.py',1560'test/test_native_functions.py',1561'test/test_native_mha.py',1562'test/test_nestedtensor.py',1563'test/test_nn.py',1564'test/test_nnapi.py',1565'test/test_numba_integration.py',1566'test/test_numpy_interop.py',1567'test/test_nvfuser_dynamo.py',1568'test/test_nvfuser_frontend.py',1569'test/test_openmp.py',1570'test/test_ops.py',1571'test/test_ops_fwd_gradients.py',1572'test/test_ops_gradients.py',1573'test/test_ops_jit.py',1574'test/test_optim.py',1575'test/test_out_dtype_op.py',1576'test/test_overrides.py',1577'test/test_package.py',1578'test/test_per_overload_api.py',1579'test/test_prims.py',1580'test/test_proxy_tensor.py',1581'test/test_pruning_op.py',1582'test/test_public_bindings.py',1583'test/test_python_dispatch.py',1584'test/test_quantization.py',1585'test/test_reductions.py',1586'test/test_scatter_gather_ops.py',1587'test/test_schema_check.py',1588'test/test_segment_reductions.py',1589'test/test_serialization.py',1590'test/test_set_default_mobile_cpu_allocator.py',1591'test/test_shape_ops.py',1592'test/test_show_pickle.py',1593'test/test_sort_and_select.py',1594'test/test_sparse.py',1595'test/test_sparse_csr.py',1596'test/test_sparse_semi_structured.py',1597'test/test_spectral_ops.py',1598'test/test_stateless.py',1599'test/test_static_runtime.py',1600'test/test_subclass.py',1601'test/test_sympy_utils.py',1602'test/test_tensor_creation_ops.py',1603'test/test_tensorboard.py',1604'test/test_tensorexpr.py',1605'test/test_tensorexpr_pybind.py',1606'test/test_testing.py',1607'test/test_throughput_benchmark.py',1608'test/test_torch.py',1609'test/test_transformers.py',1610'test/test_type_hints.py',1611'test/test_type_info.py',1612'test/test_type_promotion.py',1613'test/test_unary_ufuncs.py',1614'test/test_utils.py',1615'test/test_view_ops.py',1616'test/test_vulkan.py',1617'test/test_xnnpack_integration.py',1618'test/torch_np/numpy_test/**/*.py',1619'test/typing/fail/bitwise_ops.py',1620'test/typing/fail/creation_ops.py',1621'test/typing/fail/random.py',1622'test/typing/pass/creation_ops.py',1623'test/typing/pass/math_ops.py',1624'test/typing/reveal/module_list.py',1625'test/typing/reveal/namedtuple.py',1626'test/typing/reveal/opt_size.py',1627'test/typing/reveal/size.py',1628'test/typing/reveal/tensor_constructors.py',1629'test/typing/reveal/tensor_copy.py',1630'test/typing/reveal/tensor_sampling.py',1631'test/typing/reveal/torch_optim.py',1632'torch/_awaits/__init__.py',1633'torch/_custom_op/__init__.py',1634'torch/_custom_op/autograd.py',1635'torch/_custom_op/functional.py',1636'torch/_custom_op/impl.py',1637'torch/_export/__init__.py',1638'torch/_export/constraints.py',1639'torch/_export/db/__init__.py',1640'torch/_export/db/case.py',1641'torch/_export/db/examples/__init__.py',1642'torch/_export/db/examples/assume_constant_result.py',1643'torch/_export/db/examples/autograd_function.py',1644'torch/_export/db/examples/class_method.py',1645'torch/_export/db/examples/cond_branch_class_method.py',1646'torch/_export/db/examples/cond_branch_nested_function.py',1647'torch/_export/db/examples/cond_branch_nonlocal_variables.py',1648'torch/_export/db/examples/cond_closed_over_variable.py',1649'torch/_export/db/examples/cond_operands.py',1650'torch/_export/db/examples/cond_predicate.py',1651'torch/_export/db/examples/decorator.py',1652'torch/_export/db/examples/dictionary.py',1653'torch/_export/db/examples/dynamic_shape_assert.py',1654'torch/_export/db/examples/dynamic_shape_constructor.py',1655'torch/_export/db/examples/dynamic_shape_if_guard.py',1656'torch/_export/db/examples/dynamic_shape_map.py',1657'torch/_export/db/examples/dynamic_shape_round.py',1658'torch/_export/db/examples/dynamic_shape_slicing.py',1659'torch/_export/db/examples/dynamic_shape_view.py',1660'torch/_export/db/examples/fn_with_kwargs.py',1661'torch/_export/db/examples/list_contains.py',1662'torch/_export/db/examples/list_unpack.py',1663'torch/_export/db/examples/nested_function.py',1664'torch/_export/db/examples/null_context_manager.py',1665'torch/_export/db/examples/pytree_flatten.py',1666'torch/_export/db/examples/scalar_output.py',1667'torch/_export/db/examples/specialized_attribute.py',1668'torch/_export/db/examples/static_for_loop.py',1669'torch/_export/db/examples/static_if.py',1670'torch/_export/db/examples/tensor_setattr.py',1671'torch/_export/db/examples/type_reflection_method.py',1672'torch/_export/db/gen_example.py',1673'torch/_export/db/logging.py',1674'torch/_export/error.py',1675'torch/_export/exported_program.py',1676'torch/_export/pass_base.py',1677'torch/_export/pass_infra/__init__.py',1678'torch/_export/pass_infra/node_metadata.py',1679'torch/_export/pass_infra/proxy_value.py',1680'torch/_export/passes/__init__.py',1681'torch/_export/passes/add_runtime_assertions_for_constraints_pass.py',1682'torch/_export/passes/const_prop_pass.py',1683'torch/_export/passes/functionalize_side_effectful_ops_pass.py',1684'torch/_export/passes/replace_sym_size_ops_pass.py',1685'torch/_export/passes/replace_view_ops_with_view_copy_ops_pass.py',1686'torch/_export/serde/__init__.py',1687'torch/_export/serde/schema.py',1688'torch/_export/serde/serialize.py',1689'torch/_export/serde/upgrade.py',1690'torch/_export/trace.py',1691'torch/_export/verifier.py',1692'torch/_functorch/__init__.py',1693'torch/_functorch/aot_autograd.py',1694'torch/_functorch/apis.py',1695'torch/_functorch/autograd_function.py',1696'torch/_functorch/batch_norm_replacement.py',1697'torch/_functorch/benchmark_utils.py',1698'torch/_functorch/compile_utils.py',1699'torch/_functorch/compilers.py',1700'torch/_functorch/config.py',1701'torch/_functorch/deprecated.py',1702'torch/_functorch/eager_transforms.py',1703'torch/_functorch/fx_minifier.py',1704'torch/_functorch/partitioners.py',1705'torch/_functorch/pyfunctorch.py',1706'torch/_functorch/python_key.py',1707'torch/_functorch/top_operators_github_usage.py',1708'torch/_functorch/utils.py',1709'torch/_functorch/vmap.py',1710'torch/_higher_order_ops/__init__.py',1711'torch/_higher_order_ops/out_dtype.py',1712'torch/_higher_order_ops/wrap.py',1713'torch/_vendor/**',1714'torch/ao/__init__.py',1715'torch/ao/nn/__init__.py',1716'torch/ao/nn/intrinsic/__init__.py',1717'torch/ao/nn/intrinsic/modules/__init__.py',1718'torch/ao/nn/intrinsic/modules/fused.py',1719'torch/ao/nn/intrinsic/qat/__init__.py',1720'torch/ao/nn/intrinsic/qat/modules/__init__.py',1721'torch/ao/nn/intrinsic/qat/modules/conv_fused.py',1722'torch/ao/nn/intrinsic/qat/modules/linear_fused.py',1723'torch/ao/nn/intrinsic/qat/modules/linear_relu.py',1724'torch/ao/nn/intrinsic/quantized/__init__.py',1725'torch/ao/nn/intrinsic/quantized/dynamic/__init__.py',1726'torch/ao/nn/intrinsic/quantized/dynamic/modules/__init__.py',1727'torch/ao/nn/intrinsic/quantized/dynamic/modules/linear_relu.py',1728'torch/ao/nn/intrinsic/quantized/modules/__init__.py',1729'torch/ao/nn/intrinsic/quantized/modules/bn_relu.py',1730'torch/ao/nn/intrinsic/quantized/modules/conv_add.py',1731'torch/ao/nn/intrinsic/quantized/modules/conv_relu.py',1732'torch/ao/nn/intrinsic/quantized/modules/linear_relu.py',1733'torch/ao/nn/qat/__init__.py',1734'torch/ao/nn/qat/dynamic/__init__.py',1735'torch/ao/nn/qat/dynamic/modules/__init__.py',1736'torch/ao/nn/qat/dynamic/modules/linear.py',1737'torch/ao/nn/qat/modules/__init__.py',1738'torch/ao/nn/qat/modules/conv.py',1739'torch/ao/nn/qat/modules/embedding_ops.py',1740'torch/ao/nn/qat/modules/linear.py',1741'torch/ao/nn/quantizable/__init__.py',1742'torch/ao/nn/quantizable/modules/__init__.py',1743'torch/ao/nn/quantizable/modules/activation.py',1744'torch/ao/nn/quantizable/modules/rnn.py',1745'torch/ao/nn/quantized/__init__.py',1746'torch/ao/nn/quantized/dynamic/__init__.py',1747'torch/ao/nn/quantized/dynamic/modules/__init__.py',1748'torch/ao/nn/quantized/dynamic/modules/conv.py',1749'torch/ao/nn/quantized/dynamic/modules/linear.py',1750'torch/ao/nn/quantized/dynamic/modules/rnn.py',1751'torch/ao/nn/quantized/functional.py',1752'torch/ao/nn/quantized/modules/__init__.py',1753'torch/ao/nn/quantized/modules/activation.py',1754'torch/ao/nn/quantized/modules/batchnorm.py',1755'torch/ao/nn/quantized/modules/conv.py',1756'torch/ao/nn/quantized/modules/dropout.py',1757'torch/ao/nn/quantized/modules/embedding_ops.py',1758'torch/ao/nn/quantized/modules/functional_modules.py',1759'torch/ao/nn/quantized/modules/linear.py',1760'torch/ao/nn/quantized/modules/normalization.py',1761'torch/ao/nn/quantized/modules/rnn.py',1762'torch/ao/nn/quantized/modules/utils.py',1763'torch/ao/nn/quantized/reference/__init__.py',1764'torch/ao/nn/quantized/reference/modules/__init__.py',1765'torch/ao/nn/quantized/reference/modules/conv.py',1766'torch/ao/nn/quantized/reference/modules/linear.py',1767'torch/ao/nn/quantized/reference/modules/rnn.py',1768'torch/ao/nn/quantized/reference/modules/sparse.py',1769'torch/ao/nn/quantized/reference/modules/utils.py',1770'torch/ao/nn/sparse/__init__.py',1771'torch/ao/nn/sparse/quantized/__init__.py',1772'torch/ao/nn/sparse/quantized/dynamic/__init__.py',1773'torch/ao/nn/sparse/quantized/dynamic/linear.py',1774'torch/ao/nn/sparse/quantized/linear.py',1775'torch/ao/nn/sparse/quantized/utils.py',1776'torch/ao/ns/__init__.py',1777'torch/ao/ns/_numeric_suite.py',1778'torch/ao/ns/_numeric_suite_fx.py',1779'torch/ao/ns/fx/__init__.py',1780'torch/ao/ns/fx/graph_matcher.py',1781'torch/ao/ns/fx/graph_passes.py',1782'torch/ao/ns/fx/mappings.py',1783'torch/ao/ns/fx/n_shadows_utils.py',1784'torch/ao/ns/fx/ns_types.py',1785'torch/ao/ns/fx/pattern_utils.py',1786'torch/ao/ns/fx/qconfig_multi_mapping.py',1787'torch/ao/ns/fx/utils.py',1788'torch/ao/ns/fx/weight_utils.py',1789'torch/ao/pruning/__init__.py',1790'torch/ao/pruning/_experimental/__init__.py',1791'torch/ao/pruning/_experimental/activation_sparsifier/__init__.py',1792'torch/ao/pruning/_experimental/activation_sparsifier/activation_sparsifier.py',1793'torch/ao/pruning/_experimental/data_scheduler/__init__.py',1794'torch/ao/pruning/_experimental/data_scheduler/base_data_scheduler.py',1795'torch/ao/pruning/_experimental/data_sparsifier/__init__.py',1796'torch/ao/pruning/_experimental/data_sparsifier/base_data_sparsifier.py',1797'torch/ao/pruning/_experimental/data_sparsifier/benchmarks/dlrm_utils.py',1798'torch/ao/pruning/_experimental/data_sparsifier/benchmarks/evaluate_disk_savings.py',1799'torch/ao/pruning/_experimental/data_sparsifier/benchmarks/evaluate_forward_time.py',1800'torch/ao/pruning/_experimental/data_sparsifier/benchmarks/evaluate_model_metrics.py',1801'torch/ao/pruning/_experimental/data_sparsifier/data_norm_sparsifier.py',1802'torch/ao/pruning/_experimental/data_sparsifier/lightning/__init__.py',1803'torch/ao/pruning/_experimental/data_sparsifier/lightning/callbacks/__init__.py',1804'torch/ao/pruning/_experimental/data_sparsifier/lightning/callbacks/_data_sparstity_utils.py',1805'torch/ao/pruning/_experimental/data_sparsifier/lightning/callbacks/data_sparsity.py',1806'torch/ao/pruning/_experimental/data_sparsifier/lightning/tests/test_callbacks.py',1807'torch/ao/pruning/_experimental/data_sparsifier/quantization_utils.py',1808'torch/ao/pruning/_experimental/pruner/__init__.py',1809'torch/ao/pruning/_experimental/pruner/base_structured_sparsifier.py',1810'torch/ao/pruning/_experimental/pruner/lstm_saliency_pruner.py',1811'torch/ao/pruning/_experimental/pruner/match_utils.py',1812'torch/ao/pruning/_experimental/pruner/parametrization.py',1813'torch/ao/pruning/_experimental/pruner/prune_functions.py',1814'torch/ao/pruning/_experimental/pruner/saliency_pruner.py',1815'torch/ao/pruning/_mappings.py',1816'torch/ao/pruning/scheduler/__init__.py',1817'torch/ao/pruning/scheduler/base_scheduler.py',1818'torch/ao/pruning/scheduler/cubic_scheduler.py',1819'torch/ao/pruning/scheduler/lambda_scheduler.py',1820'torch/ao/pruning/sparsifier/__init__.py',1821'torch/ao/pruning/sparsifier/base_sparsifier.py',1822'torch/ao/pruning/sparsifier/nearly_diagonal_sparsifier.py',1823'torch/ao/pruning/sparsifier/utils.py',1824'torch/ao/pruning/sparsifier/weight_norm_sparsifier.py',1825'torch/ao/quantization/__init__.py',1826'torch/ao/quantization/_correct_bias.py',1827'torch/ao/quantization/_equalize.py',1828'torch/ao/quantization/_learnable_fake_quantize.py',1829'torch/ao/quantization/backend_config/__init__.py',1830'torch/ao/quantization/backend_config/_common_operator_config_utils.py',1831'torch/ao/quantization/backend_config/_qnnpack_pt2e.py',1832'torch/ao/quantization/backend_config/_x86_inductor_pt2e.py',1833'torch/ao/quantization/backend_config/backend_config.py',1834'torch/ao/quantization/backend_config/executorch.py',1835'torch/ao/quantization/backend_config/fbgemm.py',1836'torch/ao/quantization/backend_config/native.py',1837'torch/ao/quantization/backend_config/observation_type.py',1838'torch/ao/quantization/backend_config/onednn.py',1839'torch/ao/quantization/backend_config/qnnpack.py',1840'torch/ao/quantization/backend_config/tensorrt.py',1841'torch/ao/quantization/backend_config/utils.py',1842'torch/ao/quantization/backend_config/x86.py',1843'torch/ao/quantization/experimental/APoT_tensor.py',1844'torch/ao/quantization/experimental/apot_utils.py',1845'torch/ao/quantization/experimental/fake_quantize.py',1846'torch/ao/quantization/experimental/fake_quantize_function.py',1847'torch/ao/quantization/experimental/linear.py',1848'torch/ao/quantization/experimental/observer.py',1849'torch/ao/quantization/experimental/qconfig.py',1850'torch/ao/quantization/experimental/quantizer.py',1851'torch/ao/quantization/fake_quantize.py',1852'torch/ao/quantization/fuse_modules.py',1853'torch/ao/quantization/fuser_method_mappings.py',1854'torch/ao/quantization/fx/__init__.py',1855'torch/ao/quantization/fx/_decomposed.py',1856'torch/ao/quantization/fx/_equalize.py',1857'torch/ao/quantization/fx/_lower_to_native_backend.py',1858'torch/ao/quantization/fx/_model_report/__init__.py',1859'torch/ao/quantization/fx/_model_report/detector.py',1860'torch/ao/quantization/fx/_model_report/model_report.py',1861'torch/ao/quantization/fx/_model_report/model_report_observer.py',1862'torch/ao/quantization/fx/_model_report/model_report_visualizer.py',1863'torch/ao/quantization/fx/convert.py',1864'torch/ao/quantization/fx/custom_config.py',1865'torch/ao/quantization/fx/fuse.py',1866'torch/ao/quantization/fx/fuse_handler.py',1867'torch/ao/quantization/fx/graph_module.py',1868'torch/ao/quantization/fx/lower_to_fbgemm.py',1869'torch/ao/quantization/fx/lower_to_qnnpack.py',1870'torch/ao/quantization/fx/lstm_utils.py',1871'torch/ao/quantization/fx/match_utils.py',1872'torch/ao/quantization/fx/pattern_utils.py',1873'torch/ao/quantization/fx/prepare.py',1874'torch/ao/quantization/fx/qconfig_mapping_utils.py',1875'torch/ao/quantization/fx/quantize_handler.py',1876'torch/ao/quantization/fx/tracer.py',1877'torch/ao/quantization/fx/utils.py',1878'torch/ao/quantization/observer.py',1879'torch/ao/quantization/pt2e/__init__.py',1880'torch/ao/quantization/pt2e/_propagate_annotation.py',1881'torch/ao/quantization/pt2e/graph_utils.py',1882'torch/ao/quantization/pt2e/prepare.py',1883'torch/ao/quantization/pt2e/qat_utils.py',1884'torch/ao/quantization/pt2e/quantizer/__init__.py',1885'torch/ao/quantization/pt2e/quantizer/composable_quantizer.py',1886'torch/ao/quantization/pt2e/quantizer/embedding_quantizer.py',1887'torch/ao/quantization/pt2e/quantizer/qnnpack_quantizer.py',1888'torch/ao/quantization/pt2e/quantizer/quantizer.py',1889'torch/ao/quantization/pt2e/quantizer/utils.py',1890'torch/ao/quantization/pt2e/quantizer/x86_inductor_quantizer.py',1891'torch/ao/quantization/pt2e/representation/__init__.py',1892'torch/ao/quantization/pt2e/representation/rewrite.py',1893'torch/ao/quantization/pt2e/utils.py',1894'torch/ao/quantization/qconfig.py',1895'torch/ao/quantization/qconfig_mapping.py',1896'torch/ao/quantization/quant_type.py',1897'torch/ao/quantization/quantization_mappings.py',1898'torch/ao/quantization/quantize.py',1899'torch/ao/quantization/quantize_fx.py',1900'torch/ao/quantization/quantize_jit.py',1901'torch/ao/quantization/quantize_pt2e.py',1902'torch/ao/quantization/stubs.py',1903'torch/ao/quantization/utils.py',1904'torch/compiler/__init__.py',1905'torch/contrib/__init__.py',1906'torch/contrib/_tensorboard_vis.py',1907'torch/cuda/_memory_viz.py', # mypy: Value of type "object" is not indexable1908'torch/distributed/__init__.py',1909'torch/distributed/_composable_state.py',1910'torch/distributed/_shard/__init__.py',1911'torch/distributed/_shard/_utils.py',1912'torch/distributed/_shard/api.py',1913'torch/distributed/_shard/checkpoint/__init__.py',1914'torch/distributed/_shard/common_op_utils.py',1915'torch/distributed/_shard/metadata.py',1916'torch/distributed/_shard/op_registry_utils.py',1917'torch/distributed/_shard/sharded_optim/__init__.py',1918'torch/distributed/_shard/sharded_optim/api.py',1919'torch/distributed/_shard/sharded_tensor/__init__.py',1920'torch/distributed/_shard/sharded_tensor/_ops/__init__.py',1921'torch/distributed/_shard/sharded_tensor/_ops/_common.py',1922'torch/distributed/_shard/sharded_tensor/_ops/binary_cmp.py',1923'torch/distributed/_shard/sharded_tensor/_ops/init.py',1924'torch/distributed/_shard/sharded_tensor/_ops/misc_ops.py',1925'torch/distributed/_shard/sharded_tensor/_ops/tensor_ops.py',1926'torch/distributed/_shard/sharded_tensor/api.py',1927'torch/distributed/_shard/sharded_tensor/logger.py',1928'torch/distributed/_shard/sharded_tensor/logging_handlers.py',1929'torch/distributed/_shard/sharded_tensor/metadata.py',1930'torch/distributed/_shard/sharded_tensor/reshard.py',1931'torch/distributed/_shard/sharded_tensor/shard.py',1932'torch/distributed/_shard/sharded_tensor/utils.py',1933'torch/distributed/_shard/sharder.py',1934'torch/distributed/_shard/sharding_plan/__init__.py',1935'torch/distributed/_shard/sharding_plan/api.py',1936'torch/distributed/_shard/sharding_spec/__init__.py',1937'torch/distributed/_shard/sharding_spec/_internals.py',1938'torch/distributed/_shard/sharding_spec/api.py',1939'torch/distributed/_shard/sharding_spec/chunk_sharding_spec.py',1940'torch/distributed/_shard/sharding_spec/chunk_sharding_spec_ops/__init__.py',1941'torch/distributed/_shard/sharding_spec/chunk_sharding_spec_ops/_common.py',1942'torch/distributed/_shard/sharding_spec/chunk_sharding_spec_ops/embedding.py',1943'torch/distributed/_shard/sharding_spec/chunk_sharding_spec_ops/embedding_bag.py',1944'torch/distributed/_sharded_tensor/__init__.py',1945'torch/distributed/_sharding_spec/__init__.py',1946'torch/distributed/_tools/__init__.py',1947'torch/distributed/_tools/memory_tracker.py',1948'torch/distributed/algorithms/__init__.py',1949'torch/distributed/algorithms/_checkpoint/__init__.py',1950'torch/distributed/algorithms/_checkpoint/checkpoint_wrapper.py',1951'torch/distributed/algorithms/_comm_hooks/__init__.py',1952'torch/distributed/algorithms/_comm_hooks/default_hooks.py',1953'torch/distributed/algorithms/_optimizer_overlap/__init__.py',1954'torch/distributed/algorithms/_optimizer_overlap/optimizer_overlap.py',1955'torch/distributed/algorithms/_quantization/__init__.py',1956'torch/distributed/algorithms/_quantization/quantization.py',1957'torch/distributed/algorithms/ddp_comm_hooks/__init__.py',1958'torch/distributed/algorithms/ddp_comm_hooks/ddp_zero_hook.py',1959'torch/distributed/algorithms/ddp_comm_hooks/debugging_hooks.py',1960'torch/distributed/algorithms/ddp_comm_hooks/default_hooks.py',1961'torch/distributed/algorithms/ddp_comm_hooks/mixed_precision_hooks.py',1962'torch/distributed/algorithms/ddp_comm_hooks/optimizer_overlap_hooks.py',1963'torch/distributed/algorithms/ddp_comm_hooks/post_localSGD_hook.py',1964'torch/distributed/algorithms/ddp_comm_hooks/powerSGD_hook.py',1965'torch/distributed/algorithms/ddp_comm_hooks/quantization_hooks.py',1966'torch/distributed/algorithms/join.py',1967'torch/distributed/algorithms/model_averaging/__init__.py',1968'torch/distributed/algorithms/model_averaging/averagers.py',1969'torch/distributed/algorithms/model_averaging/hierarchical_model_averager.py',1970'torch/distributed/algorithms/model_averaging/utils.py',1971'torch/distributed/argparse_util.py',1972'torch/distributed/autograd/__init__.py',1973'torch/distributed/benchmarks/benchmark_ddp_rpc.py',1974'torch/distributed/c10d_logger.py',1975'torch/distributed/collective_utils.py',1976'torch/distributed/constants.py',1977'torch/distributed/distributed_c10d.py',1978'torch/distributed/elastic/__init__.py',1979'torch/distributed/elastic/agent/__init__.py',1980'torch/distributed/elastic/agent/server/__init__.py',1981'torch/distributed/elastic/agent/server/api.py',1982'torch/distributed/elastic/agent/server/local_elastic_agent.py',1983'torch/distributed/elastic/events/__init__.py',1984'torch/distributed/elastic/events/api.py',1985'torch/distributed/elastic/events/handlers.py',1986'torch/distributed/elastic/metrics/__init__.py',1987'torch/distributed/elastic/metrics/api.py',1988'torch/distributed/elastic/multiprocessing/__init__.py',1989'torch/distributed/elastic/multiprocessing/api.py',1990'torch/distributed/elastic/multiprocessing/errors/__init__.py',1991'torch/distributed/elastic/multiprocessing/errors/error_handler.py',1992'torch/distributed/elastic/multiprocessing/errors/handlers.py',1993'torch/distributed/elastic/multiprocessing/redirects.py',1994'torch/distributed/elastic/multiprocessing/tail_log.py',1995'torch/distributed/elastic/rendezvous/__init__.py',1996'torch/distributed/elastic/rendezvous/api.py',1997'torch/distributed/elastic/rendezvous/c10d_rendezvous_backend.py',1998'torch/distributed/elastic/rendezvous/dynamic_rendezvous.py',1999'torch/distributed/elastic/rendezvous/etcd_rendezvous.py',2000'torch/distributed/elastic/rendezvous/etcd_rendezvous_backend.py',2001'torch/distributed/elastic/rendezvous/etcd_server.py',2002'torch/distributed/elastic/rendezvous/etcd_store.py',2003'torch/distributed/elastic/rendezvous/registry.py',2004'torch/distributed/elastic/rendezvous/static_tcp_rendezvous.py',2005'torch/distributed/elastic/rendezvous/utils.py',2006'torch/distributed/elastic/timer/__init__.py',2007'torch/distributed/elastic/timer/api.py',2008'torch/distributed/elastic/timer/file_based_local_timer.py',2009'torch/distributed/elastic/timer/local_timer.py',2010'torch/distributed/elastic/utils/__init__.py',2011'torch/distributed/elastic/utils/api.py',2012'torch/distributed/elastic/utils/data/__init__.py',2013'torch/distributed/elastic/utils/data/cycling_iterator.py',2014'torch/distributed/elastic/utils/data/elastic_distributed_sampler.py',2015'torch/distributed/elastic/utils/distributed.py',2016'torch/distributed/elastic/utils/log_level.py',2017'torch/distributed/elastic/utils/logging.py',2018'torch/distributed/elastic/utils/store.py',2019'torch/distributed/examples/memory_tracker_example.py',2020'torch/distributed/launch.py',2021'torch/distributed/launcher/__init__.py',2022'torch/distributed/launcher/api.py',2023'torch/distributed/logging_handlers.py',2024'torch/distributed/nn/__init__.py',2025'torch/distributed/nn/api/__init__.py',2026'torch/distributed/nn/api/remote_module.py',2027'torch/distributed/nn/functional.py',2028'torch/distributed/nn/jit/__init__.py',2029'torch/distributed/nn/jit/instantiator.py',2030'torch/distributed/nn/jit/templates/__init__.py',2031'torch/distributed/nn/jit/templates/remote_module_template.py',2032'torch/distributed/optim/__init__.py',2033'torch/distributed/optim/apply_optimizer_in_backward.py',2034'torch/distributed/optim/functional_adadelta.py',2035'torch/distributed/optim/functional_adagrad.py',2036'torch/distributed/optim/functional_adam.py',2037'torch/distributed/optim/functional_adamax.py',2038'torch/distributed/optim/functional_adamw.py',2039'torch/distributed/optim/functional_rmsprop.py',2040'torch/distributed/optim/functional_rprop.py',2041'torch/distributed/optim/functional_sgd.py',2042'torch/distributed/optim/named_optimizer.py',2043'torch/distributed/optim/optimizer.py',2044'torch/distributed/optim/post_localSGD_optimizer.py',2045'torch/distributed/optim/utils.py',2046'torch/distributed/optim/zero_redundancy_optimizer.py',2047'torch/distributed/pipeline/__init__.py',2048'torch/distributed/pipeline/sync/__init__.py',2049'torch/distributed/pipeline/sync/_balance/__init__.py',2050'torch/distributed/pipeline/sync/_balance/blockpartition.py',2051'torch/distributed/pipeline/sync/_balance/profile.py',2052'torch/distributed/pipeline/sync/batchnorm.py',2053'torch/distributed/pipeline/sync/checkpoint.py',2054'torch/distributed/pipeline/sync/copy.py',2055'torch/distributed/pipeline/sync/dependency.py',2056'torch/distributed/pipeline/sync/microbatch.py',2057'torch/distributed/pipeline/sync/phony.py',2058'torch/distributed/pipeline/sync/pipe.py',2059'torch/distributed/pipeline/sync/pipeline.py',2060'torch/distributed/pipeline/sync/skip/__init__.py',2061'torch/distributed/pipeline/sync/skip/layout.py',2062'torch/distributed/pipeline/sync/skip/namespace.py',2063'torch/distributed/pipeline/sync/skip/portal.py',2064'torch/distributed/pipeline/sync/skip/skippable.py',2065'torch/distributed/pipeline/sync/skip/tracker.py',2066'torch/distributed/pipeline/sync/stream.py',2067'torch/distributed/pipeline/sync/utils.py',2068'torch/distributed/pipeline/sync/worker.py',2069'torch/distributed/remote_device.py',2070'torch/distributed/rendezvous.py',2071'torch/distributed/rpc/__init__.py',2072'torch/distributed/rpc/_testing/__init__.py',2073'torch/distributed/rpc/_testing/faulty_agent_backend_registry.py',2074'torch/distributed/rpc/_utils.py',2075'torch/distributed/rpc/api.py',2076'torch/distributed/rpc/backend_registry.py',2077'torch/distributed/rpc/constants.py',2078'torch/distributed/rpc/functions.py',2079'torch/distributed/rpc/internal.py',2080'torch/distributed/rpc/options.py',2081'torch/distributed/rpc/rref_proxy.py',2082'torch/distributed/rpc/server_process_global_profiler.py',2083'torch/distributed/run.py',2084'torch/distributed/tensor/__init__.py',2085'torch/distributed/tensor/parallel/__init__.py',2086'torch/distributed/tensor/parallel/_utils.py',2087'torch/distributed/tensor/parallel/_view_with_dim_change.py',2088'torch/distributed/tensor/parallel/api.py',2089'torch/distributed/tensor/parallel/fsdp.py',2090'torch/distributed/tensor/parallel/input_reshard.py',2091'torch/distributed/tensor/parallel/multihead_attention_tp.py',2092'torch/distributed/tensor/parallel/style.py',2093'torch/distributed/utils.py',2094'torch/fft/__init__.py',2095'torch/func/__init__.py',2096'torch/functional.py',2097'torch/futures/__init__.py',2098'torch/fx/__init__.py',2099'torch/fx/_compatibility.py',2100'torch/fx/_symbolic_trace.py',2101'torch/fx/annotate.py',2102'torch/fx/config.py',2103'torch/fx/experimental/__init__.py',2104'torch/fx/experimental/accelerator_partitioner.py',2105'torch/fx/experimental/const_fold.py',2106'torch/fx/experimental/debug.py',2107'torch/fx/experimental/graph_gradual_typechecker.py',2108'torch/fx/experimental/merge_matmul.py',2109'torch/fx/experimental/meta_tracer.py',2110'torch/fx/experimental/migrate_gradual_types/__init__.py',2111'torch/fx/experimental/migrate_gradual_types/constraint.py',2112'torch/fx/experimental/migrate_gradual_types/constraint_generator.py',2113'torch/fx/experimental/migrate_gradual_types/constraint_transformation.py',2114'torch/fx/experimental/migrate_gradual_types/operation.py',2115'torch/fx/experimental/migrate_gradual_types/transform_to_z3.py',2116'torch/fx/experimental/migrate_gradual_types/util.py',2117'torch/fx/experimental/migrate_gradual_types/z3_types.py',2118'torch/fx/experimental/normalize.py',2119'torch/fx/experimental/optimization.py',2120'torch/fx/experimental/partitioner_utils.py',2121'torch/fx/experimental/proxy_tensor.py',2122'torch/fx/experimental/refinement_types.py',2123'torch/fx/experimental/rewriter.py',2124'torch/fx/experimental/schema_type_annotation.py',2125'torch/fx/experimental/symbolic_shapes.py',2126'torch/fx/experimental/unification/__init__.py',2127'torch/fx/experimental/unification/core.py',2128'torch/fx/experimental/unification/dispatch.py',2129'torch/fx/experimental/unification/match.py',2130'torch/fx/experimental/unification/more.py',2131'torch/fx/experimental/unification/multipledispatch/__init__.py',2132'torch/fx/experimental/unification/multipledispatch/conflict.py',2133'torch/fx/experimental/unification/multipledispatch/core.py',2134'torch/fx/experimental/unification/multipledispatch/dispatcher.py',2135'torch/fx/experimental/unification/multipledispatch/utils.py',2136'torch/fx/experimental/unification/multipledispatch/variadic.py',2137'torch/fx/experimental/unification/unification_tools.py',2138'torch/fx/experimental/unification/utils.py',2139'torch/fx/experimental/unification/variable.py',2140'torch/fx/experimental/unify_refinements.py',2141'torch/fx/experimental/validator.py',2142'torch/fx/graph.py',2143'torch/fx/graph_module.py',2144'torch/fx/interpreter.py',2145'torch/fx/node.py',2146'torch/fx/operator_schemas.py',2147'torch/fx/passes/__init__.py',2148'torch/fx/passes/annotate_getitem_nodes.py',2149'torch/fx/passes/backends/__init__.py',2150'torch/fx/passes/backends/cudagraphs.py',2151'torch/fx/passes/dialect/__init__.py',2152'torch/fx/passes/dialect/common/__init__.py',2153'torch/fx/passes/dialect/common/cse_pass.py',2154'torch/fx/passes/fake_tensor_prop.py',2155'torch/fx/passes/graph_drawer.py',2156'torch/fx/passes/graph_manipulation.py',2157'torch/fx/passes/infra/__init__.py',2158'torch/fx/passes/infra/partitioner.py',2159'torch/fx/passes/infra/pass_base.py',2160'torch/fx/passes/infra/pass_manager.py',2161'torch/fx/passes/net_min_base.py',2162'torch/fx/passes/operator_support.py',2163'torch/fx/passes/param_fetch.py',2164'torch/fx/passes/pass_manager.py',2165'torch/fx/passes/reinplace.py',2166'torch/fx/passes/shape_prop.py',2167'torch/fx/passes/split_module.py',2168'torch/fx/passes/split_utils.py',2169'torch/fx/passes/splitter_base.py',2170'torch/fx/passes/tests/__init__.py',2171'torch/fx/passes/tests/test_pass_manager.py',2172'torch/fx/passes/tools_common.py',2173'torch/fx/passes/utils/__init__.py',2174'torch/fx/passes/utils/common.py',2175'torch/fx/passes/utils/fuser_utils.py',2176'torch/fx/passes/utils/matcher_utils.py',2177'torch/fx/passes/utils/source_matcher_utils.py',2178'torch/fx/proxy.py',2179'torch/fx/subgraph_rewriter.py',2180'torch/fx/tensor_type.py',2181'torch/fx/traceback.py',2182'torch/hub.py',2183'torch/library.py',2184'torch/linalg/__init__.py',2185# UFMT causes import cycle on masked2186'torch/masked/__init__.py',2187'torch/masked/_docs.py',2188'torch/masked/_ops.py',2189'torch/masked/maskedtensor/__init__.py',2190'torch/masked/maskedtensor/_ops_refs.py',2191'torch/masked/maskedtensor/binary.py',2192'torch/masked/maskedtensor/core.py',2193'torch/masked/maskedtensor/creation.py',2194'torch/masked/maskedtensor/passthrough.py',2195'torch/masked/maskedtensor/reductions.py',2196'torch/masked/maskedtensor/unary.py',2197'torch/monitor/__init__.py',2198'torch/nested/__init__.py',2199'torch/nn/__init__.py',2200'torch/nn/_reduction.py',2201'torch/nn/backends/__init__.py',2202'torch/nn/backends/thnn.py',2203'torch/nn/common_types.py',2204'torch/nn/cpp.py',2205'torch/nn/functional.py',2206'torch/nn/grad.py',2207'torch/nn/init.py',2208'torch/nn/intrinsic/__init__.py',2209'torch/nn/intrinsic/modules/__init__.py',2210'torch/nn/intrinsic/modules/fused.py',2211'torch/nn/intrinsic/qat/__init__.py',2212'torch/nn/intrinsic/qat/modules/__init__.py',2213'torch/nn/intrinsic/qat/modules/conv_fused.py',2214'torch/nn/intrinsic/qat/modules/linear_fused.py',2215'torch/nn/intrinsic/qat/modules/linear_relu.py',2216'torch/nn/intrinsic/quantized/__init__.py',2217'torch/nn/intrinsic/quantized/dynamic/__init__.py',2218'torch/nn/intrinsic/quantized/dynamic/modules/__init__.py',2219'torch/nn/intrinsic/quantized/dynamic/modules/linear_relu.py',2220'torch/nn/intrinsic/quantized/modules/__init__.py',2221'torch/nn/intrinsic/quantized/modules/bn_relu.py',2222'torch/nn/intrinsic/quantized/modules/conv_relu.py',2223'torch/nn/intrinsic/quantized/modules/linear_relu.py',2224'torch/nn/modules/__init__.py',2225'torch/nn/modules/_functions.py',2226'torch/nn/modules/activation.py',2227'torch/nn/modules/adaptive.py',2228'torch/nn/modules/batchnorm.py',2229'torch/nn/modules/channelshuffle.py',2230'torch/nn/modules/container.py',2231'torch/nn/modules/conv.py',2232'torch/nn/modules/distance.py',2233'torch/nn/modules/dropout.py',2234'torch/nn/modules/flatten.py',2235'torch/nn/modules/fold.py',2236'torch/nn/modules/instancenorm.py',2237'torch/nn/modules/lazy.py',2238'torch/nn/modules/linear.py',2239'torch/nn/modules/loss.py',2240'torch/nn/modules/module.py',2241'torch/nn/modules/normalization.py',2242'torch/nn/modules/padding.py',2243'torch/nn/modules/pixelshuffle.py',2244'torch/nn/modules/pooling.py',2245'torch/nn/modules/rnn.py',2246'torch/nn/modules/sparse.py',2247'torch/nn/modules/transformer.py',2248'torch/nn/modules/upsampling.py',2249'torch/nn/modules/utils.py',2250'torch/nn/parallel/__init__.py',2251'torch/nn/parallel/_functions.py',2252'torch/nn/parallel/comm.py',2253'torch/nn/parallel/data_parallel.py',2254'torch/nn/parallel/parallel_apply.py',2255'torch/nn/parallel/replicate.py',2256'torch/nn/parallel/scatter_gather.py',2257'torch/nn/parameter.py',2258'torch/nn/qat/__init__.py',2259'torch/nn/qat/dynamic/__init__.py',2260'torch/nn/qat/dynamic/modules/__init__.py',2261'torch/nn/qat/dynamic/modules/linear.py',2262'torch/nn/qat/modules/__init__.py',2263'torch/nn/qat/modules/conv.py',2264'torch/nn/qat/modules/embedding_ops.py',2265'torch/nn/qat/modules/linear.py',2266'torch/nn/quantizable/__init__.py',2267'torch/nn/quantizable/modules/__init__.py',2268'torch/nn/quantizable/modules/activation.py',2269'torch/nn/quantizable/modules/rnn.py',2270'torch/nn/quantized/__init__.py',2271'torch/nn/quantized/_reference/__init__.py',2272'torch/nn/quantized/_reference/modules/__init__.py',2273'torch/nn/quantized/_reference/modules/conv.py',2274'torch/nn/quantized/_reference/modules/linear.py',2275'torch/nn/quantized/_reference/modules/rnn.py',2276'torch/nn/quantized/_reference/modules/sparse.py',2277'torch/nn/quantized/_reference/modules/utils.py',2278'torch/nn/quantized/dynamic/__init__.py',2279'torch/nn/quantized/dynamic/modules/__init__.py',2280'torch/nn/quantized/dynamic/modules/conv.py',2281'torch/nn/quantized/dynamic/modules/linear.py',2282'torch/nn/quantized/dynamic/modules/rnn.py',2283'torch/nn/quantized/functional.py',2284'torch/nn/quantized/modules/__init__.py',2285'torch/nn/quantized/modules/activation.py',2286'torch/nn/quantized/modules/batchnorm.py',2287'torch/nn/quantized/modules/conv.py',2288'torch/nn/quantized/modules/dropout.py',2289'torch/nn/quantized/modules/embedding_ops.py',2290'torch/nn/quantized/modules/functional_modules.py',2291'torch/nn/quantized/modules/linear.py',2292'torch/nn/quantized/modules/normalization.py',2293'torch/nn/quantized/modules/rnn.py',2294'torch/nn/quantized/modules/utils.py',2295'torch/nn/utils/__init__.py',2296'torch/nn/utils/_deprecation_utils.py',2297'torch/nn/utils/_expanded_weights/__init__.py',2298'torch/nn/utils/_expanded_weights/conv_expanded_weights.py',2299'torch/nn/utils/_expanded_weights/conv_utils.py',2300'torch/nn/utils/_expanded_weights/embedding_expanded_weights.py',2301'torch/nn/utils/_expanded_weights/expanded_weights_impl.py',2302'torch/nn/utils/_expanded_weights/expanded_weights_utils.py',2303'torch/nn/utils/_expanded_weights/group_norm_expanded_weights.py',2304'torch/nn/utils/_expanded_weights/instance_norm_expanded_weights.py',2305'torch/nn/utils/_expanded_weights/layer_norm_expanded_weights.py',2306'torch/nn/utils/_expanded_weights/linear_expanded_weights.py',2307'torch/nn/utils/_per_sample_grad.py',2308'torch/nn/utils/clip_grad.py',2309'torch/nn/utils/convert_parameters.py',2310'torch/nn/utils/fusion.py',2311'torch/nn/utils/init.py',2312'torch/nn/utils/memory_format.py',2313'torch/nn/utils/parametrizations.py',2314'torch/nn/utils/parametrize.py',2315'torch/nn/utils/prune.py',2316'torch/nn/utils/rnn.py',2317'torch/nn/utils/spectral_norm.py',2318'torch/nn/utils/weight_norm.py',2319'torch/optim/__init__.py',2320'torch/optim/_functional.py',2321'torch/optim/_multi_tensor/__init__.py',2322'torch/optim/adadelta.py',2323'torch/optim/adagrad.py',2324'torch/optim/adam.py',2325'torch/optim/adamax.py',2326'torch/optim/adamw.py',2327'torch/optim/asgd.py',2328'torch/optim/lbfgs.py',2329'torch/optim/lr_scheduler.py',2330'torch/optim/nadam.py',2331'torch/optim/optimizer.py',2332'torch/optim/radam.py',2333'torch/optim/rmsprop.py',2334'torch/optim/rprop.py',2335'torch/optim/sgd.py',2336'torch/optim/sparse_adam.py',2337'torch/optim/swa_utils.py',2338'torch/overrides.py',2339'torch/quasirandom.py',2340'torch/random.py',2341'torch/return_types.py',2342'torch/serialization.py',2343'torch/signal/__init__.py',2344'torch/signal/windows/__init__.py',2345'torch/signal/windows/windows.py',2346'torch/sparse/__init__.py',2347'torch/sparse/_semi_structured_conversions.py',2348'torch/sparse/_triton_ops.py',2349'torch/sparse/semi_structured.py',2350'torch/special/__init__.py',2351'torch/storage.py',2352'torch/testing/_internal/__init__.py',2353'torch/testing/_internal/autocast_test_lists.py',2354'torch/testing/_internal/autograd_function_db.py',2355'torch/testing/_internal/check_kernel_launches.py',2356'torch/testing/_internal/codegen/__init__.py',2357'torch/testing/_internal/codegen/random_topo_test.py',2358'torch/testing/_internal/common_cuda.py',2359'torch/testing/_internal/common_device_type.py',2360'torch/testing/_internal/common_distributed.py',2361'torch/testing/_internal/common_dtype.py',2362'torch/testing/_internal/common_jit.py',2363'torch/testing/_internal/common_methods_invocations.py',2364'torch/testing/_internal/common_modules.py',2365'torch/testing/_internal/common_nn.py',2366'torch/testing/_internal/common_pruning.py',2367'torch/testing/_internal/common_quantization.py',2368'torch/testing/_internal/common_quantized.py',2369'torch/testing/_internal/common_subclass.py',2370'torch/testing/_internal/common_utils.py',2371'torch/testing/_internal/composite_compliance.py',2372'torch/testing/_internal/control_flow_opinfo_db.py',2373'torch/testing/_internal/custom_op_db.py',2374'torch/testing/_internal/data/__init__.py',2375'torch/testing/_internal/data/network1.py',2376'torch/testing/_internal/data/network2.py',2377'torch/testing/_internal/dist_utils.py',2378'torch/testing/_internal/distributed/__init__.py',2379'torch/testing/_internal/distributed/_shard/__init__.py',2380'torch/testing/_internal/distributed/_shard/sharded_tensor/__init__.py',2381'torch/testing/_internal/distributed/_shard/sharded_tensor/_test_ops_common.py',2382'torch/testing/_internal/distributed/_shard/sharded_tensor/_test_st_common.py',2383'torch/testing/_internal/distributed/_shard/test_common.py',2384'torch/testing/_internal/distributed/_tensor/__init__.py',2385'torch/testing/_internal/distributed/_tensor/common_dtensor.py',2386'torch/testing/_internal/distributed/ddp_under_dist_autograd_test.py',2387'torch/testing/_internal/distributed/distributed_test.py',2388'torch/testing/_internal/distributed/distributed_utils.py',2389'torch/testing/_internal/distributed/fake_pg.py',2390'torch/testing/_internal/distributed/multi_threaded_pg.py',2391'torch/testing/_internal/distributed/nn/__init__.py',2392'torch/testing/_internal/distributed/nn/api/__init__.py',2393'torch/testing/_internal/distributed/nn/api/remote_module_test.py',2394'torch/testing/_internal/distributed/pipe_with_ddp_test.py',2395'torch/testing/_internal/distributed/pipeline/__init__.py',2396'torch/testing/_internal/distributed/rpc/__init__.py',2397'torch/testing/_internal/distributed/rpc/dist_autograd_test.py',2398'torch/testing/_internal/distributed/rpc/dist_optimizer_test.py',2399'torch/testing/_internal/distributed/rpc/examples/__init__.py',2400'torch/testing/_internal/distributed/rpc/examples/parameter_server_test.py',2401'torch/testing/_internal/distributed/rpc/examples/reinforcement_learning_rpc_test.py',2402'torch/testing/_internal/distributed/rpc/faulty_agent_rpc_test.py',2403'torch/testing/_internal/distributed/rpc/faulty_rpc_agent_test_fixture.py',2404'torch/testing/_internal/distributed/rpc/jit/__init__.py',2405'torch/testing/_internal/distributed/rpc/jit/dist_autograd_test.py',2406'torch/testing/_internal/distributed/rpc/jit/rpc_test.py',2407'torch/testing/_internal/distributed/rpc/jit/rpc_test_faulty.py',2408'torch/testing/_internal/distributed/rpc/rpc_agent_test_fixture.py',2409'torch/testing/_internal/distributed/rpc/rpc_test.py',2410'torch/testing/_internal/distributed/rpc/tensorpipe_rpc_agent_test_fixture.py',2411'torch/testing/_internal/distributed/rpc_utils.py',2412'torch/testing/_internal/generated/__init__.py',2413'torch/testing/_internal/hypothesis_utils.py',2414'torch/testing/_internal/inductor_utils.py',2415'torch/testing/_internal/jit_metaprogramming_utils.py',2416'torch/testing/_internal/jit_utils.py',2417'torch/testing/_internal/logging_tensor.py',2418'torch/testing/_internal/logging_utils.py',2419'torch/testing/_internal/optests/__init__.py',2420'torch/testing/_internal/optests/aot_autograd.py',2421'torch/testing/_internal/optests/compile_check.py',2422'torch/testing/_internal/optests/fake_tensor.py',2423'torch/testing/_internal/optests/make_fx.py',2424'torch/testing/_internal/quantization_torch_package_models.py',2425'torch/testing/_internal/test_module/__init__.py',2426'torch/testing/_internal/test_module/future_div.py',2427'torch/testing/_internal/test_module/no_future_div.py',2428'torch/torch_version.py',2429'torch/types.py',2430'torch/utils/__init__.py',2431'torch/utils/_contextlib.py',2432'torch/utils/_cpp_extension_versioner.py',2433'torch/utils/_crash_handler.py',2434'torch/utils/_cuda_trace.py',2435'torch/utils/_device.py',2436'torch/utils/_foreach_utils.py',2437'torch/utils/_freeze.py',2438'torch/utils/_mode_utils.py',2439'torch/utils/_python_dispatch.py',2440'torch/utils/_stats.py',2441'torch/utils/_sympy/__init__.py',2442'torch/utils/_sympy/functions.py',2443'torch/utils/_sympy/value_ranges.py',2444'torch/utils/_traceback.py',2445'torch/utils/_zip.py',2446'torch/utils/backcompat/__init__.py',2447'torch/utils/backend_registration.py',2448'torch/utils/benchmark/__init__.py',2449'torch/utils/benchmark/examples/__init__.py',2450'torch/utils/benchmark/examples/blas_compare.py',2451'torch/utils/benchmark/examples/blas_compare_setup.py',2452'torch/utils/benchmark/examples/compare.py',2453'torch/utils/benchmark/examples/end_to_end.py',2454'torch/utils/benchmark/examples/fuzzer.py',2455'torch/utils/benchmark/examples/op_benchmark.py',2456'torch/utils/benchmark/examples/simple_timeit.py',2457'torch/utils/benchmark/examples/sparse/compare.py',2458'torch/utils/benchmark/examples/sparse/fuzzer.py',2459'torch/utils/benchmark/examples/sparse/op_benchmark.py',2460'torch/utils/benchmark/examples/spectral_ops_fuzz_test.py',2461'torch/utils/benchmark/op_fuzzers/__init__.py',2462'torch/utils/benchmark/op_fuzzers/binary.py',2463'torch/utils/benchmark/op_fuzzers/sparse_binary.py',2464'torch/utils/benchmark/op_fuzzers/sparse_unary.py',2465'torch/utils/benchmark/op_fuzzers/spectral.py',2466'torch/utils/benchmark/op_fuzzers/unary.py',2467'torch/utils/benchmark/utils/__init__.py',2468'torch/utils/benchmark/utils/_stubs.py',2469'torch/utils/benchmark/utils/common.py',2470'torch/utils/benchmark/utils/compare.py',2471'torch/utils/benchmark/utils/compile.py',2472'torch/utils/benchmark/utils/cpp_jit.py',2473'torch/utils/benchmark/utils/fuzzer.py',2474'torch/utils/benchmark/utils/sparse_fuzzer.py',2475'torch/utils/benchmark/utils/timer.py',2476'torch/utils/benchmark/utils/valgrind_wrapper/__init__.py',2477'torch/utils/benchmark/utils/valgrind_wrapper/timer_interface.py',2478'torch/utils/bottleneck/__init__.py',2479'torch/utils/bottleneck/__main__.py',2480'torch/utils/bundled_inputs.py',2481'torch/utils/checkpoint.py',2482'torch/utils/collect_env.py',2483'torch/utils/cpp_backtrace.py',2484'torch/utils/cpp_extension.py',2485'torch/utils/data/__init__.py',2486'torch/utils/data/_utils/__init__.py',2487'torch/utils/data/_utils/collate.py',2488'torch/utils/data/_utils/fetch.py',2489'torch/utils/data/_utils/pin_memory.py',2490'torch/utils/data/_utils/serialization.py',2491'torch/utils/data/_utils/signal_handling.py',2492'torch/utils/data/_utils/worker.py',2493'torch/utils/data/backward_compatibility.py',2494'torch/utils/data/dataloader.py',2495'torch/utils/data/datapipes/__init__.py',2496'torch/utils/data/datapipes/_decorator.py',2497'torch/utils/data/datapipes/_hook_iterator.py',2498'torch/utils/data/datapipes/_typing.py',2499'torch/utils/data/datapipes/dataframe/__init__.py',2500'torch/utils/data/datapipes/dataframe/dataframe_wrapper.py',2501'torch/utils/data/datapipes/dataframe/dataframes.py',2502'torch/utils/data/datapipes/dataframe/datapipes.py',2503'torch/utils/data/datapipes/dataframe/structures.py',2504'torch/utils/data/datapipes/datapipe.py',2505'torch/utils/data/datapipes/gen_pyi.py',2506'torch/utils/data/datapipes/iter/__init__.py',2507'torch/utils/data/datapipes/iter/callable.py',2508'torch/utils/data/datapipes/iter/combinatorics.py',2509'torch/utils/data/datapipes/iter/combining.py',2510'torch/utils/data/datapipes/iter/filelister.py',2511'torch/utils/data/datapipes/iter/fileopener.py',2512'torch/utils/data/datapipes/iter/grouping.py',2513'torch/utils/data/datapipes/iter/routeddecoder.py',2514'torch/utils/data/datapipes/iter/selecting.py',2515'torch/utils/data/datapipes/iter/sharding.py',2516'torch/utils/data/datapipes/iter/streamreader.py',2517'torch/utils/data/datapipes/iter/utils.py',2518'torch/utils/data/datapipes/map/__init__.py',2519'torch/utils/data/datapipes/map/callable.py',2520'torch/utils/data/datapipes/map/combinatorics.py',2521'torch/utils/data/datapipes/map/combining.py',2522'torch/utils/data/datapipes/map/grouping.py',2523'torch/utils/data/datapipes/map/utils.py',2524'torch/utils/data/datapipes/utils/__init__.py',2525'torch/utils/data/datapipes/utils/common.py',2526'torch/utils/data/datapipes/utils/decoder.py',2527'torch/utils/data/datapipes/utils/snapshot.py',2528'torch/utils/data/distributed.py',2529'torch/utils/data/graph.py',2530'torch/utils/data/graph_settings.py',2531'torch/utils/data/sampler.py',2532'torch/utils/dlpack.py',2533'torch/utils/file_baton.py',2534'torch/utils/flop_counter.py',2535'torch/utils/hipify/__init__.py',2536'torch/utils/hipify/constants.py',2537'torch/utils/hipify/cuda_to_hip_mappings.py',2538'torch/utils/hipify/hipify_python.py',2539'torch/utils/hipify/version.py',2540'torch/utils/hooks.py',2541'torch/utils/jit/__init__.py',2542'torch/utils/jit/log_extract.py',2543'torch/utils/mkldnn.py',2544'torch/utils/mobile_optimizer.py',2545'torch/utils/model_dump/__init__.py',2546'torch/utils/model_dump/__main__.py',2547'torch/utils/model_zoo.py',2548'torch/utils/show_pickle.py',2549'torch/utils/tensorboard/__init__.py',2550'torch/utils/tensorboard/_caffe2_graph.py',2551'torch/utils/tensorboard/_convert_np.py',2552'torch/utils/tensorboard/_embedding.py',2553'torch/utils/tensorboard/_onnx_graph.py',2554'torch/utils/tensorboard/_proto_graph.py',2555'torch/utils/tensorboard/_pytorch_graph.py',2556'torch/utils/tensorboard/_utils.py',2557'torch/utils/tensorboard/summary.py',2558'torch/utils/tensorboard/writer.py',2559'torch/utils/throughput_benchmark.py',2560'torch/utils/viz/__init__.py',2561'torch/utils/viz/_cycles.py',2562'torch/utils/weak.py',2563]
2564init_command = [2565'python3',2566'tools/linter/adapters/pip_init.py',2567'--dry-run={{DRYRUN}}',2568'--no-black-binary',2569'black==23.12.1',2570'ufmt==2.1.0',2571'usort==1.0.6',2572]
2573is_formatter = true2574
2575[[linter]]2576code = 'COPYRIGHT'2577include_patterns = ['**']2578exclude_patterns = [2579'.lintrunner.toml',2580'fb/**',2581'**/fb/**',2582]
2583command = [2584'python3',2585'tools/linter/adapters/grep_linter.py',2586'--pattern=Confidential and proprietary',2587'--linter-name=COPYRIGHT',2588'--error-name=Confidential Code',2589"""--error-description=\2590Proprietary and confidential source code\
2591should not be contributed to PyTorch codebase\
2592""",2593'--',2594'@{{PATHSFILE}}'2595]
2596
2597[[linter]]2598code = 'BAZEL_LINTER'2599include_patterns = ['WORKSPACE']2600command = [2601'python3',2602'tools/linter/adapters/bazel_linter.py',2603'--binary=.lintbin/bazel',2604'--',2605'@{{PATHSFILE}}'2606]
2607init_command = [2608'python3',2609'tools/linter/adapters/s3_init.py',2610'--config-json=tools/linter/adapters/s3_init_config.json',2611'--linter=bazel',2612'--dry-run={{DRYRUN}}',2613'--output-dir=.lintbin',2614'--output-name=bazel',2615]
2616is_formatter = true2617
2618[[linter]]2619code = 'LINTRUNNER_VERSION'2620include_patterns = ['**']2621exclude_patterns = [2622'fb/**',2623'**/fb/**',2624]
2625command = [2626'python3',2627'tools/linter/adapters/lintrunner_version_linter.py'2628]
2629
2630[[linter]]2631code = 'RUFF'2632include_patterns = ['**/*.py', '**/*.pyi']2633exclude_patterns = [2634'caffe2/**',2635'functorch/docs/**',2636'functorch/notebooks/**',2637'torch/_inductor/fx_passes/serialized_patterns/**',2638'scripts/**',2639'third_party/**',2640'fb/**',2641'**/fb/**',2642]
2643command = [2644'python3',2645'tools/linter/adapters/ruff_linter.py',2646'--config=pyproject.toml',2647'--show-disable',2648'--',2649'@{{PATHSFILE}}'2650]
2651init_command = [2652'python3',2653'tools/linter/adapters/pip_init.py',2654'--dry-run={{DRYRUN}}',2655'ruff==0.3.0',2656]
2657is_formatter = true2658
2659# This linter prevents merge conlicts in csv files in pytorch by enforcing
2660# three lines of whitespace between entries such that unless people are modifying
2661# the same line, merge conflicts should not arise in git or hg
2662[[linter]]2663code = 'MERGE_CONFLICTLESS_CSV'2664include_patterns = ['benchmarks/dynamo/ci_expected_accuracy/*.csv']2665command = [2666'python3',2667'tools/linter/adapters/no_merge_conflict_csv_linter.py',2668'--',2669'@{{PATHSFILE}}'2670]
2671is_formatter = true2672