[PR #1532] [CLOSED] prefill: guard atomic::wait/notify_all so GCC 10 builds again (#1488) #3513

Closed
opened 2026-11-07 14:42:00 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/1532
Author: @nekomario28
Created: 10/8/2026
Status: ❌ Closed

Base: main ← Head: fix-1488-atomic-wait-guard


📝 Commits (1)

  • b63a331 prefill: guard C++20 atomic::wait/notify_all behind __cpp_lib_atomic_wait (#1488)

📊 Changes

1 file changed (+6 additions, -0 deletions)

View changed files

📝 src/prefill/prefill.cpp (+6 -0)

📄 Description

Summary

  • Stager (from #1057) waits on std::atomic<int>::wait / notify_all — a C++20 library feature libstdc++ only ships from GCC 11. GCC 10 passes CMAKE_CXX_STANDARD 20 yet fails at the three call sites in src/prefill/prefill.cpp, so Ubuntu 20.04 (focal, GCC 10 is the newest packaged compiler) and Debian 11 cannot build 0.1.40.2+.
  • Guard all three call sites with __cpp_lib_atomic_wait: toolchains without it take the pre-#1057 yield spin, and the notify_all() calls are skipped on that path — they only wake threads blocked in wait(), which cannot exist there.
  • Keeps the documented "GCC < 11 builds" configuration working; behavior on GCC 11+ is unchanged.

Fixes #1488 (implements the reporter's suggested option 2; no minimum-version bump needed since the spin fallback restores the old behavior).

Test plan

  • g++ -std=c++20 -fsyntax-only on prefill.cpp via the HIP compat include path (wait path): clean
  • same file with #undef __cpp_lib_atomic_wait injected after the includes (fallback path): clean
  • CI: HIP/CUDA build jobs green
  • Reporter's GCC 10 environment (Ubuntu 20.04): build reaches past strata_prefill

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Niko1221/Strata/pull/1532 **Author:** [@nekomario28](https://github.com/nekomario28) **Created:** 10/8/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix-1488-atomic-wait-guard` --- ### 📝 Commits (1) - [`b63a331`](https://github.com/Niko1221/Strata/commit/b63a3315497273a5a79ce7a639d0fbfb8e6b15c3) prefill: guard C++20 atomic::wait/notify_all behind __cpp_lib_atomic_wait (#1488) ### 📊 Changes **1 file changed** (+6 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `src/prefill/prefill.cpp` (+6 -0) </details> ### 📄 Description ## Summary - `Stager` (from #1057) waits on `std::atomic<int>::wait` / `notify_all` — a C++20 **library** feature libstdc++ only ships from GCC 11. GCC 10 passes `CMAKE_CXX_STANDARD 20` yet fails at the three call sites in `src/prefill/prefill.cpp`, so Ubuntu 20.04 (focal, GCC 10 is the newest packaged compiler) and Debian 11 cannot build 0.1.40.2+. - Guard all three call sites with `__cpp_lib_atomic_wait`: toolchains without it take the pre-#1057 yield spin, and the `notify_all()` calls are skipped on that path — they only wake threads blocked in `wait()`, which cannot exist there. - Keeps the documented "GCC < 11 builds" configuration working; behavior on GCC 11+ is unchanged. Fixes #1488 (implements the reporter's suggested option 2; no minimum-version bump needed since the spin fallback restores the old behavior). ## Test plan - [x] `g++ -std=c++20 -fsyntax-only` on `prefill.cpp` via the HIP compat include path (wait path): clean - [x] same file with `#undef __cpp_lib_atomic_wait` injected after the includes (fallback path): clean - [ ] CI: HIP/CUDA build jobs green - [ ] Reporter's GCC 10 environment (Ubuntu 20.04): build reaches past `strata_prefill` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-07 14:42:00 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#3513
No description provided.