1 Star 0 Fork 56

吴奥/pytorch

forked from Gitee 极速下载/pytorch 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
.lintrunner.toml 100.44 KB
一键复制 编辑 原始数据 按行查看 历史
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688
merge_base_with = "origin/main"
[[linter]]
code = 'FLAKE8'
include_patterns = ['**/*.py']
exclude_patterns = [
'.git/**',
'build_test_custom_build/**',
'build/**',
'caffe2/**',
'docs/caffe2/**',
'docs/cpp/src/**',
'docs/src/**',
'fb/**',
'**/fb/**',
'functorch/docs/**',
'functorch/examples/**',
'functorch/notebooks/**',
'torch/_inductor/fx_passes/serialized_patterns/**',
'scripts/**',
'test/generated_type_hints_smoketest.py',
# Tests from the NumPy test suite
'test/torch_np/numpy_test/**/*.py',
'third_party/**',
'torch/include/**',
'torch/lib/**',
'venv/**',
'**/*.pyi',
'tools/test/test_selective_build.py',
]
command = [
'python3',
'tools/linter/adapters/flake8_linter.py',
'--',
'@{{PATHSFILE}}'
]
init_command = [
'python3',
'tools/linter/adapters/pip_init.py',
'--dry-run={{DRYRUN}}',
'flake8==6.0.0',
'flake8-bugbear==23.3.23',
'flake8-comprehensions==3.12.0',
'flake8-executable==2.1.3',
'flake8-logging-format==0.9.0',
'flake8-pyi==23.3.1',
'flake8-simplify==0.19.3',
'mccabe==0.7.0',
'pycodestyle==2.10.0',
'pyflakes==3.0.1',
'torchfix==0.2.0',
]
[[linter]]
code = 'CLANGFORMAT'
include_patterns = [
'aten/src/ATen/*.h',
'aten/src/ATen/mps/**/*.mm',
'aten/src/ATen/native/mps/**/*.mm',
'aten/src/ATen/native/vulkan/**/*.h',
'aten/src/ATen/native/vulkan/**/*.cpp',
'aten/src/ATen/native/cuda/MultiTensorApply.cuh',
'aten/src/ATen/native/**/Foreach*.*',
'c10/**/*.h',
'c10/**/*.cpp',
'torch/csrc/**/*.h',
'torch/csrc/**/*.hpp',
'torch/csrc/**/*.cpp',
'test/cpp/**/*.h',
'test/cpp/**/*.cpp',
]
exclude_patterns = [
'aten/src/ATen/native/vulkan/api/vk_mem_alloc.h',
'c10/util/strong_type.h',
'**/fb/**',
'torch/csrc/jit/serialization/mobile_bytecode_generated.h',
'torch/csrc/utils/pythoncapi_compat.h',
'aten/src/ATen/dlpack.h',
]
init_command = [
'python3',
'tools/linter/adapters/s3_init.py',
'--config-json=tools/linter/adapters/s3_init_config.json',
'--linter=clang-format',
'--dry-run={{DRYRUN}}',
'--output-dir=.lintbin',
'--output-name=clang-format',
]
command = [
'python3',
'tools/linter/adapters/clangformat_linter.py',
'--binary=.lintbin/clang-format',
'--',
'@{{PATHSFILE}}'
]
is_formatter = true
[[linter]]
code = 'MYPY'
include_patterns = [
'torch/**/*.py',
'torch/**/*.pyi',
'caffe2/**/*.py',
'caffe2/**/*.pyi',
'test/test_bundled_images.py',
'test/test_bundled_inputs.py',
'test/test_complex.py',
'test/test_datapipe.py',
'test/test_futures.py',
# 'test/test_numpy_interop.py',
'test/test_torch.py',
'test/test_type_hints.py',
'test/test_type_info.py',
'test/test_utils.py',
]
exclude_patterns = [
'**/fb/**',
'torch/include/**',
'torch/csrc/**',
'torch/_dynamo/**/*.py',
'torch/_inductor/**/*.py',
'torch/_numpy/**/*.py',
'torch/_functorch/aot_autograd.py',
'torch/_functorch/benchmark_utils.py',
'torch/_functorch/compile_utils.py',
'torch/_functorch/compilers.py',
'torch/_functorch/eager_transforms.py',
'torch/_functorch/fx_minifier.py',
'torch/_functorch/partitioners.py',
'torch/_functorch/top_operators_github_usage.py',
'torch/_functorch/vmap.py',
'torch/_subclasses/schema_check_mode.py',
'torch/distributed/elastic/agent/server/api.py',
'torch/testing/_internal/**',
'torch/distributed/fsdp/fully_sharded_data_parallel.py',
# TODO(suo): these exclusions were added just to get lint clean on master.
# Follow up to do more target suppressions and remove them.
'torch/ao/quantization/fx/convert.py',
'torch/ao/quantization/_dbr/function_fusion.py',
'test/test_datapipe.py',
'caffe2/contrib/fakelowp/test/test_batchmatmul_nnpi_fp16.py',
'test/test_numpy_interop.py',
'torch/torch_version.py',
'torch/fx/proxy.py',
'torch/fx/passes/shape_prop.py',
'torch/fx/node.py',
'torch/fx/experimental/symbolic_shapes.py',
'torch/fx/experimental/proxy_tensor.py',
'torch/_subclasses/fake_utils.py',
'torch/_subclasses/fake_tensor.py',
]
command = [
'python3',
'tools/linter/adapters/mypy_linter.py',
'--config=mypy.ini',
'--',
'@{{PATHSFILE}}'
]
init_command = [
'python3',
'tools/linter/adapters/pip_init.py',
'--dry-run={{DRYRUN}}',
'numpy==1.24.3 ; python_version == "3.8"',
'numpy==1.26.0 ; python_version >= "3.9"',
'expecttest==0.1.6',
'mypy==1.7.0',
'types-requests==2.27.25',
'types-PyYAML==6.0.7',
'types-tabulate==0.8.8',
'types-protobuf==3.19.18',
'types-pkg-resources==0.1.3',
'types-Jinja2==2.11.9',
'junitparser==2.1.1',
'rich==10.9.0',
'pyyaml==6.0',
'optree==0.10.0',
]
[[linter]]
code = 'MYPYINDUCTOR'
include_patterns = [
'torch/_dynamo/**/*.py',
'torch/_inductor/**/*.py',
]
exclude_patterns = [
'**/fb/**',
'torch/_dynamo/backends/**/*.py',
'torch/_dynamo/variables/**/*.py',
'torch/_dynamo/polyfill.py',
'torch/_inductor/fx_passes/serialized_patterns/**',
]
command = [
'python3',
'tools/linter/adapters/mypy_linter.py',
'--config=mypy-inductor.ini',
'--code=MYPYINDUCTOR',
'--',
'@{{PATHSFILE}}'
]
init_command = [
'python3',
'tools/linter/adapters/pip_init.py',
'--dry-run={{DRYRUN}}',
'types-colorama==0.4.6',
]
[[linter]]
code = 'MYPYSTRICT'
include_patterns = [
'.github/**/*.py',
'benchmarks/instruction_counts/**/*.py',
'tools/**/*.py',
'torchgen/**/*.py',
'torch/utils/_pytree.py',
'torch/utils/_cxx_pytree.py',
'torch/utils/benchmark/utils/common.py',
'torch/utils/benchmark/utils/timer.py',
'torch/utils/benchmark/utils/valgrind_wrapper/**/*.py',
]
exclude_patterns = [
# (linbinyu) copied from internal repo
'**/fb/**',
'tools/code_analyzer/gen_operators_yaml.py',
'tools/dynamo/verify_dynamo.py',
'tools/gen_vulkan_spv.py',
'tools/test/gen_operators_yaml_test.py',
'tools/test/gen_oplist_test.py',
'tools/test/test_selective_build.py',
]
command = [
'python3',
'tools/linter/adapters/mypy_linter.py',
'--config=mypy-strict.ini',
'--code=MYPYSTRICT',
'--',
'@{{PATHSFILE}}'
]
[[linter]]
code = 'CLANGTIDY'
include_patterns = [
'aten/src/ATen/core/*.cpp',
'c10/**/*.cpp',
'c10/core/**/*.h',
'torch/csrc/**/*.cpp',
]
exclude_patterns = [
# The negative filters below are to exclude files that include onnx_pb.h or
# caffe2_pb.h, otherwise we'd have to build protos as part of this CI job.
# CUDA files are also excluded.
'**/fb/**',
'**/*pb.h',
'**/*CUDA*',
'**/cuda/*pp',
'aten/src/ATen/core/TensorImpl_test.cpp',
'third_party/**/*',
'torch/csrc/api/**',
'torch/csrc/autograd/generated/**',
'torch/csrc/autograd/profiler_legacy.cpp',
'torch/csrc/cuda/**',
'torch/csrc/dynamo/*',
'torch/csrc/distributed/**/*',
'torch/csrc/inductor/**/*',
'torch/csrc/jit/**/*',
'torch/csrc/jit/serialization/import_legacy.cpp',
'torch/csrc/jit/serialization/export.cpp',
'torch/csrc/lazy/**/*',
'torch/csrc/onnx/init.cpp',
'torch/csrc/mps/**/*',
]
init_command = [
'python3',
'tools/linter/adapters/s3_init.py',
'--config-json=tools/linter/adapters/s3_init_config.json',
'--linter=clang-tidy',
'--dry-run={{DRYRUN}}',
'--output-dir=.lintbin',
'--output-name=clang-tidy',
]
command = [
'python3',
'tools/linter/adapters/clangtidy_linter.py',
'--binary=.lintbin/clang-tidy',
'--build_dir=./build',
'--',
'@{{PATHSFILE}}'
]
[[linter]]
code = 'TYPEIGNORE'
include_patterns = ['**/*.py', '**/*.pyi']
exclude_patterns = [
'fb/**',
'**/fb/**',
'test/test_jit.py',
]
command = [
'python3',
'tools/linter/adapters/grep_linter.py',
'--pattern=# type:\s*ignore([^\[]|$)',
'--linter-name=TYPEIGNORE',
'--error-name=unqualified type: ignore',
"""--error-description=\
This line has an unqualified `type: ignore`; \
please convert it to `type: ignore[xxxx]`\
""",
'--',
'@{{PATHSFILE}}'
]
[[linter]]
code = 'NOQA'
include_patterns = ['**/*.py', '**/*.pyi']
exclude_patterns = [
'caffe2/**',
'fb/**',
'**/fb/**'
]
command = [
'python3',
'tools/linter/adapters/grep_linter.py',
'--pattern=# noqa([^:]|$)',
'--linter-name=NOQA',
'--error-name=unqualified noqa',
"""--error-description=\
This line has an unqualified `noqa`; \
please convert it to `noqa: XXXX`\
""",
'--',
'@{{PATHSFILE}}'
]
[[linter]]
code = 'NATIVEFUNCTIONS'
include_patterns=['aten/src/ATen/native/native_functions.yaml']
command = [
'python3',
'tools/linter/adapters/nativefunctions_linter.py',
'--native-functions-yml=aten/src/ATen/native/native_functions.yaml',
]
init_command = [
'python3',
'tools/linter/adapters/pip_init.py',
'--dry-run={{DRYRUN}}',
'ruamel.yaml==0.17.4',
]
is_formatter = true
[[linter]]
code = 'NEWLINE'
include_patterns=['**']
exclude_patterns=[
'**/contrib/**',
'third_party/**',
'**/*.bat',
'**/*.expect',
'**/*.ipynb',
'**/*.ps1',
'**/*.ptl',
'fb/**',
'**/fb/**',
'tools/clang_format_hash/**',
'test/cpp/jit/upgrader_models/*.ptl',
'test/cpp/jit/upgrader_models/*.ptl.ff',
'**/*.png',
'**/*.gz',
]
command = [
'python3',
'tools/linter/adapters/newlines_linter.py',
'--',
'@{{PATHSFILE}}',
]
is_formatter = true
[[linter]]
code = 'CONSTEXPR'
include_patterns=['aten/src/ATen/native/cuda/*.cu']
command = [
'python3',
'tools/linter/adapters/constexpr_linter.py',
'--',
'@{{PATHSFILE}}',
]
is_formatter = true
[[linter]]
code = 'SPACES'
include_patterns = ['**']
exclude_patterns = [
'**/contrib/**',
'**/*.diff',
'**/*.patch',
'third_party/**',
'aten/src/ATen/native/vulkan/api/vk_mem_alloc.h',
'fb/**',
'**/fb/**',
'test/cpp/jit/upgrader_models/*.ptl',
'test/cpp/jit/upgrader_models/*.ptl.ff',
]
command = [
'python3',
'tools/linter/adapters/grep_linter.py',
'--pattern=[[:blank:]]$',
'--linter-name=SPACES',
'--error-name=trailing spaces',
'--replace-pattern=s/[[:blank:]]+$//',
"""--error-description=\
This line has trailing spaces; please remove them.\
""",
'--',
'@{{PATHSFILE}}'
]
[[linter]]
code = 'TABS'
include_patterns = ['**']
exclude_patterns = [
'**/*.svg',
'**/*Makefile',
'**/contrib/**',
'third_party/**',
'**/.gitattributes',
'**/.gitmodules',
'fb/**',
'**/fb/**',
'aten/src/ATen/native/vulkan/api/vk_mem_alloc.h',
'test/cpp/jit/upgrader_models/*.ptl',
'test/cpp/jit/upgrader_models/*.ptl.ff',
'.lintrunner.toml',
]
command = [
'python3',
'tools/linter/adapters/grep_linter.py',
# @lint-ignore TXT2
'--pattern= ',
'--linter-name=TABS',
'--error-name=saw some tabs',
'--replace-pattern=s/\t/ /',
"""--error-description=\
This line has tabs; please replace them with spaces.\
""",
'--',
'@{{PATHSFILE}}'
]
[[linter]]
code = 'INCLUDE'
include_patterns = [
'c10/**',
'aten/**',
'torch/csrc/**',
]
exclude_patterns = [
'aten/src/ATen/native/quantized/cpu/qnnpack/**',
'aten/src/ATen/native/vulkan/api/vk_mem_alloc.h',
'aten/src/ATen/native/vulkan/glsl/**',
'**/fb/**',
'torch/csrc/jit/serialization/mobile_bytecode_generated.h',
'torch/csrc/utils/pythoncapi_compat.h',
]
command = [
'python3',
'tools/linter/adapters/grep_linter.py',
'--pattern=#include "',
'--linter-name=INCLUDE',
'--error-name=quoted include',
'--replace-pattern=s/#include "(.*)"$/#include <\1>/',
"""--error-description=\
This #include uses quotes; please convert it to #include <xxxx>\
""",
'--',
'@{{PATHSFILE}}'
]
[[linter]]
code = 'PYBIND11_INCLUDE'
include_patterns = [
'**/*.cpp',
'**/*.h',
]
exclude_patterns = [
'torch/csrc/utils/pybind.h',
'torch/utils/benchmark/utils/valgrind_wrapper/compat_bindings.cpp',
'caffe2/**/*',
]
command = [
'python3',
'tools/linter/adapters/grep_linter.py',
'--pattern=#include <pybind11\/',
'--allowlist-pattern=#include <torch\/csrc\/utils\/pybind.h>',
'--linter-name=PYBIND11_INCLUDE',
'--match-first-only',
'--error-name=direct include of pybind11',
# https://stackoverflow.com/a/33416489/23845
# NB: this won't work if the pybind11 include is on the first line;
# but that's fine because it will just mean the lint will still fail
# after applying the change and you will have to fix it manually
'--replace-pattern=1,/(#include <pybind11\/)/ s/(#include <pybind11\/)/#include <torch\/csrc\/utils\/pybind.h>\n\1/',
"""--error-description=\
This #include directly includes pybind11 without also including \
#include <torch/csrc/utils/pybind.h>; this means some important \
specializations may not be included.\
""",
'--',
'@{{PATHSFILE}}'
]
[[linter]]
code = 'ERROR_PRONE_ISINSTANCE'
include_patterns = [
'torch/_refs/**/*.py',
'torch/_prims/**/*.py',
'torch/_prims_common/**/*.py',
'torch/_decomp/**/*.py',
'torch/_meta_registrations.py',
]
exclude_patterns = [
'**/fb/**',
]
command = [
'python3',
'tools/linter/adapters/grep_linter.py',
'--pattern=isinstance\([^)]+(int|float)\)',
'--linter-name=ERROR_PRONE_ISINSTANCE',
'--error-name=error prone isinstance',
"""--error-description=\
This line has an isinstance call that directly refers to \
int or float. This is error-prone because you may also \
have wanted to allow SymInt or SymFloat in your test. \
To suppress this lint, use an appropriate type alias defined \
in torch._prims_common; use IntLike/FloatLike when you would accept \
both regular and symbolic numbers, Dim for ints representing \
dimensions, or IntWithoutSymInt/FloatWithoutSymFloat if you really \
meant to exclude symbolic numbers.
""",
'--',
'@{{PATHSFILE}}'
]
[[linter]]
code = 'PYBIND11_SPECIALIZATION'
include_patterns = [
'**/*.cpp',
'**/*.h',
]
exclude_patterns = [
# The place for all orphan specializations
'torch/csrc/utils/pybind.h',
# These specializations are non-orphan
'torch/csrc/distributed/c10d/init.cpp',
'torch/csrc/jit/python/pybind.h',
'fb/**',
'**/fb/**',
# These are safe to exclude as they do not have Python
'c10/**/*',
]
command = [
'python3',
'tools/linter/adapters/grep_linter.py',
'--pattern=PYBIND11_DECLARE_HOLDER_TYPE',
'--linter-name=PYBIND11_SPECIALIZATION',
'--error-name=pybind11 specialization in non-standard location',
"""--error-description=\
This pybind11 specialization (PYBIND11_DECLARE_HOLDER_TYPE) should \
be placed in torch/csrc/utils/pybind.h so that it is guaranteed to be \
included at any site that may potentially make use of it via py::cast. \
If your specialization is in the same header file as the definition \
of the holder type, you can ignore this lint by adding your header to \
the exclude_patterns for this lint in .lintrunner.toml. For more \
information see https://github.com/pybind/pybind11/issues/4099 \
""",
'--',
'@{{PATHSFILE}}'
]
[[linter]]
code = 'PYPIDEP'
include_patterns = ['.github/**']
exclude_patterns = [
'**/*.rst',
'**/*.py',
'**/*.md',
'**/*.diff',
'**/fb/**',
]
command = [
'python3',
'tools/linter/adapters/grep_linter.py',
"""--pattern=\
(pip|pip3|python -m pip|python3 -m pip|python3 -mpip|python -mpip) \
install ([a-zA-Z0-9][A-Za-z0-9\\._\\-]+)([^/=<>~!]+)[A-Za-z0-9\\._\\-\\*\\+\\!]*$\
""",
'--linter-name=PYPIDEP',
'--error-name=unpinned PyPI install',
"""--error-description=\
This line has unpinned PyPi installs; \
please pin them to a specific version: e.g. 'thepackage==1.2'\
""",
'--',
'@{{PATHSFILE}}'
]
[[linter]]
code = 'EXEC'
include_patterns = ['**']
exclude_patterns = [
'third_party/**',
'torch/bin/**',
'**/*.so',
'**/*.py',
'**/*.sh',
'**/*.bash',
'**/git-pre-commit',
'**/git-clang-format',
'**/gradlew',
'fb/**',
'**/fb/**',
]
command = [
'python3',
'tools/linter/adapters/exec_linter.py',
'--',
'@{{PATHSFILE}}',
]
[[linter]]
code = 'CUBINCLUDE'
include_patterns = ['aten/**']
exclude_patterns = [
'aten/src/ATen/cuda/cub*.cuh',
'**/fb/**',
]
command = [
'python3',
'tools/linter/adapters/grep_linter.py',
'--pattern=#include <cub/',
'--linter-name=CUBINCLUDE',
'--error-name=direct cub include',
"""--error-description=\
This line has a direct cub include; please include \
ATen/cuda/cub.cuh instead and wrap your cub calls in \
at::native namespace if necessary.
""",
'--',
'@{{PATHSFILE}}'
]
[[linter]]
code = 'RAWCUDA'
include_patterns = [
'aten/**',
'c10/**',
]
exclude_patterns = [
'aten/src/ATen/test/**',
'c10/cuda/CUDAFunctions.h',
'c10/cuda/CUDACachingAllocator.cpp',
'**/fb/**',
]
command = [
'python3',
'tools/linter/adapters/grep_linter.py',
'--pattern=cudaStreamSynchronize',
'--linter-name=RAWCUDA',
'--error-name=raw CUDA API usage',
"""--error-description=\
This line calls raw CUDA APIs directly; please use at::cuda wrappers instead.
""",
'--',
'@{{PATHSFILE}}'
]
[[linter]]
code = 'RAWCUDADEVICE'
include_patterns = [
'aten/**',
'c10/**',
'torch/csrc/**',
]
exclude_patterns = [
'aten/src/ATen/cuda/CUDAContext.cpp',
'aten/src/ATen/cuda/CUDAGeneratorImpl.cpp',
'aten/src/ATen/test/**',
'c10/core/impl/InlineDeviceGuard.h',
'c10/cuda/CUDAFunctions.cpp',
'c10/cuda/CUDAGuard.h',
'c10/cuda/impl/CUDATest.cpp',
'torch/csrc/cuda/nccl.cpp',
'**/fb/**',
]
command = [
'python3',
'tools/linter/adapters/grep_linter.py',
'--pattern=cudaSetDevice(',
'--pattern=cudaGetDevice(',
'--linter-name=RAWCUDADEVICE',
'--error-name=raw CUDA API usage',
"""--error-description=\
This line calls raw CUDA APIs directly; please use c10::cuda wrappers instead.
""",
'--',
'@{{PATHSFILE}}'
]
[[linter]]
code = 'ROOT_LOGGING'
include_patterns = [
'**/*.py',
]
# These are not library code, but scripts in their own right, and so
# therefore are permitted to use logging
exclude_patterns = [
'tools/**',
'test/**',
'benchmarks/**',
'torch/distributed/run.py',
'functorch/benchmarks/**',
# Grandfathered in
'caffe2/**',
'fb/**',
'**/fb/**',
]
command = [
'python3',
'tools/linter/adapters/grep_linter.py',
'--pattern=logging\.(debug|info|warn|warning|error|critical|log|exception)\(',
'--replace-pattern=s/logging\.(debug|info|warn|warning|error|critical|log|exception)\(/log.\1(/',
'--linter-name=ROOT_LOGGING',
'--error-name=use of root logger',
"""--error-description=\
Do not use root logger (logging.info, etc) directly; instead \
define 'log = logging.getLogger(__name__)' and call, e.g., log.info().
""",
'--',
'@{{PATHSFILE}}'
]
[[linter]]
code = 'DEPLOY_DETECTION'
include_patterns = [
'**/*.py',
]
command = [
'python3',
'tools/linter/adapters/grep_linter.py',
'--pattern=sys\.executable == .torch_deploy.',
'--replace-pattern=s/sys\.executable == .torch_deploy./torch._running_with_deploy\(\)/',
'--linter-name=DEPLOY_DETECTION',
'--error-name=properly detect deploy runner',
"""--error-description=\
Do not use sys.executable to detect if running within deploy/multipy, use torch._running_with_deploy().
""",
'--',
'@{{PATHSFILE}}'
]
[[linter]]
code = 'CMAKE'
include_patterns = [
"**/*.cmake",
"**/*.cmake.in",
"**/CMakeLists.txt",
]
exclude_patterns = [
'cmake/Modules/**',
'cmake/Modules_CUDA_fix/**',
'cmake/Caffe2Config.cmake.in',
'aten/src/ATen/ATenConfig.cmake.in',
'cmake/TorchConfig.cmake.in',
'cmake/TorchConfigVersion.cmake.in',
'cmake/cmake_uninstall.cmake.i',
'fb/**',
'**/fb/**',
]
command = [
'python3',
'tools/linter/adapters/cmake_linter.py',
'--config=.cmakelintrc',
'--',
'@{{PATHSFILE}}',
]
init_command = [
'python3',
'tools/linter/adapters/pip_init.py',
'--dry-run={{DRYRUN}}',
'cmakelint==1.4.1',
]
[[linter]]
code = 'SHELLCHECK'
include_patterns = [
'.ci/pytorch/**/*.sh'
]
exclude_patterns = [
'**/fb/**',
]
command = [
'python3',
'tools/linter/adapters/shellcheck_linter.py',
'--',
'@{{PATHSFILE}}',
]
init_command = [
'python3',
'tools/linter/adapters/pip_init.py',
'--dry-run={{DRYRUN}}',
'shellcheck-py==0.7.2.1',
]
[[linter]]
code = 'ACTIONLINT'
include_patterns = [
'.github/workflows/*.yml',
'.github/workflows/*.yaml',
# actionlint does not support composite actions yet
# '.github/actions/**/*.yml',
# '.github/actions/**/*.yaml',
]
exclude_patterns = [
'**/fb/**',
]
command = [
'python3',
'tools/linter/adapters/actionlint_linter.py',
'--binary=.lintbin/actionlint',
'--',
'@{{PATHSFILE}}',
]
init_command = [
'python3',
'tools/linter/adapters/s3_init.py',
'--config-json=tools/linter/adapters/s3_init_config.json',
'--linter=actionlint',
'--dry-run={{DRYRUN}}',
'--output-dir=.lintbin',
'--output-name=actionlint',
]
[[linter]]
code = 'TESTOWNERS'
include_patterns = [
'test/**/test_*.py',
'test/**/*_test.py',
]
exclude_patterns = [
'test/run_test.py',
'**/fb/**',
]
command = [
'python3',
'tools/linter/adapters/testowners_linter.py',
'--',
'@{{PATHSFILE}}',
]
[[linter]]
code = 'TEST_HAS_MAIN'
include_patterns = [
'test/**/test_*.py',
]
exclude_patterns = [
'test/run_test.py',
'**/fb/**',
'test/quantization/**', # should be run through test/test_quantization.py
'test/jit/**', # should be run through test/test_jit.py
'test/ao/sparsity/**', # should be run through test/test_ao_sparsity.py
'test/fx/**', # should be run through test/test_fx.py
'test/bottleneck_test/**', # excluded by test/run_test.py
'test/package/**', # excluded by test/run_test.py
'test/distributed/argparse_util_test.py',
'test/distributed/bin/test_script.py',
'test/distributed/elastic/agent/server/test/local_elastic_agent_test.py',
'test/distributed/elastic/multiprocessing/bin/test_script.py',
'test/distributed/elastic/multiprocessing/bin/zombie_test.py',
'test/distributed/elastic/multiprocessing/errors/api_test.py',
'test/distributed/elastic/multiprocessing/errors/error_handler_test.py',
'test/distributed/elastic/multiprocessing/redirects_test.py',
'test/distributed/elastic/multiprocessing/tail_log_test.py',
'test/distributed/elastic/rendezvous/api_test.py',
'test/distributed/elastic/rendezvous/c10d_rendezvous_backend_test.py',
'test/distributed/elastic/rendezvous/dynamic_rendezvous_test.py',
'test/distributed/elastic/rendezvous/etcd_rendezvous_backend_test.py',
'test/distributed/elastic/rendezvous/etcd_rendezvous_test.py',
'test/distributed/elastic/rendezvous/etcd_server_test.py',
'test/distributed/elastic/rendezvous/rendezvous_backend_test.py',
'test/distributed/elastic/rendezvous/static_rendezvous_test.py',
'test/distributed/elastic/rendezvous/utils_test.py',
'test/distributed/elastic/timer/api_test.py',
'test/distributed/elastic/utils/data/cycling_iterator_test.py',
'test/distributed/launcher/api_test.py',
'test/distributed/launcher/bin/test_script.py',
'test/distributed/launcher/bin/test_script_init_method.py',
'test/distributed/launcher/bin/test_script_is_torchelastic_launched.py',
'test/distributed/launcher/bin/test_script_local_rank.py',
'test/distributed/launcher/launch_test.py',
'test/distributed/launcher/run_test.py',
'test/distributed/optim/test_apply_optimizer_in_backward.py',
'test/distributed/optim/test_named_optimizer.py',
'test/distributed/test_c10d_spawn.py',
'test/distributed/test_collective_utils.py',
'test/distributions/test_distributions.py',
'test/inductor/test_aot_inductor_utils.py',
'test/lazy/test_bindings.py',
'test/lazy/test_extract_compiled_graph.py',
'test/lazy/test_meta_kernel.py',
'test/nn/test_init.py',
'test/onnx/model_defs/op_test.py',
'test/onnx/test_models_quantized_onnxruntime.py',
'test/onnx/test_onnxscript_no_runtime.py',
'test/onnx_caffe2/test_caffe2_common.py',
'test/optim/test_lrscheduler.py',
'test/optim/test_optim.py',
'test/optim/test_swa_utils.py',
'test/run_test.py',
'test/test_bundled_images.py',
'test/test_cuda_expandable_segments.py',
'test/test_hub.py',
]
command = [
'python3',
'tools/linter/adapters/test_has_main_linter.py',
'--',
'@{{PATHSFILE}}',
]
[[linter]]
code = 'CALL_ONCE'
include_patterns = [
'c10/**',
'aten/**',
'torch/csrc/**',
]
exclude_patterns = [
'c10/util/CallOnce.h',
'**/fb/**',
]
command = [
'python3',
'tools/linter/adapters/grep_linter.py',
'--pattern=std::call_once',
'--linter-name=CALL_ONCE',
'--error-name=invalid call_once',
'--replace-pattern=s/std::call_once/c10::call_once/',
"""--error-description=\
Use of std::call_once is forbidden and should be replaced with c10::call_once\
""",
'--',
'@{{PATHSFILE}}'
]
[[linter]]
code = 'ONCE_FLAG'
include_patterns = [
'c10/**',
'aten/**',
'torch/csrc/**',
]
exclude_patterns = [
'**/fb/**',
]
command = [
'python3',
'tools/linter/adapters/grep_linter.py',
'--pattern=std::once_flag',
'--linter-name=ONCE_FLAG',
'--error-name=invalid once_flag',
'--replace-pattern=s/std::once_flag/c10::once_flag/',
"""--error-description=\
Use of std::once_flag is forbidden and should be replaced with c10::once_flag\
""",
'--',
'@{{PATHSFILE}}'
]
[[linter]]
code = 'WORKFLOWSYNC'
include_patterns = [
'.github/workflows/pull.yml',
'.github/workflows/trunk.yml',
'.github/workflows/periodic.yml',
'.github/workflows/mac-mps.yml',
'.github/workflows/slow.yml',
]
command = [
'python3',
'tools/linter/adapters/workflow_consistency_linter.py',
'--',
'@{{PATHSFILE}}'
]
init_command = [
'python3',
'tools/linter/adapters/pip_init.py',
'--dry-run={{DRYRUN}}',
'PyYAML==6.0',
]
# Black + usort
[[linter]]
code = 'UFMT'
include_patterns = [
'**/*.py',
'**/*.pyi',
]
command = [
'python3',
'tools/linter/adapters/ufmt_linter.py',
'--',
'@{{PATHSFILE}}'
]
exclude_patterns = [
'tools/gen_vulkan_spv.py',
'torch/__init__.py', # Skip this file to format because it's part of the public API
# We don't care too much about files in this directory, don't enforce
# formatting on them
'caffe2/**/*.py',
'caffe2/**/*.pyi',
'fb/**',
'**/fb/**',
'third_party/**/*.py',
'third_party/**/*.pyi',
'torch/_inductor/fx_passes/serialized_patterns/**',
# These files are all grandfathered in, feel free to remove from this list
# as necessary
'test/_nvfuser/__init__.py',
'test/_nvfuser/test_dynamo.py',
'test/_nvfuser/test_python_frontend.py',
'test/_nvfuser/test_torchscript.py',
'test/_test_bazel.py',
'test/ao/sparsity/test_activation_sparsifier.py',
'test/ao/sparsity/test_composability.py',
'test/ao/sparsity/test_data_scheduler.py',
'test/ao/sparsity/test_data_sparsifier.py',
'test/ao/sparsity/test_kernels.py',
'test/ao/sparsity/test_parametrization.py',
'test/ao/sparsity/test_qlinear_packed_params.py',
'test/ao/sparsity/test_scheduler.py',
'test/ao/sparsity/test_sparsifier.py',
'test/ao/sparsity/test_sparsity_utils.py',
'test/ao/sparsity/test_structured_sparsifier.py',
'test/autograd/test_complex.py',
'test/autograd/test_fallback.py',
'test/autograd/test_functional.py',
'test/backends/xeon/test_launch.py',
'test/benchmark_utils/test_benchmark_utils.py',
'test/bottleneck_test/test.py',
'test/bottleneck_test/test_args.py',
'test/bottleneck_test/test_cuda.py',
'test/conftest.py',
'test/cpp/__init__.py',
'test/cpp/aot_inductor/test.py',
'test/cpp/api/init_baseline.py',
'test/cpp/api/optim_baseline.py',
'test/cpp/jit/__init__.py',
'test/cpp/jit/tests_setup.py',
'test/cpp_api_parity/__init__.py',
'test/cpp_api_parity/functional_impl_check.py',
'test/cpp_api_parity/module_impl_check.py',
'test/cpp_api_parity/parity_table_parser.py',
'test/cpp_api_parity/sample_functional.py',
'test/cpp_api_parity/sample_module.py',
'test/cpp_api_parity/utils.py',
'test/cpp_extensions/no_python_abi_suffix_test/setup.py',
'test/cpp_extensions/setup.py',
'test/cpp_extensions/torch_test_cpp_extension/__init__.py',
'test/create_dummy_torchscript_model.py',
'test/custom_backend/backend.py',
'test/custom_backend/test_custom_backend.py',
'test/custom_operator/model.py',
'test/custom_operator/test_custom_ops.py',
'test/delete.py',
'test/distributed/_shard/sharded_optim/test_sharded_optim.py',
'test/distributed/_shard/sharded_tensor/ops/test_binary_cmp.py',
'test/distributed/_shard/sharded_tensor/ops/test_embedding.py',
'test/distributed/_shard/sharded_tensor/ops/test_embedding_bag.py',
'test/distributed/_shard/sharded_tensor/ops/test_init.py',
'test/distributed/_shard/sharded_tensor/ops/test_tensor_ops.py',
'test/distributed/_shard/sharded_tensor/test_logger.py',
'test/distributed/_shard/sharded_tensor/test_sharded_tensor.py',
'test/distributed/_shard/sharded_tensor/test_sharded_tensor_reshard.py',
'test/distributed/_shard/sharding_plan/test_sharding_plan.py',
'test/distributed/_shard/sharding_spec/test_sharding_spec.py',
'test/distributed/_shard/test_sharder.py',
'test/distributed/_tools/test_memory_tracker.py',
'test/distributed/algorithms/ddp_comm_hooks/test_ddp_hooks.py',
'test/distributed/algorithms/quantization/test_quantization.py',
'test/distributed/algorithms/test_join.py',
'test/distributed/argparse_util_test.py',
'test/distributed/bin/test_script.py',
'test/distributed/elastic/agent/server/test/__init__.py',
'test/distributed/elastic/agent/server/test/api_test.py',
'test/distributed/elastic/agent/server/test/local_elastic_agent_test.py',
'test/distributed/elastic/events/lib_test.py',
'test/distributed/elastic/metrics/__init__.py',
'test/distributed/elastic/metrics/api_test.py',
'test/distributed/elastic/multiprocessing/api_test.py',
'test/distributed/elastic/multiprocessing/bin/echo1.py',
'test/distributed/elastic/multiprocessing/bin/echo2.py',
'test/distributed/elastic/multiprocessing/bin/echo3.py',
'test/distributed/elastic/multiprocessing/bin/test_script.py',
'test/distributed/elastic/multiprocessing/bin/zombie_test.py',
'test/distributed/elastic/multiprocessing/errors/api_test.py',
'test/distributed/elastic/multiprocessing/errors/error_handler_test.py',
'test/distributed/elastic/multiprocessing/redirects_test.py',
'test/distributed/elastic/multiprocessing/tail_log_test.py',
'test/distributed/elastic/rendezvous/__init__.py',
'test/distributed/elastic/rendezvous/api_test.py',
'test/distributed/elastic/rendezvous/c10d_rendezvous_backend_test.py',
'test/distributed/elastic/rendezvous/dynamic_rendezvous_test.py',
'test/distributed/elastic/rendezvous/etcd_rendezvous_backend_test.py',
'test/distributed/elastic/rendezvous/etcd_rendezvous_test.py',
'test/distributed/elastic/rendezvous/etcd_server_test.py',
'test/distributed/elastic/rendezvous/rendezvous_backend_test.py',
'test/distributed/elastic/rendezvous/static_rendezvous_test.py',
'test/distributed/elastic/rendezvous/utils_test.py',
'test/distributed/elastic/timer/__init__.py',
'test/distributed/elastic/timer/api_test.py',
'test/distributed/elastic/timer/file_based_local_timer_test.py',
'test/distributed/elastic/timer/local_timer_example.py',
'test/distributed/elastic/timer/local_timer_test.py',
'test/distributed/elastic/utils/__init__.py',
'test/distributed/elastic/utils/data/__init__.py',
'test/distributed/elastic/utils/data/cycling_iterator_test.py',
'test/distributed/elastic/utils/distributed_test.py',
'test/distributed/elastic/utils/logging_test.py',
'test/distributed/elastic/utils/util_test.py',
'test/distributed/launcher/__init__.py',
'test/distributed/launcher/api_test.py',
'test/distributed/launcher/bin/test_script.py',
'test/distributed/launcher/bin/test_script_init_method.py',
'test/distributed/launcher/bin/test_script_is_torchelastic_launched.py',
'test/distributed/launcher/bin/test_script_local_rank.py',
'test/distributed/launcher/launch_test.py',
'test/distributed/launcher/run_test.py',
'test/distributed/nn/jit/__init__.py',
'test/distributed/nn/jit/test_instantiator.py',
'test/distributed/optim/test_apply_optimizer_in_backward.py',
'test/distributed/optim/test_named_optimizer.py',
'test/distributed/optim/test_zero_redundancy_optimizer.py',
'test/distributed/pipeline/sync/__init__.py',
'test/distributed/pipeline/sync/conftest.py',
'test/distributed/pipeline/sync/skip/__init__.py',
'test/distributed/pipeline/sync/skip/test_api.py',
'test/distributed/pipeline/sync/skip/test_gpipe.py',
'test/distributed/pipeline/sync/skip/test_inspect_skip_layout.py',
'test/distributed/pipeline/sync/skip/test_leak.py',
'test/distributed/pipeline/sync/skip/test_portal.py',
'test/distributed/pipeline/sync/skip/test_stash_pop.py',
'test/distributed/pipeline/sync/skip/test_tracker.py',
'test/distributed/pipeline/sync/skip/test_verify_skippables.py',
'test/distributed/pipeline/sync/test_balance.py',
'test/distributed/pipeline/sync/test_bugs.py',
'test/distributed/pipeline/sync/test_checkpoint.py',
'test/distributed/pipeline/sync/test_copy.py',
'test/distributed/pipeline/sync/test_deferred_batch_norm.py',
'test/distributed/pipeline/sync/test_dependency.py',
'test/distributed/pipeline/sync/test_inplace.py',
'test/distributed/pipeline/sync/test_microbatch.py',
'test/distributed/pipeline/sync/test_phony.py',
'test/distributed/pipeline/sync/test_pipe.py',
'test/distributed/pipeline/sync/test_pipeline.py',
'test/distributed/pipeline/sync/test_stream.py',
'test/distributed/pipeline/sync/test_transparency.py',
'test/distributed/pipeline/sync/test_worker.py',
'test/distributed/rpc/cuda/test_tensorpipe_agent.py',
'test/distributed/rpc/test_faulty_agent.py',
'test/distributed/rpc/test_share_memory.py',
'test/distributed/rpc/test_tensorpipe_agent.py',
'test/distributed/tensor/parallel/__init__.py',
'test/distributed/tensor/parallel/test_ddp_2d_parallel.py',
'test/distributed/tensor/parallel/test_fsdp_2d_parallel.py',
'test/distributed/tensor/parallel/test_parallelize_api.py',
'test/distributed/tensor/parallel/test_tp_examples.py',
'test/distributed/tensor/parallel/test_tp_random_state.py',
'test/distributed/tensor/parallel/test_tp_style.py',
'test/distributed/tensor/parallel/test_view_sharding_dim_change.py',
'test/distributed/test_c10d_common.py',
'test/distributed/test_c10d_gloo.py',
'test/distributed/test_c10d_logger.py',
'test/distributed/test_c10d_nccl.py',
'test/distributed/test_c10d_object_collectives.py',
'test/distributed/test_c10d_pypg.py',
'test/distributed/test_c10d_spawn.py',
'test/distributed/test_c10d_spawn_gloo.py',
'test/distributed/test_c10d_spawn_nccl.py',
'test/distributed/test_c10d_spawn_ucc.py',
'test/distributed/test_c10d_ucc.py',
'test/distributed/test_collective_utils.py',
'test/distributed/test_data_parallel.py',
'test/distributed/test_distributed_spawn.py',
'test/distributed/test_dynamo_distributed.py',
'test/distributed/test_fake_pg.py',
'test/distributed/test_functional_api.py',
'test/distributed/test_inductor_collectives.py',
'test/distributed/test_launcher.py',
'test/distributed/test_multi_threaded_pg.py',
'test/distributed/test_nccl.py',
'test/distributed/test_pg_wrapper.py',
'test/distributed/test_store.py',
'test/distributions/test_constraints.py',
'test/distributions/test_distributions.py',
'test/distributions/test_transforms.py',
'test/distributions/test_utils.py',
'test/error_messages/storage.py',
'test/expect/__init__.py',
'test/export/test_db.py',
'test/export/test_export.py',
'test/export/test_funtionalized_assertions.py',
'test/export/test_pass_infra.py',
'test/export/test_passes.py',
'test/export/test_serialize.py',
'test/export/test_upgrade.py',
'test/export/test_verifier.py',
'test/export/test_unflatten.py',
'test/forward_backward_compatibility/check_forward_backward_compatibility.py',
'test/forward_backward_compatibility/dump_all_function_schemas.py',
'test/functorch/attn_ft.py',
'test/functorch/attn_positional.py',
'test/functorch/common_utils.py',
'test/functorch/discover_coverage.py',
'test/functorch/functorch_additional_op_db.py',
'test/functorch/test_aotdispatch.py',
'test/functorch/test_control_flow.py',
'test/functorch/test_dims.py',
'test/functorch/test_eager_transforms.py',
'test/functorch/test_logging.py',
'test/functorch/test_memory_efficient_fusion.py',
'test/functorch/test_minifier.py',
'test/functorch/test_ops.py',
'test/functorch/test_parsing.py',
'test/functorch/test_rearrange.py',
'test/functorch/test_vmap.py',
'test/functorch/test_vmap_registrations.py',
'test/functorch/xfail_suggester.py',
'test/fx/named_tup.py',
'test/fx/quantization.py',
'test/fx/test_common_passes.py',
'test/fx/test_cse_pass.py',
'test/fx/test_dce_pass.py',
'test/fx/test_future.py',
'test/fx/test_fx_const_fold.py',
'test/fx/test_fx_param_shape_control_flow.py',
'test/fx/test_gradual_type.py',
'test/fx/test_matcher_utils.py',
'test/fx/test_pass_infra.py',
'test/fx/test_source_matcher_utils.py',
'test/fx/test_subgraph_rewriter.py',
'test/fx/test_z3_gradual_types.py',
'test/fx/test_fx_split.py',
'test/jit/__init__.py',
'test/jit/_imported_class_test/__init__.py',
'test/jit/_imported_class_test/bar.py',
'test/jit/_imported_class_test/foo.py',
'test/jit/_imported_class_test/very/__init__.py',
'test/jit/_imported_class_test/very/very/__init__.py',
'test/jit/_imported_class_test/very/very/nested.py',
'test/jit/fixtures_srcs/__init__.py',
'test/jit/fixtures_srcs/fixtures_src.py',
'test/jit/fixtures_srcs/generate_models.py',
'test/jit/fixtures_srcs/test_upgrader_models_generation.py',
'test/jit/myexception.py',
'test/jit/test_alias_analysis.py',
'test/jit/test_async.py',
'test/jit/test_aten_pow.py',
'test/jit/test_attr.py',
'test/jit/test_autodiff.py',
'test/jit/test_autodiff_subgraph_slicing.py',
'test/jit/test_await.py',
'test/jit/test_backend_nnapi.py',
'test/jit/test_backends.py',
'test/jit/test_batch_mm.py',
'test/jit/test_builtins.py',
'test/jit/test_class_type.py',
'test/jit/test_complex.py',
'test/jit/test_complexity.py',
'test/jit/test_convert_activation.py',
'test/jit/test_cuda.py',
'test/jit/test_custom_operators.py',
'test/jit/test_data_parallel.py',
'test/jit/test_dataclasses.py',
'test/jit/test_dce.py',
'test/jit/test_device_analysis.py',
'test/jit/test_dtype_analysis.py',
'test/jit/test_enum.py',
'test/jit/test_exception.py',
'test/jit/test_freezing.py',
'test/jit/test_functional_blocks.py',
'test/jit/test_fuser_common.py',
'test/jit/test_graph_rewrite_passes.py',
'test/jit/test_hash.py',
'test/jit/test_hooks.py',
'test/jit/test_hooks_modules.py',
'test/jit/test_ignorable_args.py',
'test/jit/test_ignore_context_manager.py',
'test/jit/test_isinstance.py',
'test/jit/test_jit_utils.py',
'test/jit/test_list_dict.py',
'test/jit/test_logging.py',
'test/jit/test_misc.py',
'test/jit/test_models.py',
'test/jit/test_module_apis.py',
'test/jit/test_module_containers.py',
'test/jit/test_module_interface.py',
'test/jit/test_modules.py',
'test/jit/test_op_decompositions.py',
'test/jit/test_optimize_for_mobile_preserve_debug_info.py',
'test/jit/test_parametrization.py',
'test/jit/test_pdt.py',
'test/jit/test_peephole.py',
'test/jit/test_profiler.py',
'test/jit/test_python_bindings.py',
'test/jit/test_python_builtins.py',
'test/jit/test_python_ir.py',
'test/jit/test_recursive_script.py',
'test/jit/test_remove_mutation.py',
'test/jit/test_save_load.py',
'test/jit/test_save_load_for_op_version.py',
'test/jit/test_script_profile.py',
'test/jit/test_scriptmod_ann.py',
'test/jit/test_slice.py',
'test/jit/test_sparse.py',
'test/jit/test_string_formatting.py',
'test/jit/test_symbolic_shape_analysis.py',
'test/jit/test_tensor_creation_ops.py',
'test/jit/test_tensor_methods.py',
'test/jit/test_torchbind.py',
'test/jit/test_tracer.py',
'test/jit/test_type_sharing.py',
'test/jit/test_types.py',
'test/jit/test_typing.py',
'test/jit/test_union.py',
'test/jit/test_unsupported_ops.py',
'test/jit/test_upgraders.py',
'test/jit/test_warn.py',
'test/jit/test_with.py',
'test/jit/xnnpack/test_xnnpack_delegate.py',
'test/jit_hooks/model.py',
'test/lazy/__init__.py',
'test/lazy/test_bindings.py',
'test/lazy/test_debug_util.py',
'test/lazy/test_extract_compiled_graph.py',
'test/lazy/test_meta_kernel.py',
'test/lazy/test_reuse_ir.py',
'test/lazy/test_step_closures.py',
'test/lazy/test_ts_opinfo.py',
'test/linear.py',
'test/load_torchscript_model.py',
'test/mkl_verbose.py',
'test/mkldnn_verbose.py',
'test/mobile/custom_build/prepare_model.py',
'test/mobile/lightweight_dispatch/tests_setup.py',
'test/mobile/model_test/android_api_module.py',
'test/mobile/model_test/builtin_ops.py',
'test/mobile/model_test/gen_test_model.py',
'test/mobile/model_test/math_ops.py',
'test/mobile/model_test/nn_ops.py',
'test/mobile/model_test/quantization_ops.py',
'test/mobile/model_test/sampling_ops.py',
'test/mobile/model_test/tensor_ops.py',
'test/mobile/model_test/torchvision_models.py',
'test/mobile/model_test/update_production_ops.py',
'test/mobile/nnc/aot_test_model.py',
'test/mobile/test_bytecode.py',
'test/mobile/test_lite_script_module.py',
'test/mobile/test_lite_script_type.py',
'test/mobile/test_quantize_fx_lite_script_module.py',
'test/mobile/test_upgrader_codegen.py',
'test/mobile/test_upgraders.py',
'test/nn/test_convolution.py',
'test/nn/test_dropout.py',
'test/nn/test_embedding.py',
'test/nn/test_init.py',
'test/nn/test_lazy_modules.py',
'test/nn/test_module_hooks.py',
'test/nn/test_multihead_attention.py',
'test/nn/test_packed_sequence.py',
'test/nn/test_parametrization.py',
'test/nn/test_pooling.py',
'test/nn/test_pruning.py',
'test/onnx_caffe2/export_onnx_tests_filter.py',
'test/onnx_caffe2/export_onnx_tests_generator.py',
'test/onnx_caffe2/test_caffe2_common.py',
'test/onnx_caffe2/test_custom_ops.py',
'test/onnx_caffe2/test_pytorch_helper.py',
'test/onnx_caffe2/test_pytorch_onnx_caffe2.py',
'test/onnx_caffe2/test_pytorch_onnx_caffe2_quantized.py',
'test/onnx_caffe2/test_verify.py',
'test/optim/test_lrscheduler.py',
'test/optim/test_optim.py',
'test/optim/test_swa_utils.py',
'test/package/__init__.py',
'test/package/common.py',
'test/package/generate_bc_packages.py',
'test/package/module_a.py',
'test/package/module_a_remapped_path.py',
'test/package/package_a/__init__.py',
'test/package/package_a/fake_interface.py',
'test/package/package_a/fake_script_class.py',
'test/package/package_a/long_name.py',
'test/package/package_a/std_sys_module_hacks.py',
'test/package/package_a/subpackage.py',
'test/package/package_a/test_all_leaf_modules_tracer.py',
'test/package/package_a/test_module.py',
'test/package/package_a/test_nn_module.py',
'test/package/package_a/use_dunder_package.py',
'test/package/package_a/use_torch_package_importer.py',
'test/package/package_b/__init__.py',
'test/package/package_b/subpackage_0/__init__.py',
'test/package/package_b/subpackage_0/subsubpackage_0/__init__.py',
'test/package/package_b/subpackage_1.py',
'test/package/package_b/subpackage_2.py',
'test/package/package_c/__init__.py',
'test/package/package_c/test_module.py',
'test/package/package_d/__init__.py',
'test/package/package_d/imports_directly.py',
'test/package/package_d/imports_indirectly.py',
'test/package/package_d/subpackage_0/__init__.py',
'test/package/package_d/subpackage_0/subsubpackage_0/__init__.py',
'test/package/test_analyze.py',
'test/package/test_dependency_api.py',
'test/package/test_dependency_hooks.py',
'test/package/test_digraph.py',
'test/package/test_directory_reader.py',
'test/package/test_glob_group.py',
'test/package/test_importer.py',
'test/package/test_load_bc_packages.py',
'test/package/test_mangling.py',
'test/package/test_misc.py',
'test/package/test_model.py',
'test/package/test_package_fx.py',
'test/package/test_package_script.py',
'test/package/test_repackage.py',
'test/package/test_resources.py',
'test/package/test_save_load.py',
'test/package/test_trace_dep/__init__.py',
'test/profiler/test_memory_profiler.py',
'test/profiler/test_profiler.py',
'test/profiler/test_profiler_tree.py',
'test/quantization/__init__.py',
'test/quantization/ao_migration/__init__.py',
'test/quantization/ao_migration/common.py',
'test/quantization/ao_migration/test_ao_migration.py',
'test/quantization/ao_migration/test_quantization.py',
'test/quantization/ao_migration/test_quantization_fx.py',
'test/quantization/bc/__init__.py',
'test/quantization/bc/test_backward_compatibility.py',
'test/quantization/core/__init__.py',
'test/quantization/core/experimental/apot_fx_graph_mode_ptq.py',
'test/quantization/core/experimental/apot_fx_graph_mode_qat.py',
'test/quantization/core/experimental/quantization_util.py',
'test/quantization/core/experimental/test_bits.py',
'test/quantization/core/experimental/test_fake_quantize.py',
'test/quantization/core/experimental/test_linear.py',
'test/quantization/core/experimental/test_nonuniform_observer.py',
'test/quantization/core/experimental/test_quantized_tensor.py',
'test/quantization/core/experimental/test_quantizer.py',
'test/quantization/core/test_backend_config.py',
'test/quantization/core/test_docs.py',
'test/quantization/core/test_quantized_functional.py',
'test/quantization/core/test_quantized_module.py',
'test/quantization/core/test_quantized_op.py',
'test/quantization/core/test_quantized_tensor.py',
'test/quantization/core/test_top_level_apis.py',
'test/quantization/core/test_utils.py',
'test/quantization/core/test_workflow_module.py',
'test/quantization/core/test_workflow_ops.py',
'test/quantization/eager/__init__.py',
'test/quantization/eager/test_bias_correction_eager.py',
'test/quantization/eager/test_equalize_eager.py',
'test/quantization/eager/test_fuse_eager.py',
'test/quantization/eager/test_model_numerics.py',
'test/quantization/eager/test_numeric_suite_eager.py',
'test/quantization/eager/test_quantize_eager_ptq.py',
'test/quantization/eager/test_quantize_eager_qat.py',
'test/quantization/fx/__init__.py',
'test/quantization/fx/test_equalize_fx.py',
'test/quantization/fx/test_model_report_fx.py',
'test/quantization/fx/test_numeric_suite_fx.py',
'test/quantization/fx/test_quantize_fx.py',
'test/quantization/fx/test_subgraph_rewriter.py',
'test/quantization/jit/__init__.py',
'test/quantization/jit/test_deprecated_jit_quant.py',
'test/quantization/jit/test_fusion_passes.py',
'test/quantization/jit/test_ondevice_quantization.py',
'test/quantization/jit/test_quantize_jit.py',
'test/quantization/pt2e/test_graph_utils.py',
'test/quantization/pt2e/test_quantize_pt2e.py',
'test/quantization/pt2e/test_x86inductor_quantizer.py',
'test/scripts/cuda_memcheck_common.py',
'test/scripts/run_cuda_memcheck.py',
'test/simulate_nccl_errors.py',
'test/test_ao_sparsity.py',
'test/test_autocast.py',
'test/test_autograd.py',
'test/test_binary_ufuncs.py',
'test/test_bundled_images.py',
'test/test_bundled_inputs.py',
'test/test_comparison_utils.py',
'test/test_compile_benchmark_util.py',
'test/test_complex.py',
'test/test_cpp_api_parity.py',
'test/test_cpp_extensions_aot.py',
'test/test_cpp_extensions_jit.py',
'test/test_cpp_extensions_open_device_registration.py',
'test/test_cuda.py',
'test/test_cuda_expandable_segments.py',
'test/test_cuda_multigpu.py',
'test/test_cuda_nvml_based_avail.py',
'test/test_cuda_primary_ctx.py',
'test/test_cuda_sanitizer.py',
'test/test_cuda_trace.py',
'test/test_custom_op_testing.py',
'test/test_dataloader.py',
'test/test_datapipe.py',
'test/test_decomp.py',
'test/test_deploy.py',
'test/test_determination.py',
'test/test_dispatch.py',
'test/test_dlpack.py',
'test/test_dynamic_shapes.py',
'test/test_expanded_weights.py',
'test/test_fake_tensor.py',
'test/test_flop_counter.py',
'test/test_foreach.py',
'test/test_function_schema.py',
'test/test_functional_autograd_benchmark.py',
'test/test_functional_optim.py',
'test/test_functionalization.py',
'test/test_functionalization_of_rng_ops.py',
'test/test_futures.py',
'test/test_fx.py',
'test/test_fx_experimental.py',
'test/test_fx_passes.py',
'test/test_fx_reinplace_pass.py',
'test/test_hub.py',
'test/test_import_stats.py',
'test/test_indexing.py',
'test/test_itt.py',
'test/test_jit.py',
'test/test_jit_autocast.py',
'test/test_jit_cuda_fuser.py',
'test/test_jit_disabled.py',
'test/test_jit_fuser.py',
'test/test_jit_fuser_legacy.py',
'test/test_jit_fuser_te.py',
'test/test_jit_legacy.py',
'test/test_jit_llga_fuser.py',
'test/test_jit_profiling.py',
'test/test_jit_simple.py',
'test/test_jit_string.py',
'test/test_jiterator.py',
'test/test_kernel_launch_checks.py',
'test/test_legacy_vmap.py',
'test/test_license.py',
'test/test_linalg.py',
'test/test_logging.py',
'test/test_masked.py',
'test/test_maskedtensor.py',
'test/test_matmul_cuda.py',
'test/test_meta.py',
'test/test_metal.py',
'test/test_mkl_verbose.py',
'test/test_mkldnn.py',
'test/test_mkldnn_fusion.py',
'test/test_mkldnn_verbose.py',
'test/test_mobile_optimizer.py',
'test/test_model_dump.py',
'test/test_module_init.py',
'test/test_modules.py',
'test/test_monitor.py',
'test/test_mps.py',
'test/test_multiprocessing.py',
'test/test_multiprocessing_spawn.py',
'test/test_namedtensor.py',
'test/test_namedtuple_return_api.py',
'test/test_native_functions.py',
'test/test_native_mha.py',
'test/test_nestedtensor.py',
'test/test_nn.py',
'test/test_nnapi.py',
'test/test_numba_integration.py',
'test/test_numpy_interop.py',
'test/test_nvfuser_dynamo.py',
'test/test_nvfuser_frontend.py',
'test/test_openmp.py',
'test/test_ops.py',
'test/test_ops_fwd_gradients.py',
'test/test_ops_gradients.py',
'test/test_ops_jit.py',
'test/test_optim.py',
'test/test_out_dtype_op.py',
'test/test_overrides.py',
'test/test_package.py',
'test/test_per_overload_api.py',
'test/test_prims.py',
'test/test_proxy_tensor.py',
'test/test_pruning_op.py',
'test/test_public_bindings.py',
'test/test_python_dispatch.py',
'test/test_quantization.py',
'test/test_reductions.py',
'test/test_scatter_gather_ops.py',
'test/test_schema_check.py',
'test/test_segment_reductions.py',
'test/test_serialization.py',
'test/test_set_default_mobile_cpu_allocator.py',
'test/test_shape_ops.py',
'test/test_show_pickle.py',
'test/test_sort_and_select.py',
'test/test_sparse.py',
'test/test_sparse_csr.py',
'test/test_sparse_semi_structured.py',
'test/test_spectral_ops.py',
'test/test_stateless.py',
'test/test_static_runtime.py',
'test/test_subclass.py',
'test/test_sympy_utils.py',
'test/test_tensor_creation_ops.py',
'test/test_tensorboard.py',
'test/test_tensorexpr.py',
'test/test_tensorexpr_pybind.py',
'test/test_testing.py',
'test/test_throughput_benchmark.py',
'test/test_torch.py',
'test/test_transformers.py',
'test/test_type_hints.py',
'test/test_type_info.py',
'test/test_type_promotion.py',
'test/test_unary_ufuncs.py',
'test/test_utils.py',
'test/test_view_ops.py',
'test/test_vulkan.py',
'test/test_xnnpack_integration.py',
'test/torch_np/numpy_test/**/*.py',
'test/typing/fail/bitwise_ops.py',
'test/typing/fail/creation_ops.py',
'test/typing/fail/random.py',
'test/typing/pass/creation_ops.py',
'test/typing/pass/math_ops.py',
'test/typing/reveal/module_list.py',
'test/typing/reveal/namedtuple.py',
'test/typing/reveal/opt_size.py',
'test/typing/reveal/size.py',
'test/typing/reveal/tensor_constructors.py',
'test/typing/reveal/tensor_copy.py',
'test/typing/reveal/tensor_sampling.py',
'test/typing/reveal/torch_optim.py',
'torch/_awaits/__init__.py',
'torch/_custom_op/__init__.py',
'torch/_custom_op/autograd.py',
'torch/_custom_op/functional.py',
'torch/_custom_op/impl.py',
'torch/_export/__init__.py',
'torch/_export/constraints.py',
'torch/_export/db/__init__.py',
'torch/_export/db/case.py',
'torch/_export/db/examples/__init__.py',
'torch/_export/db/examples/assume_constant_result.py',
'torch/_export/db/examples/autograd_function.py',
'torch/_export/db/examples/class_method.py',
'torch/_export/db/examples/cond_branch_class_method.py',
'torch/_export/db/examples/cond_branch_nested_function.py',
'torch/_export/db/examples/cond_branch_nonlocal_variables.py',
'torch/_export/db/examples/cond_closed_over_variable.py',
'torch/_export/db/examples/cond_operands.py',
'torch/_export/db/examples/cond_predicate.py',
'torch/_export/db/examples/decorator.py',
'torch/_export/db/examples/dictionary.py',
'torch/_export/db/examples/dynamic_shape_assert.py',
'torch/_export/db/examples/dynamic_shape_constructor.py',
'torch/_export/db/examples/dynamic_shape_if_guard.py',
'torch/_export/db/examples/dynamic_shape_map.py',
'torch/_export/db/examples/dynamic_shape_round.py',
'torch/_export/db/examples/dynamic_shape_slicing.py',
'torch/_export/db/examples/dynamic_shape_view.py',
'torch/_export/db/examples/fn_with_kwargs.py',
'torch/_export/db/examples/list_contains.py',
'torch/_export/db/examples/list_unpack.py',
'torch/_export/db/examples/nested_function.py',
'torch/_export/db/examples/null_context_manager.py',
'torch/_export/db/examples/pytree_flatten.py',
'torch/_export/db/examples/scalar_output.py',
'torch/_export/db/examples/specialized_attribute.py',
'torch/_export/db/examples/static_for_loop.py',
'torch/_export/db/examples/static_if.py',
'torch/_export/db/examples/tensor_setattr.py',
'torch/_export/db/examples/type_reflection_method.py',
'torch/_export/db/gen_example.py',
'torch/_export/db/logging.py',
'torch/_export/error.py',
'torch/_export/exported_program.py',
'torch/_export/pass_base.py',
'torch/_export/pass_infra/__init__.py',
'torch/_export/pass_infra/node_metadata.py',
'torch/_export/pass_infra/proxy_value.py',
'torch/_export/passes/__init__.py',
'torch/_export/passes/add_runtime_assertions_for_constraints_pass.py',
'torch/_export/passes/const_prop_pass.py',
'torch/_export/passes/functionalize_side_effectful_ops_pass.py',
'torch/_export/passes/replace_sym_size_ops_pass.py',
'torch/_export/passes/replace_view_ops_with_view_copy_ops_pass.py',
'torch/_export/serde/__init__.py',
'torch/_export/serde/schema.py',
'torch/_export/serde/serialize.py',
'torch/_export/serde/upgrade.py',
'torch/_export/trace.py',
'torch/_export/verifier.py',
'torch/_functorch/__init__.py',
'torch/_functorch/aot_autograd.py',
'torch/_functorch/apis.py',
'torch/_functorch/autograd_function.py',
'torch/_functorch/batch_norm_replacement.py',
'torch/_functorch/benchmark_utils.py',
'torch/_functorch/compile_utils.py',
'torch/_functorch/compilers.py',
'torch/_functorch/config.py',
'torch/_functorch/deprecated.py',
'torch/_functorch/eager_transforms.py',
'torch/_functorch/fx_minifier.py',
'torch/_functorch/partitioners.py',
'torch/_functorch/pyfunctorch.py',
'torch/_functorch/python_key.py',
'torch/_functorch/top_operators_github_usage.py',
'torch/_functorch/utils.py',
'torch/_functorch/vmap.py',
'torch/_higher_order_ops/__init__.py',
'torch/_higher_order_ops/out_dtype.py',
'torch/_higher_order_ops/wrap.py',
'torch/_vendor/**',
'torch/ao/__init__.py',
'torch/ao/nn/__init__.py',
'torch/ao/nn/intrinsic/__init__.py',
'torch/ao/nn/intrinsic/modules/__init__.py',
'torch/ao/nn/intrinsic/modules/fused.py',
'torch/ao/nn/intrinsic/qat/__init__.py',
'torch/ao/nn/intrinsic/qat/modules/__init__.py',
'torch/ao/nn/intrinsic/qat/modules/conv_fused.py',
'torch/ao/nn/intrinsic/qat/modules/linear_fused.py',
'torch/ao/nn/intrinsic/qat/modules/linear_relu.py',
'torch/ao/nn/intrinsic/quantized/__init__.py',
'torch/ao/nn/intrinsic/quantized/dynamic/__init__.py',
'torch/ao/nn/intrinsic/quantized/dynamic/modules/__init__.py',
'torch/ao/nn/intrinsic/quantized/dynamic/modules/linear_relu.py',
'torch/ao/nn/intrinsic/quantized/modules/__init__.py',
'torch/ao/nn/intrinsic/quantized/modules/bn_relu.py',
'torch/ao/nn/intrinsic/quantized/modules/conv_add.py',
'torch/ao/nn/intrinsic/quantized/modules/conv_relu.py',
'torch/ao/nn/intrinsic/quantized/modules/linear_relu.py',
'torch/ao/nn/qat/__init__.py',
'torch/ao/nn/qat/dynamic/__init__.py',
'torch/ao/nn/qat/dynamic/modules/__init__.py',
'torch/ao/nn/qat/dynamic/modules/linear.py',
'torch/ao/nn/qat/modules/__init__.py',
'torch/ao/nn/qat/modules/conv.py',
'torch/ao/nn/qat/modules/embedding_ops.py',
'torch/ao/nn/qat/modules/linear.py',
'torch/ao/nn/quantizable/__init__.py',
'torch/ao/nn/quantizable/modules/__init__.py',
'torch/ao/nn/quantizable/modules/activation.py',
'torch/ao/nn/quantizable/modules/rnn.py',
'torch/ao/nn/quantized/__init__.py',
'torch/ao/nn/quantized/dynamic/__init__.py',
'torch/ao/nn/quantized/dynamic/modules/__init__.py',
'torch/ao/nn/quantized/dynamic/modules/conv.py',
'torch/ao/nn/quantized/dynamic/modules/linear.py',
'torch/ao/nn/quantized/dynamic/modules/rnn.py',
'torch/ao/nn/quantized/functional.py',
'torch/ao/nn/quantized/modules/__init__.py',
'torch/ao/nn/quantized/modules/activation.py',
'torch/ao/nn/quantized/modules/batchnorm.py',
'torch/ao/nn/quantized/modules/conv.py',
'torch/ao/nn/quantized/modules/dropout.py',
'torch/ao/nn/quantized/modules/embedding_ops.py',
'torch/ao/nn/quantized/modules/functional_modules.py',
'torch/ao/nn/quantized/modules/linear.py',
'torch/ao/nn/quantized/modules/normalization.py',
'torch/ao/nn/quantized/modules/rnn.py',
'torch/ao/nn/quantized/modules/utils.py',
'torch/ao/nn/quantized/reference/__init__.py',
'torch/ao/nn/quantized/reference/modules/__init__.py',
'torch/ao/nn/quantized/reference/modules/conv.py',
'torch/ao/nn/quantized/reference/modules/linear.py',
'torch/ao/nn/quantized/reference/modules/rnn.py',
'torch/ao/nn/quantized/reference/modules/sparse.py',
'torch/ao/nn/quantized/reference/modules/utils.py',
'torch/ao/nn/sparse/__init__.py',
'torch/ao/nn/sparse/quantized/__init__.py',
'torch/ao/nn/sparse/quantized/dynamic/__init__.py',
'torch/ao/nn/sparse/quantized/dynamic/linear.py',
'torch/ao/nn/sparse/quantized/linear.py',
'torch/ao/nn/sparse/quantized/utils.py',
'torch/ao/ns/__init__.py',
'torch/ao/ns/_numeric_suite.py',
'torch/ao/ns/_numeric_suite_fx.py',
'torch/ao/ns/fx/__init__.py',
'torch/ao/ns/fx/graph_matcher.py',
'torch/ao/ns/fx/graph_passes.py',
'torch/ao/ns/fx/mappings.py',
'torch/ao/ns/fx/n_shadows_utils.py',
'torch/ao/ns/fx/ns_types.py',
'torch/ao/ns/fx/pattern_utils.py',
'torch/ao/ns/fx/qconfig_multi_mapping.py',
'torch/ao/ns/fx/utils.py',
'torch/ao/ns/fx/weight_utils.py',
'torch/ao/pruning/__init__.py',
'torch/ao/pruning/_experimental/__init__.py',
'torch/ao/pruning/_experimental/activation_sparsifier/__init__.py',
'torch/ao/pruning/_experimental/activation_sparsifier/activation_sparsifier.py',
'torch/ao/pruning/_experimental/data_scheduler/__init__.py',
'torch/ao/pruning/_experimental/data_scheduler/base_data_scheduler.py',
'torch/ao/pruning/_experimental/data_sparsifier/__init__.py',
'torch/ao/pruning/_experimental/data_sparsifier/base_data_sparsifier.py',
'torch/ao/pruning/_experimental/data_sparsifier/benchmarks/dlrm_utils.py',
'torch/ao/pruning/_experimental/data_sparsifier/benchmarks/evaluate_disk_savings.py',
'torch/ao/pruning/_experimental/data_sparsifier/benchmarks/evaluate_forward_time.py',
'torch/ao/pruning/_experimental/data_sparsifier/benchmarks/evaluate_model_metrics.py',
'torch/ao/pruning/_experimental/data_sparsifier/data_norm_sparsifier.py',
'torch/ao/pruning/_experimental/data_sparsifier/lightning/__init__.py',
'torch/ao/pruning/_experimental/data_sparsifier/lightning/callbacks/__init__.py',
'torch/ao/pruning/_experimental/data_sparsifier/lightning/callbacks/_data_sparstity_utils.py',
'torch/ao/pruning/_experimental/data_sparsifier/lightning/callbacks/data_sparsity.py',
'torch/ao/pruning/_experimental/data_sparsifier/lightning/tests/test_callbacks.py',
'torch/ao/pruning/_experimental/data_sparsifier/quantization_utils.py',
'torch/ao/pruning/_experimental/pruner/__init__.py',
'torch/ao/pruning/_experimental/pruner/base_structured_sparsifier.py',
'torch/ao/pruning/_experimental/pruner/lstm_saliency_pruner.py',
'torch/ao/pruning/_experimental/pruner/match_utils.py',
'torch/ao/pruning/_experimental/pruner/parametrization.py',
'torch/ao/pruning/_experimental/pruner/prune_functions.py',
'torch/ao/pruning/_experimental/pruner/saliency_pruner.py',
'torch/ao/pruning/_mappings.py',
'torch/ao/pruning/scheduler/__init__.py',
'torch/ao/pruning/scheduler/base_scheduler.py',
'torch/ao/pruning/scheduler/cubic_scheduler.py',
'torch/ao/pruning/scheduler/lambda_scheduler.py',
'torch/ao/pruning/sparsifier/__init__.py',
'torch/ao/pruning/sparsifier/base_sparsifier.py',
'torch/ao/pruning/sparsifier/nearly_diagonal_sparsifier.py',
'torch/ao/pruning/sparsifier/utils.py',
'torch/ao/pruning/sparsifier/weight_norm_sparsifier.py',
'torch/ao/quantization/__init__.py',
'torch/ao/quantization/_correct_bias.py',
'torch/ao/quantization/_equalize.py',
'torch/ao/quantization/_learnable_fake_quantize.py',
'torch/ao/quantization/backend_config/__init__.py',
'torch/ao/quantization/backend_config/_common_operator_config_utils.py',
'torch/ao/quantization/backend_config/_qnnpack_pt2e.py',
'torch/ao/quantization/backend_config/_x86_inductor_pt2e.py',
'torch/ao/quantization/backend_config/backend_config.py',
'torch/ao/quantization/backend_config/executorch.py',
'torch/ao/quantization/backend_config/fbgemm.py',
'torch/ao/quantization/backend_config/native.py',
'torch/ao/quantization/backend_config/observation_type.py',
'torch/ao/quantization/backend_config/onednn.py',
'torch/ao/quantization/backend_config/qnnpack.py',
'torch/ao/quantization/backend_config/tensorrt.py',
'torch/ao/quantization/backend_config/utils.py',
'torch/ao/quantization/backend_config/x86.py',
'torch/ao/quantization/experimental/APoT_tensor.py',
'torch/ao/quantization/experimental/apot_utils.py',
'torch/ao/quantization/experimental/fake_quantize.py',
'torch/ao/quantization/experimental/fake_quantize_function.py',
'torch/ao/quantization/experimental/linear.py',
'torch/ao/quantization/experimental/observer.py',
'torch/ao/quantization/experimental/qconfig.py',
'torch/ao/quantization/experimental/quantizer.py',
'torch/ao/quantization/fake_quantize.py',
'torch/ao/quantization/fuse_modules.py',
'torch/ao/quantization/fuser_method_mappings.py',
'torch/ao/quantization/fx/__init__.py',
'torch/ao/quantization/fx/_decomposed.py',
'torch/ao/quantization/fx/_equalize.py',
'torch/ao/quantization/fx/_lower_to_native_backend.py',
'torch/ao/quantization/fx/_model_report/__init__.py',
'torch/ao/quantization/fx/_model_report/detector.py',
'torch/ao/quantization/fx/_model_report/model_report.py',
'torch/ao/quantization/fx/_model_report/model_report_observer.py',
'torch/ao/quantization/fx/_model_report/model_report_visualizer.py',
'torch/ao/quantization/fx/convert.py',
'torch/ao/quantization/fx/custom_config.py',
'torch/ao/quantization/fx/fuse.py',
'torch/ao/quantization/fx/fuse_handler.py',
'torch/ao/quantization/fx/graph_module.py',
'torch/ao/quantization/fx/lower_to_fbgemm.py',
'torch/ao/quantization/fx/lower_to_qnnpack.py',
'torch/ao/quantization/fx/lstm_utils.py',
'torch/ao/quantization/fx/match_utils.py',
'torch/ao/quantization/fx/pattern_utils.py',
'torch/ao/quantization/fx/prepare.py',
'torch/ao/quantization/fx/qconfig_mapping_utils.py',
'torch/ao/quantization/fx/quantize_handler.py',
'torch/ao/quantization/fx/tracer.py',
'torch/ao/quantization/fx/utils.py',
'torch/ao/quantization/observer.py',
'torch/ao/quantization/pt2e/__init__.py',
'torch/ao/quantization/pt2e/_propagate_annotation.py',
'torch/ao/quantization/pt2e/graph_utils.py',
'torch/ao/quantization/pt2e/prepare.py',
'torch/ao/quantization/pt2e/qat_utils.py',
'torch/ao/quantization/pt2e/quantizer/__init__.py',
'torch/ao/quantization/pt2e/quantizer/composable_quantizer.py',
'torch/ao/quantization/pt2e/quantizer/embedding_quantizer.py',
'torch/ao/quantization/pt2e/quantizer/qnnpack_quantizer.py',
'torch/ao/quantization/pt2e/quantizer/quantizer.py',
'torch/ao/quantization/pt2e/quantizer/utils.py',
'torch/ao/quantization/pt2e/quantizer/x86_inductor_quantizer.py',
'torch/ao/quantization/pt2e/representation/__init__.py',
'torch/ao/quantization/pt2e/representation/rewrite.py',
'torch/ao/quantization/pt2e/utils.py',
'torch/ao/quantization/qconfig.py',
'torch/ao/quantization/qconfig_mapping.py',
'torch/ao/quantization/quant_type.py',
'torch/ao/quantization/quantization_mappings.py',
'torch/ao/quantization/quantize.py',
'torch/ao/quantization/quantize_fx.py',
'torch/ao/quantization/quantize_jit.py',
'torch/ao/quantization/quantize_pt2e.py',
'torch/ao/quantization/stubs.py',
'torch/ao/quantization/utils.py',
'torch/compiler/__init__.py',
'torch/contrib/__init__.py',
'torch/contrib/_tensorboard_vis.py',
'torch/cuda/_memory_viz.py', # mypy: Value of type "object" is not indexable
'torch/distributed/__init__.py',
'torch/distributed/_composable_state.py',
'torch/distributed/_shard/__init__.py',
'torch/distributed/_shard/_utils.py',
'torch/distributed/_shard/api.py',
'torch/distributed/_shard/checkpoint/__init__.py',
'torch/distributed/_shard/common_op_utils.py',
'torch/distributed/_shard/metadata.py',
'torch/distributed/_shard/op_registry_utils.py',
'torch/distributed/_shard/sharded_optim/__init__.py',
'torch/distributed/_shard/sharded_optim/api.py',
'torch/distributed/_shard/sharded_tensor/__init__.py',
'torch/distributed/_shard/sharded_tensor/_ops/__init__.py',
'torch/distributed/_shard/sharded_tensor/_ops/_common.py',
'torch/distributed/_shard/sharded_tensor/_ops/binary_cmp.py',
'torch/distributed/_shard/sharded_tensor/_ops/init.py',
'torch/distributed/_shard/sharded_tensor/_ops/misc_ops.py',
'torch/distributed/_shard/sharded_tensor/_ops/tensor_ops.py',
'torch/distributed/_shard/sharded_tensor/api.py',
'torch/distributed/_shard/sharded_tensor/logger.py',
'torch/distributed/_shard/sharded_tensor/logging_handlers.py',
'torch/distributed/_shard/sharded_tensor/metadata.py',
'torch/distributed/_shard/sharded_tensor/reshard.py',
'torch/distributed/_shard/sharded_tensor/shard.py',
'torch/distributed/_shard/sharded_tensor/utils.py',
'torch/distributed/_shard/sharder.py',
'torch/distributed/_shard/sharding_plan/__init__.py',
'torch/distributed/_shard/sharding_plan/api.py',
'torch/distributed/_shard/sharding_spec/__init__.py',
'torch/distributed/_shard/sharding_spec/_internals.py',
'torch/distributed/_shard/sharding_spec/api.py',
'torch/distributed/_shard/sharding_spec/chunk_sharding_spec.py',
'torch/distributed/_shard/sharding_spec/chunk_sharding_spec_ops/__init__.py',
'torch/distributed/_shard/sharding_spec/chunk_sharding_spec_ops/_common.py',
'torch/distributed/_shard/sharding_spec/chunk_sharding_spec_ops/embedding.py',
'torch/distributed/_shard/sharding_spec/chunk_sharding_spec_ops/embedding_bag.py',
'torch/distributed/_sharded_tensor/__init__.py',
'torch/distributed/_sharding_spec/__init__.py',
'torch/distributed/_tools/__init__.py',
'torch/distributed/_tools/memory_tracker.py',
'torch/distributed/algorithms/__init__.py',
'torch/distributed/algorithms/_checkpoint/__init__.py',
'torch/distributed/algorithms/_checkpoint/checkpoint_wrapper.py',
'torch/distributed/algorithms/_comm_hooks/__init__.py',
'torch/distributed/algorithms/_comm_hooks/default_hooks.py',
'torch/distributed/algorithms/_optimizer_overlap/__init__.py',
'torch/distributed/algorithms/_optimizer_overlap/optimizer_overlap.py',
'torch/distributed/algorithms/_quantization/__init__.py',
'torch/distributed/algorithms/_quantization/quantization.py',
'torch/distributed/algorithms/ddp_comm_hooks/__init__.py',
'torch/distributed/algorithms/ddp_comm_hooks/ddp_zero_hook.py',
'torch/distributed/algorithms/ddp_comm_hooks/debugging_hooks.py',
'torch/distributed/algorithms/ddp_comm_hooks/default_hooks.py',
'torch/distributed/algorithms/ddp_comm_hooks/mixed_precision_hooks.py',
'torch/distributed/algorithms/ddp_comm_hooks/optimizer_overlap_hooks.py',
'torch/distributed/algorithms/ddp_comm_hooks/post_localSGD_hook.py',
'torch/distributed/algorithms/ddp_comm_hooks/powerSGD_hook.py',
'torch/distributed/algorithms/ddp_comm_hooks/quantization_hooks.py',
'torch/distributed/algorithms/join.py',
'torch/distributed/algorithms/model_averaging/__init__.py',
'torch/distributed/algorithms/model_averaging/averagers.py',
'torch/distributed/algorithms/model_averaging/hierarchical_model_averager.py',
'torch/distributed/algorithms/model_averaging/utils.py',
'torch/distributed/argparse_util.py',
'torch/distributed/autograd/__init__.py',
'torch/distributed/benchmarks/benchmark_ddp_rpc.py',
'torch/distributed/c10d_logger.py',
'torch/distributed/collective_utils.py',
'torch/distributed/constants.py',
'torch/distributed/distributed_c10d.py',
'torch/distributed/elastic/__init__.py',
'torch/distributed/elastic/agent/__init__.py',
'torch/distributed/elastic/agent/server/__init__.py',
'torch/distributed/elastic/agent/server/api.py',
'torch/distributed/elastic/agent/server/local_elastic_agent.py',
'torch/distributed/elastic/events/__init__.py',
'torch/distributed/elastic/events/api.py',
'torch/distributed/elastic/events/handlers.py',
'torch/distributed/elastic/metrics/__init__.py',
'torch/distributed/elastic/metrics/api.py',
'torch/distributed/elastic/multiprocessing/__init__.py',
'torch/distributed/elastic/multiprocessing/api.py',
'torch/distributed/elastic/multiprocessing/errors/__init__.py',
'torch/distributed/elastic/multiprocessing/errors/error_handler.py',
'torch/distributed/elastic/multiprocessing/errors/handlers.py',
'torch/distributed/elastic/multiprocessing/redirects.py',
'torch/distributed/elastic/multiprocessing/tail_log.py',
'torch/distributed/elastic/rendezvous/__init__.py',
'torch/distributed/elastic/rendezvous/api.py',
'torch/distributed/elastic/rendezvous/c10d_rendezvous_backend.py',
'torch/distributed/elastic/rendezvous/dynamic_rendezvous.py',
'torch/distributed/elastic/rendezvous/etcd_rendezvous.py',
'torch/distributed/elastic/rendezvous/etcd_rendezvous_backend.py',
'torch/distributed/elastic/rendezvous/etcd_server.py',
'torch/distributed/elastic/rendezvous/etcd_store.py',
'torch/distributed/elastic/rendezvous/registry.py',
'torch/distributed/elastic/rendezvous/static_tcp_rendezvous.py',
'torch/distributed/elastic/rendezvous/utils.py',
'torch/distributed/elastic/timer/__init__.py',
'torch/distributed/elastic/timer/api.py',
'torch/distributed/elastic/timer/file_based_local_timer.py',
'torch/distributed/elastic/timer/local_timer.py',
'torch/distributed/elastic/utils/__init__.py',
'torch/distributed/elastic/utils/api.py',
'torch/distributed/elastic/utils/data/__init__.py',
'torch/distributed/elastic/utils/data/cycling_iterator.py',
'torch/distributed/elastic/utils/data/elastic_distributed_sampler.py',
'torch/distributed/elastic/utils/distributed.py',
'torch/distributed/elastic/utils/log_level.py',
'torch/distributed/elastic/utils/logging.py',
'torch/distributed/elastic/utils/store.py',
'torch/distributed/examples/memory_tracker_example.py',
'torch/distributed/launch.py',
'torch/distributed/launcher/__init__.py',
'torch/distributed/launcher/api.py',
'torch/distributed/logging_handlers.py',
'torch/distributed/nn/__init__.py',
'torch/distributed/nn/api/__init__.py',
'torch/distributed/nn/api/remote_module.py',
'torch/distributed/nn/functional.py',
'torch/distributed/nn/jit/__init__.py',
'torch/distributed/nn/jit/instantiator.py',
'torch/distributed/nn/jit/templates/__init__.py',
'torch/distributed/nn/jit/templates/remote_module_template.py',
'torch/distributed/optim/__init__.py',
'torch/distributed/optim/apply_optimizer_in_backward.py',
'torch/distributed/optim/functional_adadelta.py',
'torch/distributed/optim/functional_adagrad.py',
'torch/distributed/optim/functional_adam.py',
'torch/distributed/optim/functional_adamax.py',
'torch/distributed/optim/functional_adamw.py',
'torch/distributed/optim/functional_rmsprop.py',
'torch/distributed/optim/functional_rprop.py',
'torch/distributed/optim/functional_sgd.py',
'torch/distributed/optim/named_optimizer.py',
'torch/distributed/optim/optimizer.py',
'torch/distributed/optim/post_localSGD_optimizer.py',
'torch/distributed/optim/utils.py',
'torch/distributed/optim/zero_redundancy_optimizer.py',
'torch/distributed/pipeline/__init__.py',
'torch/distributed/pipeline/sync/__init__.py',
'torch/distributed/pipeline/sync/_balance/__init__.py',
'torch/distributed/pipeline/sync/_balance/blockpartition.py',
'torch/distributed/pipeline/sync/_balance/profile.py',
'torch/distributed/pipeline/sync/batchnorm.py',
'torch/distributed/pipeline/sync/checkpoint.py',
'torch/distributed/pipeline/sync/copy.py',
'torch/distributed/pipeline/sync/dependency.py',
'torch/distributed/pipeline/sync/microbatch.py',
'torch/distributed/pipeline/sync/phony.py',
'torch/distributed/pipeline/sync/pipe.py',
'torch/distributed/pipeline/sync/pipeline.py',
'torch/distributed/pipeline/sync/skip/__init__.py',
'torch/distributed/pipeline/sync/skip/layout.py',
'torch/distributed/pipeline/sync/skip/namespace.py',
'torch/distributed/pipeline/sync/skip/portal.py',
'torch/distributed/pipeline/sync/skip/skippable.py',
'torch/distributed/pipeline/sync/skip/tracker.py',
'torch/distributed/pipeline/sync/stream.py',
'torch/distributed/pipeline/sync/utils.py',
'torch/distributed/pipeline/sync/worker.py',
'torch/distributed/remote_device.py',
'torch/distributed/rendezvous.py',
'torch/distributed/rpc/__init__.py',
'torch/distributed/rpc/_testing/__init__.py',
'torch/distributed/rpc/_testing/faulty_agent_backend_registry.py',
'torch/distributed/rpc/_utils.py',
'torch/distributed/rpc/api.py',
'torch/distributed/rpc/backend_registry.py',
'torch/distributed/rpc/constants.py',
'torch/distributed/rpc/functions.py',
'torch/distributed/rpc/internal.py',
'torch/distributed/rpc/options.py',
'torch/distributed/rpc/rref_proxy.py',
'torch/distributed/rpc/server_process_global_profiler.py',
'torch/distributed/run.py',
'torch/distributed/tensor/__init__.py',
'torch/distributed/tensor/parallel/__init__.py',
'torch/distributed/tensor/parallel/_utils.py',
'torch/distributed/tensor/parallel/_view_with_dim_change.py',
'torch/distributed/tensor/parallel/api.py',
'torch/distributed/tensor/parallel/fsdp.py',
'torch/distributed/tensor/parallel/input_reshard.py',
'torch/distributed/tensor/parallel/multihead_attention_tp.py',
'torch/distributed/tensor/parallel/style.py',
'torch/distributed/utils.py',
'torch/fft/__init__.py',
'torch/func/__init__.py',
'torch/functional.py',
'torch/futures/__init__.py',
'torch/fx/__init__.py',
'torch/fx/_compatibility.py',
'torch/fx/_symbolic_trace.py',
'torch/fx/annotate.py',
'torch/fx/config.py',
'torch/fx/experimental/__init__.py',
'torch/fx/experimental/accelerator_partitioner.py',
'torch/fx/experimental/const_fold.py',
'torch/fx/experimental/debug.py',
'torch/fx/experimental/graph_gradual_typechecker.py',
'torch/fx/experimental/merge_matmul.py',
'torch/fx/experimental/meta_tracer.py',
'torch/fx/experimental/migrate_gradual_types/__init__.py',
'torch/fx/experimental/migrate_gradual_types/constraint.py',
'torch/fx/experimental/migrate_gradual_types/constraint_generator.py',
'torch/fx/experimental/migrate_gradual_types/constraint_transformation.py',
'torch/fx/experimental/migrate_gradual_types/operation.py',
'torch/fx/experimental/migrate_gradual_types/transform_to_z3.py',
'torch/fx/experimental/migrate_gradual_types/util.py',
'torch/fx/experimental/migrate_gradual_types/z3_types.py',
'torch/fx/experimental/normalize.py',
'torch/fx/experimental/optimization.py',
'torch/fx/experimental/partitioner_utils.py',
'torch/fx/experimental/proxy_tensor.py',
'torch/fx/experimental/refinement_types.py',
'torch/fx/experimental/rewriter.py',
'torch/fx/experimental/schema_type_annotation.py',
'torch/fx/experimental/symbolic_shapes.py',
'torch/fx/experimental/unification/__init__.py',
'torch/fx/experimental/unification/core.py',
'torch/fx/experimental/unification/dispatch.py',
'torch/fx/experimental/unification/match.py',
'torch/fx/experimental/unification/more.py',
'torch/fx/experimental/unification/multipledispatch/__init__.py',
'torch/fx/experimental/unification/multipledispatch/conflict.py',
'torch/fx/experimental/unification/multipledispatch/core.py',
'torch/fx/experimental/unification/multipledispatch/dispatcher.py',
'torch/fx/experimental/unification/multipledispatch/utils.py',
'torch/fx/experimental/unification/multipledispatch/variadic.py',
'torch/fx/experimental/unification/unification_tools.py',
'torch/fx/experimental/unification/utils.py',
'torch/fx/experimental/unification/variable.py',
'torch/fx/experimental/unify_refinements.py',
'torch/fx/experimental/validator.py',
'torch/fx/graph.py',
'torch/fx/graph_module.py',
'torch/fx/interpreter.py',
'torch/fx/node.py',
'torch/fx/operator_schemas.py',
'torch/fx/passes/__init__.py',
'torch/fx/passes/annotate_getitem_nodes.py',
'torch/fx/passes/backends/__init__.py',
'torch/fx/passes/backends/cudagraphs.py',
'torch/fx/passes/dialect/__init__.py',
'torch/fx/passes/dialect/common/__init__.py',
'torch/fx/passes/dialect/common/cse_pass.py',
'torch/fx/passes/fake_tensor_prop.py',
'torch/fx/passes/graph_drawer.py',
'torch/fx/passes/graph_manipulation.py',
'torch/fx/passes/infra/__init__.py',
'torch/fx/passes/infra/partitioner.py',
'torch/fx/passes/infra/pass_base.py',
'torch/fx/passes/infra/pass_manager.py',
'torch/fx/passes/net_min_base.py',
'torch/fx/passes/operator_support.py',
'torch/fx/passes/param_fetch.py',
'torch/fx/passes/pass_manager.py',
'torch/fx/passes/reinplace.py',
'torch/fx/passes/shape_prop.py',
'torch/fx/passes/split_module.py',
'torch/fx/passes/split_utils.py',
'torch/fx/passes/splitter_base.py',
'torch/fx/passes/tests/__init__.py',
'torch/fx/passes/tests/test_pass_manager.py',
'torch/fx/passes/tools_common.py',
'torch/fx/passes/utils/__init__.py',
'torch/fx/passes/utils/common.py',
'torch/fx/passes/utils/fuser_utils.py',
'torch/fx/passes/utils/matcher_utils.py',
'torch/fx/passes/utils/source_matcher_utils.py',
'torch/fx/proxy.py',
'torch/fx/subgraph_rewriter.py',
'torch/fx/tensor_type.py',
'torch/fx/traceback.py',
'torch/hub.py',
'torch/library.py',
'torch/linalg/__init__.py',
# UFMT causes import cycle on masked
'torch/masked/__init__.py',
'torch/masked/_docs.py',
'torch/masked/_ops.py',
'torch/masked/maskedtensor/__init__.py',
'torch/masked/maskedtensor/_ops_refs.py',
'torch/masked/maskedtensor/binary.py',
'torch/masked/maskedtensor/core.py',
'torch/masked/maskedtensor/creation.py',
'torch/masked/maskedtensor/passthrough.py',
'torch/masked/maskedtensor/reductions.py',
'torch/masked/maskedtensor/unary.py',
'torch/monitor/__init__.py',
'torch/nested/__init__.py',
'torch/nn/__init__.py',
'torch/nn/_reduction.py',
'torch/nn/backends/__init__.py',
'torch/nn/backends/thnn.py',
'torch/nn/common_types.py',
'torch/nn/cpp.py',
'torch/nn/functional.py',
'torch/nn/grad.py',
'torch/nn/init.py',
'torch/nn/intrinsic/__init__.py',
'torch/nn/intrinsic/modules/__init__.py',
'torch/nn/intrinsic/modules/fused.py',
'torch/nn/intrinsic/qat/__init__.py',
'torch/nn/intrinsic/qat/modules/__init__.py',
'torch/nn/intrinsic/qat/modules/conv_fused.py',
'torch/nn/intrinsic/qat/modules/linear_fused.py',
'torch/nn/intrinsic/qat/modules/linear_relu.py',
'torch/nn/intrinsic/quantized/__init__.py',
'torch/nn/intrinsic/quantized/dynamic/__init__.py',
'torch/nn/intrinsic/quantized/dynamic/modules/__init__.py',
'torch/nn/intrinsic/quantized/dynamic/modules/linear_relu.py',
'torch/nn/intrinsic/quantized/modules/__init__.py',
'torch/nn/intrinsic/quantized/modules/bn_relu.py',
'torch/nn/intrinsic/quantized/modules/conv_relu.py',
'torch/nn/intrinsic/quantized/modules/linear_relu.py',
'torch/nn/modules/__init__.py',
'torch/nn/modules/_functions.py',
'torch/nn/modules/activation.py',
'torch/nn/modules/adaptive.py',
'torch/nn/modules/batchnorm.py',
'torch/nn/modules/channelshuffle.py',
'torch/nn/modules/container.py',
'torch/nn/modules/conv.py',
'torch/nn/modules/distance.py',
'torch/nn/modules/dropout.py',
'torch/nn/modules/flatten.py',
'torch/nn/modules/fold.py',
'torch/nn/modules/instancenorm.py',
'torch/nn/modules/lazy.py',
'torch/nn/modules/linear.py',
'torch/nn/modules/loss.py',
'torch/nn/modules/module.py',
'torch/nn/modules/normalization.py',
'torch/nn/modules/padding.py',
'torch/nn/modules/pixelshuffle.py',
'torch/nn/modules/pooling.py',
'torch/nn/modules/rnn.py',
'torch/nn/modules/sparse.py',
'torch/nn/modules/transformer.py',
'torch/nn/modules/upsampling.py',
'torch/nn/modules/utils.py',
'torch/nn/parallel/__init__.py',
'torch/nn/parallel/_functions.py',
'torch/nn/parallel/comm.py',
'torch/nn/parallel/data_parallel.py',
'torch/nn/parallel/parallel_apply.py',
'torch/nn/parallel/replicate.py',
'torch/nn/parallel/scatter_gather.py',
'torch/nn/parameter.py',
'torch/nn/qat/__init__.py',
'torch/nn/qat/dynamic/__init__.py',
'torch/nn/qat/dynamic/modules/__init__.py',
'torch/nn/qat/dynamic/modules/linear.py',
'torch/nn/qat/modules/__init__.py',
'torch/nn/qat/modules/conv.py',
'torch/nn/qat/modules/embedding_ops.py',
'torch/nn/qat/modules/linear.py',
'torch/nn/quantizable/__init__.py',
'torch/nn/quantizable/modules/__init__.py',
'torch/nn/quantizable/modules/activation.py',
'torch/nn/quantizable/modules/rnn.py',
'torch/nn/quantized/__init__.py',
'torch/nn/quantized/_reference/__init__.py',
'torch/nn/quantized/_reference/modules/__init__.py',
'torch/nn/quantized/_reference/modules/conv.py',
'torch/nn/quantized/_reference/modules/linear.py',
'torch/nn/quantized/_reference/modules/rnn.py',
'torch/nn/quantized/_reference/modules/sparse.py',
'torch/nn/quantized/_reference/modules/utils.py',
'torch/nn/quantized/dynamic/__init__.py',
'torch/nn/quantized/dynamic/modules/__init__.py',
'torch/nn/quantized/dynamic/modules/conv.py',
'torch/nn/quantized/dynamic/modules/linear.py',
'torch/nn/quantized/dynamic/modules/rnn.py',
'torch/nn/quantized/functional.py',
'torch/nn/quantized/modules/__init__.py',
'torch/nn/quantized/modules/activation.py',
'torch/nn/quantized/modules/batchnorm.py',
'torch/nn/quantized/modules/conv.py',
'torch/nn/quantized/modules/dropout.py',
'torch/nn/quantized/modules/embedding_ops.py',
'torch/nn/quantized/modules/functional_modules.py',
'torch/nn/quantized/modules/linear.py',
'torch/nn/quantized/modules/normalization.py',
'torch/nn/quantized/modules/rnn.py',
'torch/nn/quantized/modules/utils.py',
'torch/nn/utils/__init__.py',
'torch/nn/utils/_deprecation_utils.py',
'torch/nn/utils/_expanded_weights/__init__.py',
'torch/nn/utils/_expanded_weights/conv_expanded_weights.py',
'torch/nn/utils/_expanded_weights/conv_utils.py',
'torch/nn/utils/_expanded_weights/embedding_expanded_weights.py',
'torch/nn/utils/_expanded_weights/expanded_weights_impl.py',
'torch/nn/utils/_expanded_weights/expanded_weights_utils.py',
'torch/nn/utils/_expanded_weights/group_norm_expanded_weights.py',
'torch/nn/utils/_expanded_weights/instance_norm_expanded_weights.py',
'torch/nn/utils/_expanded_weights/layer_norm_expanded_weights.py',
'torch/nn/utils/_expanded_weights/linear_expanded_weights.py',
'torch/nn/utils/_per_sample_grad.py',
'torch/nn/utils/clip_grad.py',
'torch/nn/utils/convert_parameters.py',
'torch/nn/utils/fusion.py',
'torch/nn/utils/init.py',
'torch/nn/utils/memory_format.py',
'torch/nn/utils/parametrizations.py',
'torch/nn/utils/parametrize.py',
'torch/nn/utils/prune.py',
'torch/nn/utils/rnn.py',
'torch/nn/utils/spectral_norm.py',
'torch/nn/utils/weight_norm.py',
'torch/optim/__init__.py',
'torch/optim/_functional.py',
'torch/optim/_multi_tensor/__init__.py',
'torch/optim/adadelta.py',
'torch/optim/adagrad.py',
'torch/optim/adam.py',
'torch/optim/adamax.py',
'torch/optim/adamw.py',
'torch/optim/asgd.py',
'torch/optim/lbfgs.py',
'torch/optim/lr_scheduler.py',
'torch/optim/nadam.py',
'torch/optim/optimizer.py',
'torch/optim/radam.py',
'torch/optim/rmsprop.py',
'torch/optim/rprop.py',
'torch/optim/sgd.py',
'torch/optim/sparse_adam.py',
'torch/optim/swa_utils.py',
'torch/overrides.py',
'torch/quasirandom.py',
'torch/random.py',
'torch/return_types.py',
'torch/serialization.py',
'torch/signal/__init__.py',
'torch/signal/windows/__init__.py',
'torch/signal/windows/windows.py',
'torch/sparse/__init__.py',
'torch/sparse/_semi_structured_conversions.py',
'torch/sparse/_triton_ops.py',
'torch/sparse/semi_structured.py',
'torch/special/__init__.py',
'torch/storage.py',
'torch/testing/_internal/__init__.py',
'torch/testing/_internal/autocast_test_lists.py',
'torch/testing/_internal/autograd_function_db.py',
'torch/testing/_internal/check_kernel_launches.py',
'torch/testing/_internal/codegen/__init__.py',
'torch/testing/_internal/codegen/random_topo_test.py',
'torch/testing/_internal/common_cuda.py',
'torch/testing/_internal/common_device_type.py',
'torch/testing/_internal/common_distributed.py',
'torch/testing/_internal/common_dtype.py',
'torch/testing/_internal/common_jit.py',
'torch/testing/_internal/common_methods_invocations.py',
'torch/testing/_internal/common_modules.py',
'torch/testing/_internal/common_nn.py',
'torch/testing/_internal/common_pruning.py',
'torch/testing/_internal/common_quantization.py',
'torch/testing/_internal/common_quantized.py',
'torch/testing/_internal/common_subclass.py',
'torch/testing/_internal/common_utils.py',
'torch/testing/_internal/composite_compliance.py',
'torch/testing/_internal/control_flow_opinfo_db.py',
'torch/testing/_internal/custom_op_db.py',
'torch/testing/_internal/data/__init__.py',
'torch/testing/_internal/data/network1.py',
'torch/testing/_internal/data/network2.py',
'torch/testing/_internal/dist_utils.py',
'torch/testing/_internal/distributed/__init__.py',
'torch/testing/_internal/distributed/_shard/__init__.py',
'torch/testing/_internal/distributed/_shard/sharded_tensor/__init__.py',
'torch/testing/_internal/distributed/_shard/sharded_tensor/_test_ops_common.py',
'torch/testing/_internal/distributed/_shard/sharded_tensor/_test_st_common.py',
'torch/testing/_internal/distributed/_shard/test_common.py',
'torch/testing/_internal/distributed/_tensor/__init__.py',
'torch/testing/_internal/distributed/_tensor/common_dtensor.py',
'torch/testing/_internal/distributed/ddp_under_dist_autograd_test.py',
'torch/testing/_internal/distributed/distributed_test.py',
'torch/testing/_internal/distributed/distributed_utils.py',
'torch/testing/_internal/distributed/fake_pg.py',
'torch/testing/_internal/distributed/multi_threaded_pg.py',
'torch/testing/_internal/distributed/nn/__init__.py',
'torch/testing/_internal/distributed/nn/api/__init__.py',
'torch/testing/_internal/distributed/nn/api/remote_module_test.py',
'torch/testing/_internal/distributed/pipe_with_ddp_test.py',
'torch/testing/_internal/distributed/pipeline/__init__.py',
'torch/testing/_internal/distributed/rpc/__init__.py',
'torch/testing/_internal/distributed/rpc/dist_autograd_test.py',
'torch/testing/_internal/distributed/rpc/dist_optimizer_test.py',
'torch/testing/_internal/distributed/rpc/examples/__init__.py',
'torch/testing/_internal/distributed/rpc/examples/parameter_server_test.py',
'torch/testing/_internal/distributed/rpc/examples/reinforcement_learning_rpc_test.py',
'torch/testing/_internal/distributed/rpc/faulty_agent_rpc_test.py',
'torch/testing/_internal/distributed/rpc/faulty_rpc_agent_test_fixture.py',
'torch/testing/_internal/distributed/rpc/jit/__init__.py',
'torch/testing/_internal/distributed/rpc/jit/dist_autograd_test.py',
'torch/testing/_internal/distributed/rpc/jit/rpc_test.py',
'torch/testing/_internal/distributed/rpc/jit/rpc_test_faulty.py',
'torch/testing/_internal/distributed/rpc/rpc_agent_test_fixture.py',
'torch/testing/_internal/distributed/rpc/rpc_test.py',
'torch/testing/_internal/distributed/rpc/tensorpipe_rpc_agent_test_fixture.py',
'torch/testing/_internal/distributed/rpc_utils.py',
'torch/testing/_internal/generated/__init__.py',
'torch/testing/_internal/hypothesis_utils.py',
'torch/testing/_internal/inductor_utils.py',
'torch/testing/_internal/jit_metaprogramming_utils.py',
'torch/testing/_internal/jit_utils.py',
'torch/testing/_internal/logging_tensor.py',
'torch/testing/_internal/logging_utils.py',
'torch/testing/_internal/optests/__init__.py',
'torch/testing/_internal/optests/aot_autograd.py',
'torch/testing/_internal/optests/compile_check.py',
'torch/testing/_internal/optests/fake_tensor.py',
'torch/testing/_internal/optests/make_fx.py',
'torch/testing/_internal/quantization_torch_package_models.py',
'torch/testing/_internal/test_module/__init__.py',
'torch/testing/_internal/test_module/future_div.py',
'torch/testing/_internal/test_module/no_future_div.py',
'torch/torch_version.py',
'torch/types.py',
'torch/utils/__init__.py',
'torch/utils/_contextlib.py',
'torch/utils/_cpp_extension_versioner.py',
'torch/utils/_crash_handler.py',
'torch/utils/_cuda_trace.py',
'torch/utils/_device.py',
'torch/utils/_foreach_utils.py',
'torch/utils/_freeze.py',
'torch/utils/_mode_utils.py',
'torch/utils/_python_dispatch.py',
'torch/utils/_stats.py',
'torch/utils/_sympy/__init__.py',
'torch/utils/_sympy/functions.py',
'torch/utils/_sympy/value_ranges.py',
'torch/utils/_traceback.py',
'torch/utils/_zip.py',
'torch/utils/backcompat/__init__.py',
'torch/utils/backend_registration.py',
'torch/utils/benchmark/__init__.py',
'torch/utils/benchmark/examples/__init__.py',
'torch/utils/benchmark/examples/blas_compare.py',
'torch/utils/benchmark/examples/blas_compare_setup.py',
'torch/utils/benchmark/examples/compare.py',
'torch/utils/benchmark/examples/end_to_end.py',
'torch/utils/benchmark/examples/fuzzer.py',
'torch/utils/benchmark/examples/op_benchmark.py',
'torch/utils/benchmark/examples/simple_timeit.py',
'torch/utils/benchmark/examples/sparse/compare.py',
'torch/utils/benchmark/examples/sparse/fuzzer.py',
'torch/utils/benchmark/examples/sparse/op_benchmark.py',
'torch/utils/benchmark/examples/spectral_ops_fuzz_test.py',
'torch/utils/benchmark/op_fuzzers/__init__.py',
'torch/utils/benchmark/op_fuzzers/binary.py',
'torch/utils/benchmark/op_fuzzers/sparse_binary.py',
'torch/utils/benchmark/op_fuzzers/sparse_unary.py',
'torch/utils/benchmark/op_fuzzers/spectral.py',
'torch/utils/benchmark/op_fuzzers/unary.py',
'torch/utils/benchmark/utils/__init__.py',
'torch/utils/benchmark/utils/_stubs.py',
'torch/utils/benchmark/utils/common.py',
'torch/utils/benchmark/utils/compare.py',
'torch/utils/benchmark/utils/compile.py',
'torch/utils/benchmark/utils/cpp_jit.py',
'torch/utils/benchmark/utils/fuzzer.py',
'torch/utils/benchmark/utils/sparse_fuzzer.py',
'torch/utils/benchmark/utils/timer.py',
'torch/utils/benchmark/utils/valgrind_wrapper/__init__.py',
'torch/utils/benchmark/utils/valgrind_wrapper/timer_interface.py',
'torch/utils/bottleneck/__init__.py',
'torch/utils/bottleneck/__main__.py',
'torch/utils/bundled_inputs.py',
'torch/utils/checkpoint.py',
'torch/utils/collect_env.py',
'torch/utils/cpp_backtrace.py',
'torch/utils/cpp_extension.py',
'torch/utils/data/__init__.py',
'torch/utils/data/_utils/__init__.py',
'torch/utils/data/_utils/collate.py',
'torch/utils/data/_utils/fetch.py',
'torch/utils/data/_utils/pin_memory.py',
'torch/utils/data/_utils/serialization.py',
'torch/utils/data/_utils/signal_handling.py',
'torch/utils/data/_utils/worker.py',
'torch/utils/data/backward_compatibility.py',
'torch/utils/data/dataloader.py',
'torch/utils/data/datapipes/__init__.py',
'torch/utils/data/datapipes/_decorator.py',
'torch/utils/data/datapipes/_hook_iterator.py',
'torch/utils/data/datapipes/_typing.py',
'torch/utils/data/datapipes/dataframe/__init__.py',
'torch/utils/data/datapipes/dataframe/dataframe_wrapper.py',
'torch/utils/data/datapipes/dataframe/dataframes.py',
'torch/utils/data/datapipes/dataframe/datapipes.py',
'torch/utils/data/datapipes/dataframe/structures.py',
'torch/utils/data/datapipes/datapipe.py',
'torch/utils/data/datapipes/gen_pyi.py',
'torch/utils/data/datapipes/iter/__init__.py',
'torch/utils/data/datapipes/iter/callable.py',
'torch/utils/data/datapipes/iter/combinatorics.py',
'torch/utils/data/datapipes/iter/combining.py',
'torch/utils/data/datapipes/iter/filelister.py',
'torch/utils/data/datapipes/iter/fileopener.py',
'torch/utils/data/datapipes/iter/grouping.py',
'torch/utils/data/datapipes/iter/routeddecoder.py',
'torch/utils/data/datapipes/iter/selecting.py',
'torch/utils/data/datapipes/iter/sharding.py',
'torch/utils/data/datapipes/iter/streamreader.py',
'torch/utils/data/datapipes/iter/utils.py',
'torch/utils/data/datapipes/map/__init__.py',
'torch/utils/data/datapipes/map/callable.py',
'torch/utils/data/datapipes/map/combinatorics.py',
'torch/utils/data/datapipes/map/combining.py',
'torch/utils/data/datapipes/map/grouping.py',
'torch/utils/data/datapipes/map/utils.py',
'torch/utils/data/datapipes/utils/__init__.py',
'torch/utils/data/datapipes/utils/common.py',
'torch/utils/data/datapipes/utils/decoder.py',
'torch/utils/data/datapipes/utils/snapshot.py',
'torch/utils/data/distributed.py',
'torch/utils/data/graph.py',
'torch/utils/data/graph_settings.py',
'torch/utils/data/sampler.py',
'torch/utils/dlpack.py',
'torch/utils/file_baton.py',
'torch/utils/flop_counter.py',
'torch/utils/hipify/__init__.py',
'torch/utils/hipify/constants.py',
'torch/utils/hipify/cuda_to_hip_mappings.py',
'torch/utils/hipify/hipify_python.py',
'torch/utils/hipify/version.py',
'torch/utils/hooks.py',
'torch/utils/jit/__init__.py',
'torch/utils/jit/log_extract.py',
'torch/utils/mkldnn.py',
'torch/utils/mobile_optimizer.py',
'torch/utils/model_dump/__init__.py',
'torch/utils/model_dump/__main__.py',
'torch/utils/model_zoo.py',
'torch/utils/show_pickle.py',
'torch/utils/tensorboard/__init__.py',
'torch/utils/tensorboard/_caffe2_graph.py',
'torch/utils/tensorboard/_convert_np.py',
'torch/utils/tensorboard/_embedding.py',
'torch/utils/tensorboard/_onnx_graph.py',
'torch/utils/tensorboard/_proto_graph.py',
'torch/utils/tensorboard/_pytorch_graph.py',
'torch/utils/tensorboard/_utils.py',
'torch/utils/tensorboard/summary.py',
'torch/utils/tensorboard/writer.py',
'torch/utils/throughput_benchmark.py',
'torch/utils/viz/__init__.py',
'torch/utils/viz/_cycles.py',
'torch/utils/weak.py',
]
init_command = [
'python3',
'tools/linter/adapters/pip_init.py',
'--dry-run={{DRYRUN}}',
'--no-black-binary',
'black==23.3.0',
'ufmt==2.1.0',
'usort==1.0.6',
]
is_formatter = true
[[linter]]
code = 'COPYRIGHT'
include_patterns = ['**']
exclude_patterns = [
'.lintrunner.toml',
'fb/**',
'**/fb/**',
]
command = [
'python3',
'tools/linter/adapters/grep_linter.py',
'--pattern=Confidential and proprietary',
'--linter-name=COPYRIGHT',
'--error-name=Confidential Code',
"""--error-description=\
Proprietary and confidential source code\
should not be contributed to PyTorch codebase\
""",
'--',
'@{{PATHSFILE}}'
]
[[linter]]
code = 'BAZEL_LINTER'
include_patterns = ['WORKSPACE']
command = [
'python3',
'tools/linter/adapters/bazel_linter.py',
'--binary=.lintbin/bazel',
'--',
'@{{PATHSFILE}}'
]
init_command = [
'python3',
'tools/linter/adapters/s3_init.py',
'--config-json=tools/linter/adapters/s3_init_config.json',
'--linter=bazel',
'--dry-run={{DRYRUN}}',
'--output-dir=.lintbin',
'--output-name=bazel',
]
is_formatter = true
[[linter]]
code = 'LINTRUNNER_VERSION'
include_patterns = ['**']
exclude_patterns = [
'fb/**',
'**/fb/**',
]
command = [
'python3',
'tools/linter/adapters/lintrunner_version_linter.py'
]
[[linter]]
code = 'RUFF'
include_patterns = ['**/*.py', '**/*.pyi']
exclude_patterns = [
'caffe2/**',
'functorch/docs/**',
'functorch/notebooks/**',
'torch/_inductor/fx_passes/serialized_patterns/**',
'scripts/**',
'third_party/**',
'fb/**',
'**/fb/**',
]
command = [
'python3',
'tools/linter/adapters/ruff_linter.py',
'--config=pyproject.toml',
'--show-disable',
'--',
'@{{PATHSFILE}}'
]
init_command = [
'python3',
'tools/linter/adapters/pip_init.py',
'--dry-run={{DRYRUN}}',
'ruff==0.1.9',
]
is_formatter = true
# This linter prevents merge conlicts in csv files in pytorch by enforcing
# three lines of whitespace between entries such that unless people are modifying
# the same line, merge conflicts should not arise in git or hg
[[linter]]
code = 'MERGE_CONFLICTLESS_CSV'
include_patterns = ['benchmarks/dynamo/ci_expected_accuracy/*.csv']
command = [
'python3',
'tools/linter/adapters/no_merge_conflict_csv_linter.py',
'--',
'@{{PATHSFILE}}'
]
is_formatter = true
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/wow5522/pytorch.git
git@gitee.com:wow5522/pytorch.git
wow5522
pytorch
pytorch
main

搜索帮助