pytorch/torch
drisspg 2b43d339fe Make FlexAttention API public (#130755)
# Summary

Makes the prototype API flex_attention public

Pull Request resolved: https://github.com/pytorch/pytorch/pull/130755
Approved by: https://github.com/Chillee
2024-07-16 16:21:25 +00:00
..
_awaits
_C Invalidate StorageImpl instances when tensor is overwritten with cudagraphs (#125264) 2024-07-16 14:29:29 +00:00
_C_flatbuffer
_custom_op Revert "Tighten torch.library.infer_schema input types (#130705)" 2024-07-16 12:57:11 +00:00
_decomp Revert "Add decompositions for copy variants of view ops (#128416)" 2024-07-11 22:09:23 +00:00
_dispatch
_dynamo typing: convert_frame (#130670) 2024-07-16 14:31:35 +00:00
_export [Fix] Correctly identifying arguments for sub-blocks with renaming logic during TorchScript to ExportedProgram conversion (#128386) 2024-07-15 22:48:13 +00:00
_functorch Revert "Propagate buffer and parameter indices through AOT (#130393)" 2024-07-16 15:43:34 +00:00
_higher_order_ops Make FlexAttention API public (#130755) 2024-07-16 16:21:25 +00:00
_inductor Revert "Propagate buffer and parameter indices through AOT (#130393)" 2024-07-16 15:43:34 +00:00
_lazy [BE][Easy] apply autofix for ruff rules unnecessary-collection-call (C408): list() / tuple() / dict() (#130199) 2024-07-11 17:30:28 +00:00
_library Revert "Tighten torch.library.infer_schema input types (#130705)" 2024-07-16 12:57:11 +00:00
_logging Add trace_shape_events artifact tracing for ShapeEnv events (#130473) 2024-07-12 13:50:25 +00:00
_numpy Revert "Make hashing a SymInt raise an error again (#130548)" 2024-07-12 16:20:12 +00:00
_prims Revert "Add decompositions for copy variants of view ops (#128416)" 2024-07-11 22:09:23 +00:00
_prims_common [BE][Easy] fix ruff rule needless-bool (SIM103) (#130206) 2024-07-14 08:17:52 +00:00
_refs [BE][Easy] fix ruff rule needless-bool (SIM103) (#130206) 2024-07-14 08:17:52 +00:00
_strobelight
_subclasses [BE][Easy] fix ruff rule needless-bool (SIM103) (#130206) 2024-07-14 08:17:52 +00:00
_vendor
amp
ao Rename generate_numeric_debug_handle to numeric_debugger (#130590) 2024-07-15 22:42:27 +00:00
autograd Add kwinputs to Kineto Traces (#130373) 2024-07-14 00:40:59 +00:00
backends
compiler
contrib
cpu
csrc Invalidate StorageImpl instances when tensor is overwritten with cudagraphs (#125264) 2024-07-16 14:29:29 +00:00
cuda [BE][Easy] apply autofix for ruff rules unnecessary-collection-call (C408): list() / tuple() / dict() (#130199) 2024-07-11 17:30:28 +00:00
distributed [BE]: Update flake8-comprehensions and enable C420 (#130699) 2024-07-16 13:47:49 +00:00
distributions
export typing fake_tensor.py (#128041) 2024-07-13 06:07:40 +00:00
fft
func
futures
fx [BE]: Update flake8-comprehensions and enable C420 (#130699) 2024-07-16 13:47:49 +00:00
jit [BE][Easy] apply autofix for ruff rules unnecessary-collection-call (C408): list() / tuple() / dict() (#130199) 2024-07-11 17:30:28 +00:00
legacy
lib
linalg
masked
monitor
mps
mtia
multiprocessing
nested [Nested Tensor][easy] Add softmax backward support (#130602) 2024-07-16 00:07:42 +00:00
nn Make FlexAttention API public (#130755) 2024-07-16 16:21:25 +00:00
onnx [BE][Easy] fix ruff rule needless-bool (SIM103) (#130206) 2024-07-14 08:17:52 +00:00
optim fix the use of initial learning rate in the OneCycleLR example (#130306) 2024-07-09 18:58:07 +00:00
package
profiler [BE][Easy] apply autofix for ruff rules unnecessary-collection-call (C408): list() / tuple() / dict() (#130199) 2024-07-11 17:30:28 +00:00
quantization
signal
sparse Enable UFMT on all of torch/sparse (#130545) 2024-07-15 22:35:52 +00:00
special
testing Make FlexAttention API public (#130755) 2024-07-16 16:21:25 +00:00
utils Keep zero check be compatible with different sympy versions (#130729) 2024-07-16 08:39:00 +00:00
xpu
__config__.py
__future__.py
__init__.py typing fake_tensor.py (#128041) 2024-07-13 06:07:40 +00:00
_appdirs.py
_classes.py
_compile.py
_custom_ops.py Revert "Tighten torch.library.infer_schema input types (#130705)" 2024-07-16 12:57:11 +00:00
_deploy.py
_guards.py [BE][Easy] apply autofix for ruff rules unnecessary-collection-call (C408): list() / tuple() / dict() (#130199) 2024-07-11 17:30:28 +00:00
_jit_internal.py [torchscript] Add logging for model id. (#130118) 2024-07-09 22:24:16 +00:00
_linalg_utils.py
_lobpcg.py
_lowrank.py
_meta_registrations.py Update error message in meta__convert_weight_to_int4pack (#130707) 2024-07-16 00:44:35 +00:00
_namedtensor_internals.py
_ops.py [HOP] add HOP x torch_dispatch interaction (#130606) 2024-07-12 21:51:36 +00:00
_python_dispatcher.py
_size_docs.py
_sources.py
_storage_docs.py
_streambase.py
_tensor.py [easy] Small rendering fix in Tensor.module_load doc (#130489) 2024-07-12 22:12:53 +00:00
_tensor_docs.py
_tensor_str.py
_torch_docs.py Introduce the concept of Accelerators to PyTorch doc (#129363) 2024-07-15 14:24:46 +00:00
_utils.py
_utils_internal.py [torchscript] Add logging for model id. (#130118) 2024-07-09 22:24:16 +00:00
_VF.py
_vmap_internals.py
_weights_only_unpickler.py Add torch.serialization.safe_globals context manager (#127939) 2024-07-12 20:38:43 +00:00
abi-check.cpp
CMakeLists.txt [BE] [CMake] Remove AT_CORE_STATIC_WINDOWS option (#130409) 2024-07-10 15:50:47 +00:00
custom_class.h
custom_class_detail.h
extension.h
functional.py
hub.py
library.h
library.py [custom_ops] expose torch.library.register_torch_dispatch (#130261) 2024-07-12 14:13:01 +00:00
overrides.py [BE][Easy] apply autofix for ruff rules unnecessary-collection-call (C408): list() / tuple() / dict() (#130199) 2024-07-11 17:30:28 +00:00
py.typed
quasirandom.py
random.py
README.txt
return_types.py
script.h
serialization.py Add torch.serialization.safe_globals context manager (#127939) 2024-07-12 20:38:43 +00:00
storage.py typing: storage (#130669) 2024-07-16 14:31:35 +00:00
torch_version.py
types.py typing fake_tensor.py (#128041) 2024-07-13 06:07:40 +00:00
version.py.tpl

Note [TH abstraction violation]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

TH/THC provide some hpp headers, which are proper C++ headers rather than
C headers.  These headers serve double duty as *internal implementation
detail* headers, whose contents should largely not be used by external
clients.

Ideally, we would not install these headers at all; instead, you should
use public functions (in headers like `THTensor.h`, NOT `THTensor.hpp`)
to manipulate these structs.  However, there are a few places
in torch/csrc where we violate this abstraction.  They are marked with
a pointer to this note.  Each of those sites will have to be refactored
when we refactor the guts of THTensor and related structures.