pytorch/c10/core
Laith Sakka 39df901b2a introduce definitely_contiguous and use it for reshape and tensor meta data computation. (#153432)
when a tensor has unbacked symbols it can be general enough to represent both contiguous and non contiguous tensors.
in that case we cant really evaluate is_contiguous. In many places in the code base, we check for is_contiguous to take a fast path. but the general path usually works for both contiguous and not contiguous in that case we probably want
to use definitely _contiguous API.

This is appleid for reshape in this PR and also to  tensor meta data computation, the meta data now will have an attribute that says that its contiguous when its always contiguous. We would store that only if definitely _contiguous is true  now.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/153432
Approved by: https://github.com/bobrenjc93
2025-05-28 03:41:26 +00:00
..
impl Enable -Wunused on torch targets (#150077) 2025-05-02 07:14:19 +00:00
alignment.h
Allocator.cpp Switch c10::string_view to std::string_view (#139635) 2024-11-27 01:41:18 +00:00
Allocator.h [sigmoid] memory planner C10 deps (#151275) 2025-04-24 01:46:32 +00:00
AutogradState.cpp
AutogradState.h [13/N] Fix extra warnings brought by clang-tidy-17 (#140897) 2024-11-27 00:35:19 +00:00
Backend.h [MAIA] [Autocast] Enable autocast on MAIA device (#148511) 2025-03-18 03:46:22 +00:00
BUILD.bazel
build.bzl Use c10 version of half/bfloat16 in executorch (#144111) 2025-02-08 22:40:14 +00:00
CachingDeviceAllocator.h Reuse format_size utils (#149383) 2025-03-24 03:06:27 +00:00
CompileTimeFunctionPointer.h
ConstantSymNodeImpl.cpp
ConstantSymNodeImpl.h [3/N] Fix Wunused-parameter warnings (#131271) 2024-07-20 23:31:03 +00:00
Contiguity.h introduce definitely_contiguous and use it for reshape and tensor meta data computation. (#153432) 2025-05-28 03:41:26 +00:00
CopyBytes.cpp
CopyBytes.h
CPUAllocator.cpp Enable misc-use-internal-linkage check and apply fixes (#148948) 2025-03-12 14:22:56 +00:00
CPUAllocator.h
DefaultDtype.cpp
DefaultDtype.h
DefaultTensorOptions.h
Device.cpp Cast to unsigned char to avoid UB (#152360) 2025-04-30 15:09:13 +00:00
Device.h Revert "Increase C10_COMPILE_TIME_MAX_GPUS to 128 (#144138)" 2025-01-14 19:04:12 +00:00
DeviceArray.h std::value/std::type -> std::_v/std::_t (#138746) 2024-10-26 20:59:24 +00:00
DeviceGuard.h [1/N] Enable cppcoreguidelines-special-member-functions (#137405) 2024-10-23 00:16:53 +00:00
DeviceType.cpp Switch c10::string_view to std::string_view (#139635) 2024-11-27 01:41:18 +00:00
DeviceType.h
DispatchKey.cpp [HPU] Add HPU as a supported device for NestedTensor (#148659) 2025-04-14 03:42:34 +00:00
DispatchKey.h [MAIA] [Autocast] Enable autocast on MAIA device (#148511) 2025-03-18 03:46:22 +00:00
DispatchKeySet.cpp [MAIA] [Autocast] Enable autocast on MAIA device (#148511) 2025-03-18 03:46:22 +00:00
DispatchKeySet.h Make DispatchKeySet serializable; add __eq__ (#152732) 2025-05-03 14:40:06 +00:00
DynamicCast.h
Event.h
GeneratorImpl.cpp Avoid std::chrono::system_clock (#153135) 2025-05-08 16:30:29 +00:00
GeneratorImpl.h [1/N] Enable cppcoreguidelines-special-member-functions (#137405) 2024-10-23 00:16:53 +00:00
GradMode.cpp
GradMode.h [1/N] Enable cppcoreguidelines-special-member-functions (#137405) 2024-10-23 00:16:53 +00:00
InferenceMode.cpp
InferenceMode.h [1/N] Enable cppcoreguidelines-special-member-functions (#137405) 2024-10-23 00:16:53 +00:00
Layout.h
MemoryFormat.h
OptionalRef.h
PyHandleCache.h
QEngine.h
QScheme.h
RefcountedDeleter.cpp [18/N] Fix extra warnings brought by clang-tidy-17 (#144014) 2025-01-08 17:21:55 +00:00
RefcountedDeleter.h
SafePyObject.cpp
SafePyObject.h [1/N] Enable cppcoreguidelines-special-member-functions (#137405) 2024-10-23 00:16:53 +00:00
Scalar.cpp
Scalar.h add the torch.float8_e8m0fnu dtype to PyTorch (#147466) 2025-02-20 13:55:42 +00:00
ScalarType.cpp add torch.float4_e2m1fn_x2 to PyTorch (#148791) 2025-03-27 17:32:20 +00:00
ScalarType.h add torch.float4_e2m1fn_x2 to PyTorch (#148791) 2025-03-27 17:32:20 +00:00
ScalarTypeToTypeMeta.h [9/N] Replace c10::optional with std::optional (#130674) 2024-07-15 00:48:43 +00:00
Storage.cpp
Storage.h
StorageImpl.cpp Turn some variables and functions into static (#136847) 2024-10-29 17:01:56 +00:00
StorageImpl.h [sigmoid] memory planner C10 deps (#151275) 2025-04-24 01:46:32 +00:00
Stream.cpp
Stream.h
StreamGuard.h [1/N] Enable cppcoreguidelines-special-member-functions (#137405) 2024-10-23 00:16:53 +00:00
SymbolicShapeMeta.cpp consolidate guard_or_x and definitely_x (#152463) 2025-05-02 18:08:11 +00:00
SymbolicShapeMeta.h [1/N] Enable cppcoreguidelines-special-member-functions (#137405) 2024-10-23 00:16:53 +00:00
SymBool.cpp Support C++ statically_known_true (#151346) 2025-04-18 06:42:12 +00:00
SymBool.h Support C++ statically_known_true (#151346) 2025-04-18 06:42:12 +00:00
SymFloat.cpp fix incorrect c10::SymFloat::sqrt (#141728) 2024-12-03 23:34:16 +00:00
SymFloat.h Add admonition about as_float_unchecked() (#141742) 2024-11-28 06:25:18 +00:00
SymInt.cpp Bump Clang-tidy to 19.1.4 (#148648) 2025-03-10 17:32:30 +00:00
SymInt.h consolidate guard_or_x and definitely_x (#152463) 2025-05-02 18:08:11 +00:00
SymIntArrayRef.cpp
SymIntArrayRef.h [1/N] Change #include <c10/util/Optional.h> to #include <optional> (#128301) 2024-07-08 07:03:53 +00:00
SymNodeImpl.cpp
SymNodeImpl.h [ez] Replace misleading implementations with NYI (#154440) 2025-05-28 02:21:56 +00:00
TensorImpl.cpp Enable -Wunused on torch targets (#150077) 2025-05-02 07:14:19 +00:00
TensorImpl.h [Lint] Update clang-format to 19.1.4 (#153889) 2025-05-20 14:12:46 +00:00
TensorOptions.cpp
TensorOptions.h Enable readability-redundant-declaration (#143982) 2024-12-31 00:20:10 +00:00
thread_pool.cpp Fix extra semicolon warning (#148291) 2025-03-03 18:51:44 +00:00
thread_pool.h
UndefinedTensorImpl.cpp [inductor] fix UndefinedTensorImpl singleton can't export on Windows. (#132326) 2024-08-01 13:37:12 +00:00
UndefinedTensorImpl.h [inductor] fix UndefinedTensorImpl singleton can't export on Windows. (#132326) 2024-08-01 13:37:12 +00:00
WrapDimMinimal.cpp Bump Clang-tidy to 19.1.4 (#148648) 2025-03-10 17:32:30 +00:00
WrapDimMinimal.h