Repository navigation
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/185633
Note: Links to docs will display an error until the docs builds have been completed. ⏳ 1 Pending, 2 Unrelated FailuresAs of commit 8c033e3 with merge base 79a1684 ( UNSTABLE - The following jobs are marked as unstable, possibly due to flakiness on trunk:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
I've tried it yesterday already: it will not work on MacOS unfortunately |
I see, thank you for checking! I remember there being a reason why I kept the deprecated APIs too, but I couldn't remember the exact CI failure. Should I add back both versions to this PR in this case? |
|
Sigh yeah don't think this works sadly... |
@Skylion007 does the changes looks fine now? it should resolve the errors we were seeing. |
|
CI LGTM! |
|
Still failing on trunk sadly. |
|
Oh weird, trunk failures may ne unrelated? |
yes, seems unrelated |
|
@claude review if PR and CI runs looks fine. |
|
Claude finished @aditew01's task in 1m 15s —— View job Review of PR #185633
Code ReviewOverall: The PR looks good. It correctly addresses the C++20 deprecation of the free-function Header ( The feature-test macro gate at lines 13-16 is correct: #if defined(__cpp_lib_atomic_shared_ptr) && \
__cpp_lib_atomic_shared_ptr >= 201711L
#define TORCH_RPC_HAS_ATOMIC_SHARED_PTR 1
#endifThis properly checks for the C++20 feature macro and falls back gracefully on toolchains that don't provide it (e.g., Apple's libc++ as @malfet noted). The Implementation ( All four usage sites are correctly updated:
The semantics are preserved identically — same memory ordering (sequentially consistent by default in both APIs), same logic flow. Minor nit: The cppreference comment link in CI Status
The 2 failures are Notably, VerdictPR looks good to merge. The code is correct, the feature gating is proper, CI failures are unrelated trunk breakages, and the macOS concern raised by @malfet is resolved by the conditional compilation approach in the second commit. |
|
@pytorchbot rebase -b main |
|
@pytorchbot merge -i |
|
@pytorchbot started a rebase job onto refs/remotes/origin/main. Check the current status here |
`std::atomic_load`, `std::atomic_exchange`, and `std::atomic_compare_exchange_*` overloads for `std::shared_ptr<T>` are deprecated since C++20. Newer GCC/libstdc++ warns on these deprecated overloads, and warning-as-error builds can turn this into a build failure. This commit updates `RpcAgent::currentRpcAgent_` from a plain `std::shared_ptr<RpcAgent>` accessed through the deprecated free-function atomic API to `std::atomic<std::shared_ptr<RpcAgent>>` accessed through the modern member API.
Use `std::atomic<std::shared_ptr<...>>` only when the standard library supports it, and fall back to the older shared_ptr atomic APIs otherwise.
|
Successfully rebased |
eb21d38 to
8c033e3
Compare
|
|
|
@pytorchbot merge -i |
Merge startedYour change will be merged while ignoring the following 0 checks: Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Based on #180850, this PR updates AArch64 CI toolchains to GCC15. The necessary GCC15 enablement fixes are part of #187167 and #185633. Pull Request resolved: #182016 Approved by: https://github.com/aditew01, https://github.com/Skylion007 Co-authored-by: Aditya Tewari <[email protected]>
`std::atomic_load`, `std::atomic_exchange`, and `std::atomic_compare_exchange_*` overloads for `std::shared_ptr<T>` are deprecated since C++20 ([ref](https://en.cppreference.com/cpp/memory/shared_ptr/atomic)). Newer GCC/libstdc++ warns on these deprecated overloads, and warning-as-error builds can turn this into a build failure, as encountered in pytorch#182016. This PR updates `RpcAgent::currentRpcAgent_` from a plain `std::shared_ptr<RpcAgent>` accessed through the deprecated free-function atomic API to `std::atomic<std::shared_ptr<RpcAgent>>` accessed through the modern member API when `__cpp_lib_atomic_shared_ptr` is available. The implementation keeps the legacy free-function path on older standard libraries that do not provide the C++20 `std::atomic<std::shared_ptr<T>>` specialization. cc. @aditew01 @malfet Pull Request resolved: pytorch#185633 Approved by: https://github.com/Skylion007, https://github.com/cyyever
Based on pytorch#180850, this PR updates AArch64 CI toolchains to GCC15. The necessary GCC15 enablement fixes are part of pytorch#187167 and pytorch#185633. Pull Request resolved: pytorch#182016 Approved by: https://github.com/aditew01, https://github.com/Skylion007 Co-authored-by: Aditya Tewari <[email protected]>
`std::atomic_load`, `std::atomic_exchange`, and `std::atomic_compare_exchange_*` overloads for `std::shared_ptr<T>` are deprecated since C++20 ([ref](https://en.cppreference.com/cpp/memory/shared_ptr/atomic)). Newer GCC/libstdc++ warns on these deprecated overloads, and warning-as-error builds can turn this into a build failure, as encountered in pytorch#182016. This PR updates `RpcAgent::currentRpcAgent_` from a plain `std::shared_ptr<RpcAgent>` accessed through the deprecated free-function atomic API to `std::atomic<std::shared_ptr<RpcAgent>>` accessed through the modern member API when `__cpp_lib_atomic_shared_ptr` is available. The implementation keeps the legacy free-function path on older standard libraries that do not provide the C++20 `std::atomic<std::shared_ptr<T>>` specialization. cc. @aditew01 @malfet Pull Request resolved: pytorch#185633 Approved by: https://github.com/Skylion007, https://github.com/cyyever
Based on pytorch#180850, this PR updates AArch64 CI toolchains to GCC15. The necessary GCC15 enablement fixes are part of pytorch#187167 and pytorch#185633. Pull Request resolved: pytorch#182016 Approved by: https://github.com/aditew01, https://github.com/Skylion007 Co-authored-by: Aditya Tewari <[email protected]>
std::atomic_load,std::atomic_exchange, andstd::atomic_compare_exchange_*overloads forstd::shared_ptr<T>are deprecated since C++20 (ref). Newer GCC/libstdc++ warns on these deprecated overloads, and warning-as-error builds can turn this into a build failure, as encountered in #182016.This PR updates
RpcAgent::currentRpcAgent_from a plainstd::shared_ptr<RpcAgent>accessed through the deprecated free-function atomic API tostd::atomic<std::shared_ptr<RpcAgent>>accessed through the modern member API when__cpp_lib_atomic_shared_ptris available.The implementation keeps the legacy free-function path on older standard libraries that do not provide the C++20
std::atomic<std::shared_ptr<T>>specialization.cc. @aditew01 @malfet