Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

inline_scheduler's namespace-scope static_assert fails under nvcc (private nested __sender access)

Đang mở Phù hợp với người mới
#2,284 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
65/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
cpp
Lĩnh vực
backend, compilers

Hướng nghiên cứu

Vấn đề nằm trong __inline_scheduler.hpp, nơi một static_assert thất bại dưới nvcc do truy cập riêng tư. Hãy xem dòng static_assert gần cuối tệp. Hiểu kiểu __sender và khái niệm __completes_inline. Cách sửa là bảo vệ static_assert bằng #if !defined(CUDACC). Kiểm tra bằng cách biên dịch bản tái tạo tối thiểu với nvcc sau khi thay đổi.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Summary

Since inline_scheduler gained a private nested __sender type in f4ad47a6 (Aug 2025, P3552 promotion), the namespace-scope check at the bottom of __inline_scheduler.hpp fails to compile under nvcc:

static_assert(__completes_inline<set_value_t, env_of_t<schedule_result_t<inline_scheduler>>>);
error: 'struct stdexec::inline_scheduler::__sender' is private within this context

I know the README already notes stdexec doesn't yet support nvcc, so I'm filing this mainly for visibility/discussion rather than expecting it to be treated as a supported-configuration bug. I also found a closely analogous case in googletest (#4104, "NVCC, lambdas and private TestBody"), where the maintainers closed a very similar report as a compiler bug in an unsupported toolchain and declined to work around it. If the answer here is the same, that's completely understandable, just wanted to put the specific case in front of you in case a narrow guard is welcome.

Repro

Any translation unit compiled with nvcc that transitively includes <stdexec/execution.hpp> hits this, since the assert is unconditional and evaluated at header-parse time, not on first use. Minimal repro:

#include <stdexec/execution.hpp>
int main() {}

Compiled with:

nvcc -std=c++20 --extended-lambda -x cu -c repro.cpp

Environment

  • CUDA 12.9.86 / nvcc
  • GCC 12.2.1 host compiler
  • stdexec main (currently)

Where we hit it

Via HPX (TheHPXProject/hpx), whose hpx/execution.hpp pulls in stdexec/execution.hpp directly. Any .cu test that reaches HPX's execution headers now fails on this. HPX's own recent pattern for this class of issue has been to stop compiling HPX-execution-adjacent code with nvcc at all, splitting kernel-only .cu files from host-side .cpp. That's a reasonable structural fix on our end regardless of what happens here, but this particular failure is narrow enough that it seemed worth raising in case a small guard has value.

Question for maintainers

Since this is a compile-time-only sanity check with no runtime behavior, would a guard like

#if !defined(__CUDACC__)
  static_assert(__completes_inline<set_value_t, env_of_t<schedule_result_t<inline_scheduler>>>);
#endif

be something you'd consider, or would you rather leave this alone given nvcc is explicitly out of scope right now? Either way is fine, just wanted to surface the specific case.

Ngôn ngữ chính
C++
Star
2.4k
Fork
270
Merge trung bình
2 ngày 16 giờ
Pull request đã merge (30 ngày)
43

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của NVIDIA/stdexec

Tất cả issue của NVIDIA/stdexec

Issue tương tự

Thêm issue về C++

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.