pytorch/c10/core
Laith Sakka 1aef88c72d Avoid DDE in narrow with unbacked start (#166361)
Slice knows how to handle unbacked start, we do not need to offset start before calling slice, we can leave it for slice.
The only edge case is when start<0 and start+length ==0 in that case slice and narrow would deviate,
for that case we shall pass dim_size instead of start+length

Pull Request resolved: https://github.com/pytorch/pytorch/pull/166361
Approved by: https://github.com/aorenste
2025-11-01 07:10:23 +00:00
..
impl [1/N] Change C-style casts to static_cast or reinterpret_cast (#165750) 2025-10-20 23:27:13 +00:00
alignment.h Move hardware_destructive_interference_size to c10/core/alignment.h (#160067) 2025-10-21 14:39:46 +00:00
Allocator.cpp
Allocator.h Move hardware_destructive_interference_size to c10/core/alignment.h (#160067) 2025-10-21 14:39:46 +00:00
AllocatorConfig.cpp Fix AllocatorConfig parse roundup division bug (#165304) 2025-10-19 15:34:44 +00:00
AllocatorConfig.h Move allocation size config to AllocatorConfig for cross-allocator sharing (#159553) 2025-10-22 01:48:56 +00:00
AutogradState.cpp
AutogradState.h
Backend.h [Code Clean] Replace std::runtime_error with TORCH_CHECK (#165209) 2025-10-22 00:05:22 +00:00
BUILD.bazel
build.bzl Organize BUCK for torch/standalone (#156503) 2025-06-25 22:56:15 +00:00
CachingDeviceAllocator.cpp Add DeviceAllocator as the base device allocator (#138222) 2025-08-08 17:41:10 +00:00
CachingDeviceAllocator.h Add DeviceAllocator as the base device allocator (#138222) 2025-08-08 17:41:10 +00:00
CompileTimeFunctionPointer.h
ConstantSymNodeImpl.cpp
ConstantSymNodeImpl.h
Contiguity.h symbolic cpp channels_last_contiguous (#160402) 2025-09-05 21:40:32 +00:00
CopyBytes.cpp
CopyBytes.h
CPUAllocator.cpp Mark unused parameters in C++ code (#164912) 2025-10-09 06:23:25 +00:00
CPUAllocator.h Mark unused parameters in C++ code (#164912) 2025-10-09 06:23:25 +00:00
DefaultDtype.cpp
DefaultDtype.h
DefaultTensorOptions.h
Device.cpp [Device] Add support for PrivateUse1 device type in parse_type function (#157609) 2025-07-17 01:27:44 +00:00
Device.h [PyTorch Core] MTIA supports arbitrary strides (#157883) 2025-07-11 18:54:21 +00:00
DeviceArray.h
DeviceGuard.h [2/N] Fix clang-tidy readability checks (#164652) 2025-10-06 01:06:01 +00:00
DeviceType.cpp Fix: Use memory_order_relaxed instead of memory_order_relaxed (#159105) 2025-07-25 19:39:04 +00:00
DeviceType.h Migrate DeviceType to torch/headeronly (#163999) 2025-09-30 23:13:27 +00:00
DispatchKey.cpp [MPS] Add boilerplate sparse code support (#157238) 2025-06-30 01:53:45 +00:00
DispatchKey.h Mark unused parameters in C++ code (#164912) 2025-10-09 06:23:25 +00:00
DispatchKeySet.cpp Back out "Do not decompose in functionalization/proxy tensor if autograd wouldn't have decomposed (#164939)" (#165910) 2025-10-21 16:36:38 +00:00
DispatchKeySet.h Mark unused parameters in C++ code (#164912) 2025-10-09 06:23:25 +00:00
DynamicCast.h
Event.h Don't return values in void functions (#164809) 2025-10-08 01:04:14 +00:00
GeneratorImpl.cpp [1/N] Change C-style casts to static_cast or reinterpret_cast (#165750) 2025-10-20 23:27:13 +00:00
GeneratorImpl.h
GradMode.cpp
GradMode.h
InferenceMode.cpp
InferenceMode.h
Layout.h [MPS] coalesce for sparse tensors (#159729) 2025-08-08 13:49:55 +00:00
MemoryFormat.h
OptionalRef.h
PyHandleCache.h
QEngine.h
QScheme.h
RefcountedDeleter.cpp [1/N] Change C-style casts to static_cast or reinterpret_cast (#165750) 2025-10-20 23:27:13 +00:00
RefcountedDeleter.h [BE] fix typos in c10/ (#156078) 2025-06-18 10:24:44 +00:00
SafePyObject.cpp
SafePyObject.h Mark unused parameters in C++ code (#164912) 2025-10-09 06:23:25 +00:00
Scalar.cpp
Scalar.h [Code Clean] Replace std::runtime_error with TORCH_CHECK (#165209) 2025-10-22 00:05:22 +00:00
ScalarType.cpp [Code Clean] Replace std::runtime_error with TORCH_CHECK (#165209) 2025-10-22 00:05:22 +00:00
ScalarType.h Move toUnderlying to headeronly (#165694) 2025-10-22 05:31:16 +00:00
ScalarTypeToTypeMeta.h
Storage.cpp
Storage.h Mark unused parameters in C++ code (#164912) 2025-10-09 06:23:25 +00:00
StorageImpl.cpp
StorageImpl.h [sigmoid] memory planner C10 deps (#151275) 2025-04-24 01:46:32 +00:00
Stream.cpp
Stream.h Mark unused parameters in C++ code (#164912) 2025-10-09 06:23:25 +00:00
StreamGuard.h [2/N] Fix clang-tidy readability checks (#164652) 2025-10-06 01:06:01 +00:00
SymbolicShapeMeta.cpp symbolic cpp channels_last_contiguous (#160402) 2025-09-05 21:40:32 +00:00
SymbolicShapeMeta.h [attempt 2] Compute contiguity symbolically to avoid dde, and introduce c++ sym_is_contiguous (#157472) 2025-07-02 23:12:29 +00:00
SymBool.cpp Avoid DDE in narrow with unbacked start (#166361) 2025-11-01 07:10:23 +00:00
SymBool.h Avoid DDE in narrow with unbacked start (#166361) 2025-11-01 07:10:23 +00:00
SymFloat.cpp
SymFloat.h Mark unused parameters in C++ code (#164912) 2025-10-09 06:23:25 +00:00
SymInt.cpp [1/N] Change C-style casts to static_cast or reinterpret_cast (#165750) 2025-10-20 23:27:13 +00:00
SymInt.h [Conv1d] Check overflow before we compute padding size. (#162363) 2025-10-29 03:27:20 +00:00
SymIntArrayRef.cpp
SymIntArrayRef.h Use sym_eq in _check_rms_norm_inputs_symint (#165112) 2025-10-14 00:06:24 +00:00
SymNodeImpl.cpp
SymNodeImpl.h more sizelike deprecation (#164889) 2025-10-10 03:45:06 +00:00
TensorImpl.cpp [1/N] Remove unused header inclusion (#165763) 2025-10-18 05:23:11 +00:00
TensorImpl.h Mark unused parameters in C++ code (#164912) 2025-10-09 06:23:25 +00:00
TensorOptions.cpp [1/N] Remove unused header inclusion (#165763) 2025-10-18 05:23:11 +00:00
TensorOptions.h Enable readability-redundant-declaration (#143982) 2024-12-31 00:20:10 +00:00
thread_pool.cpp [Code Clean] Replace std::runtime_error with TORCH_CHECK (#165209) 2025-10-22 00:05:22 +00:00
thread_pool.h
UndefinedTensorImpl.cpp Mark unused parameters in C++ code (#164912) 2025-10-09 06:23:25 +00:00
UndefinedTensorImpl.h [attempt 2] Compute contiguity symbolically to avoid dde, and introduce c++ sym_is_contiguous (#157472) 2025-07-02 23:12:29 +00:00
WrapDimMinimal.cpp Bump Clang-tidy to 19.1.4 (#148648) 2025-03-10 17:32:30 +00:00
WrapDimMinimal.h