Skip to content

Commit 53bf2b1

Browse files
committed
Bump PyTorch pin to 20250706
Hash is from https://hud2.pytorch.org/hud/pytorch/pytorch/nightly/0 . Picking up rename of torch/standalone in this one. ghstack-source-id: f99c1e4 ghstack-comment-id: 3046642602 Pull-Request-resolved: #12253
1 parent d952326 commit 53bf2b1

File tree

12 files changed

+27
-13
lines changed

12 files changed

+27
-13
lines changed

.ci/docker/ci_commit_pins/pytorch.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
9b498d3bb28b8e3411ce464dd2755c5b96d92c8f
1+
7cda4017ddda554752e89069ae205be5e8388f59

.ci/scripts/check_c10_sync.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ pushd pytorch
1212
git checkout "$pytorch_pin"
1313
popd
1414
"$(dirname "${BASH_SOURCE[0]}")"/compare_dirs.sh runtime/core/portable_type/c10/c10 pytorch/c10
15-
"$(dirname "${BASH_SOURCE[0]}")"/compare_dirs.sh runtime/core/portable_type/c10/torch/standalone pytorch/torch/standalone
15+
"$(dirname "${BASH_SOURCE[0]}")"/compare_dirs.sh runtime/core/portable_type/c10/torch/headeronly pytorch/torch/headeronly

install_requirements.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def python_is_compatible():
7171
#
7272
# NOTE: If you're changing, make the corresponding change in .ci/docker/ci_commit_pins/pytorch.txt
7373
# by picking the hash from the same date in https://hud.pytorch.org/hud/pytorch/pytorch/nightly/
74-
NIGHTLY_VERSION = "dev20250625"
74+
NIGHTLY_VERSION = "dev20250706"
7575

7676

7777
def install_requirements(use_pytorch_nightly):
@@ -89,7 +89,7 @@ def install_requirements(use_pytorch_nightly):
8989
# Setting use_pytorch_nightly to false to test the pinned PyTorch commit. Note
9090
# that we don't need to set any version number there because they have already
9191
# been installed on CI before this step, so pip won't reinstall them
92-
f"torch==2.8.0.{NIGHTLY_VERSION}" if use_pytorch_nightly else "torch",
92+
f"torch==2.9.0.{NIGHTLY_VERSION}" if use_pytorch_nightly else "torch",
9393
]
9494

9595
# Install the requirements for core ExecuTorch package.
@@ -151,7 +151,7 @@ def install_optional_example_requirements(use_pytorch_nightly):
151151
print("Installing torch domain libraries")
152152
DOMAIN_LIBRARIES = [
153153
(
154-
f"torchvision==0.23.0.{NIGHTLY_VERSION}"
154+
f"torchvision==0.24.0.{NIGHTLY_VERSION}"
155155
if use_pytorch_nightly
156156
else "torchvision"
157157
),

runtime/core/portable_type/c10/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ would cause all headers in that directory to be includeable with
1212
`runtime/core/portable_type/complex.h`, which would shadow the C99
1313
`complex.h` standard header.
1414

15-
`torch/standalone` has been added as an extra "even more bottom of
15+
`torch/headeronly` has been added as an extra "even more bottom of
1616
stack" directory in PyTorch, so we have to add it to our sync
1717
here. The extra "stutter" c10 directory causing `c10/torch/standlone`
1818
is unfortunately awkward; perhaps we can rename the top-level

runtime/core/portable_type/c10/c10/macros/Export.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#include <c10/macros/cmake_macros.h>
66
#endif // C10_USING_CUSTOM_GENERATED_MACROS
77

8-
#include <torch/standalone/macros/Export.h>
8+
#include <torch/headeronly/macros/Export.h>
99

1010
// This one is being used by libtorch.so
1111
#ifdef CAFFE2_BUILD_MAIN_LIB

runtime/core/portable_type/c10/c10/macros/Macros.h

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,21 @@ constexpr uint32_t CUDA_THREADS_PER_BLOCK_FALLBACK = 256;
312312
#endif
313313

314314
#if defined(USE_ROCM)
315-
#define C10_WARP_SIZE warpSize // = 64 or 32 (Defined in hip_runtime.h)
315+
// C10_WARP_SIZE is only allowed for device code.
316+
// Host code _must_ use at::cuda::warp_size()
317+
// HIP header used to define warpSize as a constexpr that was either 32 or 64
318+
// depending on the target device, and then always set it to 64 for host code.
319+
// Host pass of HIP compiler needs C10_WARP_SIZE defined to _something_ so we
320+
// set it to something unreasonable to trigger obvious host code errors.
321+
#if defined(__HIP_DEVICE_COMPILE__)
322+
#if defined(__GFX9__)
323+
static constexpr int C10_WARP_SIZE = 64;
324+
#else // __GFX9__
325+
static constexpr int C10_WARP_SIZE = 32;
326+
#endif // __GFX9__
327+
#else
328+
static constexpr int C10_WARP_SIZE = 1;
329+
#endif // __HIP_DEVICE_COMPILE__
316330
#else
317331
#define C10_WARP_SIZE 32
318332
#endif

runtime/core/portable_type/c10/c10/targets.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ def define_common_targets():
125125
"@EXECUTORCH_CLIENTS",
126126
],
127127
exported_deps = [
128-
"//executorch/runtime/core/portable_type/c10/torch/standalone:torch_standalone_headers",
128+
"//executorch/runtime/core/portable_type/c10/torch/headeronly:torch_headeronly",
129129
] + select({
130130
"DEFAULT": [],
131131
# Half-inl.h depends on vec_half.h from ATen, but only when building for x86.

runtime/core/portable_type/c10/c10/util/irange.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ struct integer_iterator {
2424
using pointer = I*;
2525
using reference = I&;
2626

27-
explicit constexpr integer_iterator(I value) : value(value) {}
27+
explicit constexpr integer_iterator(I val) : value(val) {}
2828

2929
constexpr I operator*() const {
3030
return value;

runtime/core/portable_type/c10/torch/standalone/targets.bzl renamed to runtime/core/portable_type/c10/torch/headeronly/targets.bzl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ def define_common_targets():
88
"""
99

1010
runtime.cxx_library(
11-
name = "torch_standalone_headers",
11+
name = "torch_headeronly",
1212
exported_headers = glob(["**/*.h"]),
13-
header_namespace = "torch/standalone",
13+
header_namespace = "torch/headeronly",
1414
)

scripts/build_apple_frameworks.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ sed -i '' '1i\
180180
' \
181181
"$HEADERS_ABSOLUTE_PATH/executorch/runtime/core/portable_type/c10/c10/macros/Macros.h" \
182182
"$HEADERS_ABSOLUTE_PATH/executorch/runtime/core/portable_type/c10/c10/macros/Export.h" \
183-
"$HEADERS_ABSOLUTE_PATH/executorch/runtime/core/portable_type/c10/torch/standalone/macros/Export.h"
183+
"$HEADERS_ABSOLUTE_PATH/executorch/runtime/core/portable_type/c10/torch/headeronly/macros/Export.h"
184184

185185
cp -r $HEADERS_ABSOLUTE_PATH/executorch/runtime/core/portable_type/c10/c10 "$HEADERS_ABSOLUTE_PATH/"
186186
cp -r $HEADERS_ABSOLUTE_PATH/executorch/runtime/core/portable_type/c10/torch "$HEADERS_ABSOLUTE_PATH/"

0 commit comments

Comments
 (0)