8000 Update on "[dynamo] handle 3.13.0 __dict__ watcher bug" · pytorch/pytorch@797aa18 · GitHub
[go: up one dir, main page]

Skip to content

Commit 797aa18

Browse files
committed
Update on "[dynamo] handle 3.13.0 __dict__ watcher bug"
python/cpython#116115 introduced a bug (python/cpython#125608) where changing the attributes of an object may not fire the dict watchers registered to the object's `__dict__`. It has been fixed by python/cpython#125611 but will only be in 3.13.1+. This PR disables the dict watcher guard shortcut for `__dict__`s on 3.13.0 and warns the user to try using 3.13.1+ instead. We also added a simple test to check for this functionality in the future. cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx chenyang78 kadeng chauhang amjames rec [ghstack-poisoned]
2 parents 7a7c74f + 679f84b commit 797aa18

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+1069
-450
lines changed

.circleci/scripts/binary_populate_env.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,12 @@ if [[ "$PACKAGE_TYPE" =~ .*wheel.* && -n "$PYTORCH_BUILD_VERSION" && "$PYTORCH_B
114114
fi
115115
fi
116116

117+
USE_GLOO_WITH_OPENSSL="ON"
118+
if [[ "$GPU_ARCH_TYPE" =~ .*aarch64.* ]]; then
119+
USE_GLOO_WITH_OPENSSL="OFF"
120+
USE_GOLD_LINKER="OFF"
121+
fi
122+
117123
cat >"$envfile" <<EOL
118124
# =================== The following code will be executed inside Docker container ===================
119125
export TZ=UTC
@@ -153,7 +159,7 @@ export DOCKER_IMAGE="$DOCKER_IMAGE"
153159
154160
155161
export USE_GOLD_LINKER="${USE_GOLD_LINKER}"
156-
export USE_GLOO_WITH_OPENSSL="ON"
162+
export USE_GLOO_WITH_OPENSSL="${USE_GLOO_WITH_OPENSSL}"
157163
# =================== The above code will be executed inside Docker container ===================
158164
EOL
159165

.github/lf-scale-config.yml

Lines changed: 0 additions & 251 deletions
This file was deleted.

.github/workflows/_binary-build-linux.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ jobs:
271271
)
272272
docker exec -t -w "${PYTORCH_ROOT}" "${container_name}" bash -c "bash .circleci/scripts/binary_populate_env.sh"
273273
if [[ ${BUILD_ENVIRONMENT} == *"aarch64"* ]]; then
274-
docker exec -t "${container_name}" bash -c "bash /builder/aarch64_linux/aarch64_ci_build.sh"
274+
docker exec -t "${container_name}" bash -c "source ${BINARY_ENV_FILE} && bash /builder/aarch64_linux/aarch64_ci_build.sh"
275275
elif [[ ${{ inputs.PACKAGE_TYPE }} == "manywheel" || ${{ inputs.PACKAGE_TYPE }} == "libtorch" ]]; then
276276
docker exec -t "${container_name}" bash -c "source ${BINARY_ENV_FILE} && bash /pytorch/.ci/${{ inputs.PACKAGE_TYPE }}/build.sh"
277277
else

aten/src/ATen/DLConvertor.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,10 @@ namespace at {
1313
TORCH_API ScalarType toScalarType(const DLDataType& dtype);
1414
TORCH_API DLManagedTensor* toDLPack(const Tensor& src);
1515
TORCH_API Tensor fromDLPack(DLManagedTensor* src);
16-
17-
[[deprecated("Please migrate to a non-const variant")]] inline Tensor fromDLPack(
18-
const DLManagedTensor* src) {
16+
C10_DEPRECATED_MESSAGE("Please migrate to a non-const variant")
17+
inline Tensor fromDLPack(const DLManagedTensor* src) {
1918
return fromDLPack(const_cast<DLManagedTensor*>(src));
2019
}
21-
2220
TORCH_API Tensor
2321
fromDLPack(DLManagedTensor* src, std::function<void(void*)> deleter);
2422
TORCH_API DLDataType getDLDataType(const Tensor& t);

aten/src/ATen/Dispatch.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -104,23 +104,23 @@ inline at::ScalarType scalar_type(at::ScalarType s) {
104104
return s;
105105
}
106106

107-
[[deprecated(
107+
C10_DEPRECATED_MESSAGE(
108108
"passing at::DeprecatedTypeProperties to an AT_DISPATCH macro is deprecated, "
109-
"pass an at::ScalarType instead")]] inline at::ScalarType
110-
scalar_type(const at::DeprecatedTypeProperties& t) {
109+
"pass an at::ScalarType instead")
110+
inline at::ScalarType scalar_type(const at::DeprecatedTypeProperties& t) {
111111
return t.scalarType();
112112
}
113113

114-
[[deprecated(
114+
C10_DEPRECATED_MESSAGE(
115115
"AT_DISPATCH_ALL_TYPES_AND_HALF is deprecated, "
116-
"use AT_DISPATCH_ALL_TYPES_AND(at::ScalarType::Half, ...) instead")]] inline void
117-
deprecated_AT_DISPATCH_ALL_TYPES_AND_HALF() {}
116+
"use AT_DISPATCH_ALL_TYPES_AND(at::ScalarType::Half, ...) instead")
117+
inline void deprecated_AT_DISPATCH_ALL_TYPES_AND_HALF() {}
118118

119-
[[deprecated(
119+
C10_DEPRECATED_MESSAGE(
120120
"AT_DISPATCH_ALL_TYPES_AND_HALF_AND_COMPLEX is deprecated, "
121121
"use AT_DISPATCH_ALL_TYPES_AND_COMPLEX_AND(at::ScalarType::Half, ...) "
122-
"instead")]] inline void
123-
deprecated_AT_DISPATCH_ALL_TYPES_AND_HALF_AND_COMPLEX() {}
122+
"instead")
123+
inline void deprecated_AT_DISPATCH_ALL_TYPES_AND_HALF_AND_COMPLEX() {}
124124

125125
} // namespace detail
126126

aten/src/ATen/MemoryOverlap.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ MemOverlapStatus get_overlap_status(const TensorImpl* a, const TensorImpl* b) {
6161
// same pointer across multiple storages there are many
6262
// similar situations (e.g., storage().data() == storage().data()+1)
6363
// which we will miss.
64-
auto a_storage = a->unsafe_storage();
64+
const auto& a_storage = a->unsafe_storage();
6565
if (a_storage && a_storage.is_alias_of(b->unsafe_storage())) {
6666
const auto a_begin = static_cast<const char*>(a->data());
6767
const auto a_end = a_begin + a->numel() * a->itemsize();

0 commit comments

Comments
 (0)
0