Skip to content

Commit 7f4d229

Browse files
authored
Merge branch 'NVIDIA:main' into main
2 parents e18d080 + 45c0f58 commit 7f4d229

File tree

199 files changed

+4215
-3022
lines changed

Some content is hidden

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

199 files changed

+4215
-3022
lines changed

.clang-format

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ AlwaysBreakAfterReturnType: None
2828
AlwaysBreakBeforeMultilineStrings: false
2929
AlwaysBreakTemplateDeclarations: Yes
3030
AttributeMacros: [
31-
STDEXEC_SYSTEM_CONTEXT_INLINE
31+
STDEXEC_PARALLEL_SCHEDULER_INLINE
3232
STDEXEC_IMMOVABLE_NO_UNIQUE_ADDRESS
3333
]
3434
BinPackArguments: false
@@ -71,7 +71,9 @@ EmptyLineAfterAccessModifier: Never
7171
EmptyLineBeforeAccessModifier: Leave
7272
FixNamespaceComments: true
7373
IfMacros: [
74-
'STDEXEC_CATCH'
74+
'STDEXEC_CATCH',
75+
'STDEXEC_IF_CONSTEVAL',
76+
'STDEXEC_IF_NOT_CONSTEVAL'
7577
]
7678
IncludeBlocks: Preserve
7779
IndentAccessModifiers: false

.clang-tidy

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ ImplementationFileExtensions:
1111
- cpp
1212
- cu
1313
HeaderFilterRegex: '^.*[.](h|hpp|cuh)$'
14-
ExcludeHeaderFilterRegex: '^.*__system_context_default_impl_entry[.]hpp$'
14+
ExcludeHeaderFilterRegex: '^.*__parallel_scheduler_default_impl_entry[.]hpp$'
1515
FormatStyle: none
1616
User: eniebler
1717
ExtraArgsBefore: [
18-
'-DSTDEXEC_SYSTEM_CONTEXT_HEADER_ONLY=1',
18+
'-DSTDEXEC_PARALLEL_SCHEDULER_HEADER_ONLY=1',
1919
'-DSTDEXEC_CLANG_TIDY_INVOKED=1',
2020
]
2121
CheckOptions:

.clangd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ CompileFlags:
2121

2222
# The following file assumes a define.
2323
If:
24-
PathMatch: .*/__system_context_default_impl_entry\.hpp
24+
PathMatch: .*/__parallel_scheduler_default_impl_entry\.hpp
2525
CompileFlags:
2626
Add:
27-
- "-DSTDEXEC_SYSTEM_CONTEXT_INLINE=inline"
27+
- "-DSTDEXEC_PARALLEL_SCHEDULER_INLINE=inline"
2828

2929
---
3030

.github/workflows/ci.cpu.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,16 @@ jobs:
2424
- { name: "CPU (clang 16, Debug, TSAN)", build: "Debug", tag: llvm16-cuda12.9, cxxstd: "20", cxxflags: "-fsanitize=thread" }
2525
- { name: "CPU (clang 16, Release)", build: "Release", tag: llvm16-cuda12.9, cxxstd: "20", cxxflags: "-stdlib=libc++" }
2626
- { name: "CPU (clang 16, Release, ASAN)", build: "Release", tag: llvm16-cuda12.9, cxxstd: "20", cxxflags: "-stdlib=libc++ -fsanitize=address -fsanitize-ignorelist=/home/coder/stdexec/sanitizer-ignorelist.txt" }
27-
- { name: "CPU (gcc 11, Debug)", build: "Debug", tag: gcc11-cuda12.9, cxxstd: "20", cxxflags: "", }
28-
- { name: "CPU (gcc 11, Release)", build: "Release", tag: gcc11-cuda12.9, cxxstd: "20", cxxflags: "", }
29-
- { name: "CPU (gcc 11, Release, ASAN)", build: "Release", tag: gcc11-cuda12.9, cxxstd: "20", cxxflags: "-fsanitize=address" }
27+
- { name: "CPU (gcc 12, Debug)", build: "Debug", tag: gcc12-cuda12.9, cxxstd: "20", cxxflags: "", }
28+
- { name: "CPU (gcc 12, Release)", build: "Release", tag: gcc12-cuda12.9, cxxstd: "20", cxxflags: "", }
29+
# With the following config, 2 tests mysteriously time out, but only in CI and not locally.
30+
# - { name: "CPU (gcc 12, Release, ASAN)", build: "Release", tag: gcc12-cuda12.9, cxxstd: "20", cxxflags: "-fsanitize=address" }
3031
- { name: "CPU (gcc 12, Release, TSAN)", build: "Release", tag: gcc12-cuda12.9, cxxstd: "20", cxxflags: "-fsanitize=thread" }
3132
- { name: "CPU (gcc 13, Debug)", build: "Debug", tag: gcc13-cuda12.9, cxxstd: "20", cxxflags: "", }
3233
- { name: "CPU (gcc 14, Debug)", build: "Debug", tag: gcc14-cuda12.9, cxxstd: "20", cxxflags: "", }
3334
- { name: "CPU (gcc 14, Debug, ASAN)", build: "Debug", tag: gcc14-cuda12.9, cxxstd: "20", cxxflags: "-fsanitize=address" }
3435
- { name: "CPU (gcc 14, Debug, TSAN)", build: "Debug", tag: gcc14-cuda12.9, cxxstd: "20", cxxflags: "-fsanitize=thread" }
36+
- { name: "CPU (gcc 14, Release, ASAN)", build: "Release", tag: gcc14-cuda12.9, cxxstd: "20", cxxflags: "-fsanitize=address" }
3537
- { name: "CPU (gcc 14, Release, LEAK)", build: "Release", tag: gcc14-cuda12.9, cxxstd: "20", cxxflags: "-fsanitize=leak", }
3638
- { name: "CPU (gcc 14, Release, c++23)", build: "Release", tag: gcc14-cuda12.9, cxxstd: "23", cxxflags: "", }
3739
container:

.github/workflows/style.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,5 @@ jobs:
2323
- run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
2424
- shell: bash
2525
run: |
26+
clang-format-21 --version
2627
git ls-files '*.[ch]' '*.[ch]pp' '*.cu' '*.cuh' | xargs clang-format-21 --dry-run --Werror

.github/workflows/test-windows.ps1

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ Invoke-NativeCommand cmake -B $BuildDirectory -G Ninja `
2424
"-DCMAKE_MSVC_DEBUG_INFORMATION_FORMAT:STRING=Embedded" `
2525
"-DSTDEXEC_ENABLE_ASIO:BOOL=TRUE" `
2626
"-DSTDEXEC_ASIO_IMPLEMENTATION:STRING=boost" `
27+
"-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON" `
2728
"-DSTDEXEC_BUILD_TESTS:BOOL=TRUE" .
2829
Invoke-NativeCommand cmake --build $BuildDirectory
2930
Invoke-NativeCommand ctest --test-dir $BuildDirectory --output-on-failure --verbose --timeout 60

CMakeLists.txt

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,9 @@ rapids_cmake_build_type(Release)
9191

9292
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules")
9393

94-
# Disable the tests by default unless it is the top level project and build testing was specified.
95-
if (STDEXEC_MAIN_PROJECT AND BUILD_TESTING)
94+
# Disable the tests by default unless it is the top level project or build testing was
95+
# specified.
96+
if (STDEXEC_MAIN_PROJECT OR BUILD_TESTING)
9697
set(STDEXEC_BUILD_TESTS_DEFAULT ON)
9798
else()
9899
set(STDEXEC_BUILD_TESTS_DEFAULT OFF)
@@ -108,6 +109,7 @@ set(BUILD_TESTING ${STDEXEC_BUILD_TESTS})
108109
if (STDEXEC_BUILD_TESTS)
109110
# CTest automatically calls enable_testing() if BUILD_TESTING is ON
110111
# https://cmake.org/cmake/help/latest/module/CTest.html#module:CTest
112+
list(APPEND CMAKE_CTEST_ARGUMENTS "--output-on-failure")
111113
include(CTest)
112114
endif()
113115

@@ -434,23 +436,29 @@ if (STDEXEC_ENABLE_NUMA)
434436
target_compile_definitions(stdexec INTERFACE STDEXEC_ENABLE_NUMA)
435437
endif()
436438

437-
option(STDEXEC_BUILD_SYSTEM_CONTEXT "Build the system_context compiled library" OFF)
439+
option(STDEXEC_BUILD_PARALLEL_SCHEDULER "Build the parallel_scheduler compiled library" OFF)
440+
if (DEFINED STDEXEC_BUILD_SYSTEM_CONTEXT)
441+
message(DEPRECATION "STDEXEC_BUILD_SYSTEM_CONTEXT is deprecated. Use STDEXEC_BUILD_PARALLEL_SCHEDULER instead.")
442+
set(STDEXEC_BUILD_PARALLEL_SCHEDULER ${STDEXEC_BUILD_SYSTEM_CONTEXT})
443+
endif()
438444

439-
if(STDEXEC_BUILD_SYSTEM_CONTEXT)
440-
set(SYSTEM_CONTEXT_SOURCES src/system_context/system_context.cpp)
441-
add_library(system_context ${SYSTEM_CONTEXT_SOURCES})
442-
target_compile_features(system_context PUBLIC cxx_std_20)
443-
set_target_properties(system_context PROPERTIES
445+
if(STDEXEC_BUILD_PARALLEL_SCHEDULER)
446+
set(STDEXEC_PARALLEL_SCHEDULER_SOURCES src/parallel_scheduler/parallel_scheduler.cpp)
447+
add_library(parallel_scheduler ${STDEXEC_PARALLEL_SCHEDULER_SOURCES})
448+
target_compile_features(parallel_scheduler PUBLIC cxx_std_20)
449+
set_target_properties(parallel_scheduler PROPERTIES
444450
CXX_STANDARD 20
445451
CXX_STANDARD_REQUIRED ON
446452
CXX_EXTENSIONS OFF)
447-
target_compile_options(system_context PUBLIC
453+
target_compile_options(parallel_scheduler PUBLIC
448454
$<$<COMPILE_LANG_AND_ID:CXX,MSVC>:/Zc:__cplusplus /Zc:preprocessor /Zc:externConstexpr>
449455
)
450-
add_library(STDEXEC::system_context ALIAS system_context)
451-
target_link_libraries(system_context PUBLIC stdexec)
452-
endif()
456+
target_link_libraries(parallel_scheduler PUBLIC stdexec)
453457

458+
add_library(STDEXEC::parallel_scheduler ALIAS parallel_scheduler)
459+
add_library(system_context ALIAS parallel_scheduler)
460+
add_library(STDEXEC::system_context ALIAS parallel_scheduler)
461+
endif()
454462

455463
option(STDEXEC_ENABLE_IO_URING "Enable the use of the io_uring scheduler on Linux" OFF)
456464

@@ -516,8 +524,8 @@ if(STDEXEC_INSTALL)
516524
include(CPack)
517525

518526
set(stdexec_install_targets stdexec)
519-
if(STDEXEC_BUILD_SYSTEM_CONTEXT)
520-
list(APPEND stdexec_install_targets system_context)
527+
if(STDEXEC_BUILD_PARALLEL_SCHEDULER)
528+
list(APPEND stdexec_install_targets parallel_scheduler)
521529
endif()
522530

523531
install(TARGETS ${stdexec_install_targets}

CODE_OF_CONDUCT.md

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Overview
4+
5+
Define the code of conduct followed and enforced for __STDEXEC__.
6+
7+
### Intended audience
8+
9+
Community | Developers | Project Leads
10+
11+
## Our Pledge
12+
13+
In the interest of fostering an open and welcoming environment, we as
14+
contributors and maintainers pledge to making participation in our project and
15+
our community a harassment-free experience for everyone, regardless of age, body
16+
size, disability, ethnicity, sex characteristics, gender identity and expression,
17+
level of experience, education, socio-economic status, nationality, personal
18+
appearance, race, religion, or sexual identity and orientation.
19+
20+
## Our Standards
21+
22+
Examples of behavior that contributes to creating a positive environment
23+
include:
24+
25+
* Using welcoming and inclusive language
26+
* Being respectful of differing viewpoints and experiences
27+
* Gracefully accepting constructive criticism
28+
* Focusing on what is best for the community
29+
* Showing empathy towards other community members
30+
31+
Examples of unacceptable behavior by participants include:
32+
33+
* The use of sexualized language or imagery and unwelcome sexual attention or
34+
advances
35+
* Trolling, insulting/derogatory comments, and personal or political attacks
36+
* Public or private harassment
37+
* Publishing others' private information, such as a physical or electronic
38+
address, without explicit permission
39+
* Other conduct which could reasonably be considered inappropriate in a
40+
professional setting
41+
42+
## Our Responsibilities
43+
44+
Project maintainers are responsible for clarifying the standards of acceptable
45+
behavior and are expected to take appropriate and fair corrective action in
46+
response to any instances of unacceptable behavior.
47+
48+
Project maintainers have the right and responsibility to remove, edit, or
49+
reject comments, commits, code, wiki edits, issues, and other contributions
50+
that are not aligned to this Code of Conduct, or to ban temporarily or
51+
permanently any contributor for other behaviors that they deem inappropriate,
52+
threatening, offensive, or harmful.
53+
54+
## Scope
55+
56+
This Code of Conduct applies both within project spaces and in public spaces
57+
when an individual is representing the project or its community. Examples of
58+
representing a project or community include using an official project e-mail
59+
address, posting via an official social media account, or acting as an appointed
60+
representative at an online or offline event. Representation of a project may be
61+
further defined and clarified by project maintainers.
62+
63+
## Enforcement
64+
65+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
66+
reported by contacting GitHub_Conduct@nvidia.com. All complaints will be reviewed and
67+
investigated and will result in a response that is deemed necessary and appropriate
68+
to the circumstances. The project team is obligated to maintain confidentiality with
69+
regard to the reporter of an incident. Further details of specific enforcement policies
70+
may be posted separately.
71+
72+
Project maintainers who do not follow or enforce the Code of Conduct in good
73+
faith may face temporary or permanent repercussions as determined by other
74+
members of the project's leadership.
75+
76+
## Attribution
77+
78+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
79+
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
80+
81+
[homepage]: https://www.contributor-covenant.org
82+
83+
For answers to common questions about this code of conduct, see
84+
https://www.contributor-covenant.org/faq
85+

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ below](#nvhpc-sdk) for more details).
9797
`stdexec` requires compiling with C++20 (`-std=c++20`) but otherwise does not have any
9898
dependencies and only requires a sufficiently new compiler:
9999

100-
- gcc 11+
100+
- gcc 12+
101101
- clang 16+
102102
- MSVC 14.43+
103103
- XCode 16+

conanfile.py

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,13 @@ class StdexecPackage(ConanFile):
1515

1616
settings = "os", "arch", "compiler", "build_type"
1717
options = {
18+
# Legacy name for backward compatibility. Use parallel_scheduler instead.
1819
"system_context": [True, False],
20+
"parallel_scheduler": [True, False],
1921
}
2022
default_options = {
2123
"system_context": False,
24+
"parallel_scheduler": False,
2225
}
2326
exports_sources = (
2427
"include/*",
@@ -32,6 +35,8 @@ class StdexecPackage(ConanFile):
3235

3336
def configure(self):
3437
if self.options.system_context:
38+
self.options.parallel_scheduler = True
39+
if self.options.parallel_scheduler:
3540
self.package_type = "static-library"
3641
else:
3742
self.package_type = "header-library"
@@ -49,19 +54,19 @@ def layout(self):
4954

5055
def build(self):
5156
tests = "OFF" if self.conf.get("tools.build:skip_test", default=False) else "ON"
52-
system_context = "ON" if self.options.system_context else "OFF"
57+
parallel_scheduler = "ON" if self.options.parallel_scheduler else "OFF"
5358

5459
cmake = CMake(self)
5560
cmake.configure(variables={
5661
"STDEXEC_BUILD_TESTS": tests,
5762
"STDEXEC_BUILD_EXAMPLES": tests,
58-
"STDEXEC_BUILD_SYSTEM_CONTEXT": system_context,
63+
"STDEXEC_BUILD_PARALLEL_SCHEDULER": parallel_scheduler,
5964
})
6065
cmake.build()
6166
cmake.test()
6267

6368
def package_id(self):
64-
if not self.info.options.system_context:
69+
if not self.info.options.parallel_scheduler:
6570
# Clear settings because this package is header-only.
6671
self.info.clear()
6772

@@ -73,8 +78,8 @@ def package_info(self):
7378
self.cpp_info.set_property("cmake_file_name", "P2300")
7479
self.cpp_info.set_property("cmake_target_name", "P2300::P2300")
7580
self.cpp_info.set_property("cmake_target_aliases", ["STDEXEC::stdexec"])
76-
if self.options.system_context:
77-
self.cpp_info.components["system_context"].libs = ["system_context"]
78-
self.cpp_info.components["system_context"].set_property(
79-
"cmake_target_name", "STDEXEC::system_context"
81+
if self.options.parallel_scheduler:
82+
self.cpp_info.components["parallel_scheduler"].libs = ["parallel_scheduler"]
83+
self.cpp_info.components["parallel_scheduler"].set_property(
84+
"cmake_target_name", "STDEXEC::parallel_scheduler"
8085
)

0 commit comments

Comments
 (0)