Skip to content
Merged
Show file tree
Hide file tree
Changes from 24 commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
27e0d61
[STF] Extract standalone __places project from __stf/places
caugonnet Mar 26, 2026
a12219d
Remove unnecessary interpreted_execution_policy.cuh include from __pl…
caugonnet Mar 26, 2026
314272f
Replace STF SCOPE(exit) with cudax scope_exit in data_place_impl
andralex Mar 27, 2026
5bbf017
Add missing occupancy.cuh include in slice_reduction_ops.cuh
andralex Mar 27, 2026
70621b3
Merge branch 'main' into stf_standalone_places_v2
caugonnet Mar 27, 2026
3d1cce4
Add missing header and pre-hook commits
caugonnet Mar 27, 2026
5d24f4f
[STF] Add umbrella header for standalone places library
caugonnet Mar 27, 2026
8a26d99
Move machine.cuh into the standalone places library
caugonnet Mar 27, 2026
da0fa7f
Trim exec_place_guard test to minimal places includes
caugonnet Mar 27, 2026
7428b46
Move STF-independent places tests to cudax/test/places/
caugonnet Mar 27, 2026
54165bd
Rename exec_place_guard to exec_place_scope across tests and docs
caugonnet Mar 27, 2026
bebe47c
Move linear_pool from memory.cuh into composite_slice.cuh
caugonnet Mar 27, 2026
25f136c
Revert scope_exit back to SCOPE(exit) in data_place_impl
caugonnet Mar 27, 2026
fd18602
Move __places Doxygen input paths before __stf entries for cleaner gr…
caugonnet Mar 27, 2026
c639331
Split places documentation out of stf.rst into standalone places.rst
caugonnet Mar 27, 2026
176c5da
Remove machine.cuh forwarding header, use places includes directly
caugonnet Mar 27, 2026
834d8ed
Merge branch 'main' into stf_standalone_places_v2
caugonnet Mar 27, 2026
39617fd
clang-format
caugonnet Mar 27, 2026
252ff2a
Add standalone stream pool test for exec_place::pick_stream()
caugonnet Mar 27, 2026
81f2f8f
Fix MSVC build: exclude places.cuh from no_stf header test
caugonnet Mar 27, 2026
fc605dd
clang-format
caugonnet Mar 27, 2026
5436009
Adopt CUB _fail test convention for places xfail compile tests
caugonnet Mar 27, 2026
091c5fa
Merge branch 'main' into stf_standalone_places_v2
caugonnet Mar 27, 2026
7aa9667
clang-format
caugonnet Mar 27, 2026
d8027b1
Add stream_pool and green_ctx_view to places umbrella header
caugonnet Mar 27, 2026
8a7cfe0
Merge branch 'main' into stf_standalone_places_v2
caugonnet Mar 28, 2026
006b00d
Merge branch 'main' into stf_standalone_places_v2
caugonnet Mar 28, 2026
548d057
Enable VMM-backed composite allocation and add Thrust allocator example
caugonnet Mar 29, 2026
ae8ee8a
Move partition strategies from __stf/places/ to __places/partitions/
caugonnet Mar 29, 2026
09fc48f
clang-format
caugonnet Mar 29, 2026
bd8e780
add a header to the list of unit tested headers
caugonnet Mar 30, 2026
feab5e7
Merge branch 'main' into stf_standalone_places_v2
caugonnet Mar 30, 2026
8b740f6
Fix blocked_partition unittest that was never compiled
caugonnet Mar 30, 2026
74bc895
Remove redundant entries from stf_unittested_headers
caugonnet Mar 30, 2026
984cd43
Merge branch 'main' into stf_standalone_places_v2
caugonnet Mar 30, 2026
51917d1
Merge branch 'main' into stf_standalone_places_v2
caugonnet Mar 30, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@
"cudax_ENABLE_HEADER_TESTING": true,
"cudax_ENABLE_TESTING": true,
"cudax_ENABLE_EXAMPLES": true,
"cudax_ENABLE_PLACES": true,
"cudax_ENABLE_CUDASTF": true,
"cudax_ENABLE_CUDASTF_BOUNDSCHECK": false,
"cudax_ENABLE_CUDASTF_CODE_GENERATION": true,
Expand Down Expand Up @@ -353,6 +354,7 @@
"cudax_ENABLE_HEADER_TESTING": true,
"cudax_ENABLE_TESTING": true,
"cudax_ENABLE_EXAMPLES": true,
"cudax_ENABLE_PLACES": true,
"cudax_ENABLE_CUDASTF": true,
"cudax_ENABLE_CUDASTF_BOUNDSCHECK": false,
"cudax_ENABLE_CUDASTF_CODE_GENERATION": true,
Expand Down
2 changes: 1 addition & 1 deletion c/experimental/stf/src/stf.cu
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

#include <cccl/c/experimental/stf/stf.h>
// #include <cccl/c/parallel/include/cccl/c/extern_c.h>
#include <cuda/experimental/__stf/places/places.cuh>
#include <cuda/experimental/places.cuh>
#include <cuda/experimental/stf.cuh>

#include <cstddef>
Expand Down
4 changes: 4 additions & 0 deletions cudax/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ option(
)
option(cudax_ENABLE_TESTING "Build CUDA Experimental's tests." ON)
option(cudax_ENABLE_EXAMPLES "Build CUDA Experimental's examples." ON)
option(cudax_ENABLE_PLACES "Enable standalone Places subproject" ON)
option(cudax_ENABLE_CUDASTF "Enable CUDASTF subproject" ON)
option(
cudax_ENABLE_CUDASTF_CODE_GENERATION
Expand Down Expand Up @@ -69,6 +70,9 @@ if (
endif()

include(cmake/cudaxBuildCompilerTargets.cmake)
if (cudax_ENABLE_PLACES)
include(cmake/cudaxPlacesConfigureTarget.cmake)
endif()
if (cudax_ENABLE_CUDASTF)
include(cmake/cudaxSTFConfigureTarget.cmake)
endif()
Expand Down
25 changes: 25 additions & 0 deletions cudax/cmake/cudaxHeaderTesting.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ function(cudax_add_header_test label definitions)
# cuFile headers are compiled separately:
"cuda/experimental/cufile.cuh"
"cuda/experimental/__cufile/*"
# Places headers are compiled separately:
"cuda/experimental/places.cuh"
"cuda/experimental/__places/*"
# STF headers are compiled separately:
"cuda/experimental/stf.cuh"
"cuda/experimental/__stf/*"
Expand All @@ -45,6 +48,28 @@ function(cudax_add_header_test label definitions)
target_link_libraries(${headertest_target} PUBLIC cudax.compiler_interface)
endif()

# FIXME: Enable MSVC
if (cudax_ENABLE_PLACES AND NOT "MSVC" STREQUAL "${CMAKE_CXX_COMPILER_ID}")
##################
# Places headers #
set(headertest_target cudax.headers.${label}.places)
cccl_generate_header_tests(
${headertest_target}
cudax/include
GLOBS #
"cuda/experimental/places.cuh"
"cuda/experimental/__places/*.cuh"
HEADER_TEMPLATE "${cudax_SOURCE_DIR}/cmake/header_test.in.cu"
)
target_link_libraries(${headertest_target} PUBLIC cudax.compiler_interface)
target_compile_options(
${headertest_target}
PRIVATE
$<$<COMPILE_LANG_AND_ID:CUDA,NVIDIA>:--extended-lambda>
$<$<COMPILE_LANG_AND_ID:CUDA,NVIDIA>:--expt-relaxed-constexpr>
)
endif()

# FIXME: Enable MSVC
if (cudax_ENABLE_CUDASTF AND NOT "MSVC" STREQUAL "${CMAKE_CXX_COMPILER_ID}")
###############
Expand Down
23 changes: 23 additions & 0 deletions cudax/cmake/cudaxPlacesConfigureTarget.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Configures a target for the Places framework.
function(cudax_places_configure_target target_name)
target_link_libraries(
${target_name}
PRIVATE #
CUDA::cudart_static
CUDA::cuda_driver
)

target_compile_options(
${target_name}
PRIVATE
$<$<COMPILE_LANG_AND_ID:CUDA,NVIDIA>:--extended-lambda>
$<$<COMPILE_LANG_AND_ID:CUDA,NVIDIA>:--expt-relaxed-constexpr>
)

set_target_properties(
${target_name}
PROPERTIES #
CUDA_RUNTIME_LIBRARY Static
CUDA_SEPARABLE_COMPILATION ON
)
endfunction()
9 changes: 9 additions & 0 deletions cudax/cmake/places_header_unittest.in.cu
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// This file is autogenerated by configuring places_header_unittest.in.cu.

// clang-format off
#define UNITTESTED_FILE "@source@"

#include <cuda/experimental/__stf/utility/unittest.cuh>

#include <@source@>
//clang-format on
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
# pragma system_header
#endif // no system header

#include <cuda/experimental/__stf/places/data_place_interface.cuh>
#include <cuda/experimental/__places/data_place_interface.cuh>
#include <cuda/experimental/__stf/utility/cuda_safe_call.cuh>
#include <cuda/experimental/__stf/utility/scope_guard.cuh>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
# pragma system_header
#endif // no system header

#include <cuda/experimental/__stf/places/places.cuh>
#include <cuda/experimental/__places/places.cuh>

namespace cuda::experimental::stf
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@
# pragma system_header
#endif // no system header

#include <cuda/experimental/__stf/places/data_place_interface.cuh>
#include <cuda/experimental/__stf/places/exec/green_ctx_view.cuh>
#include <cuda/experimental/__stf/places/places.cuh>
#include <cuda/experimental/__places/data_place_interface.cuh>
#include <cuda/experimental/__places/exec/green_ctx_view.cuh>
#include <cuda/experimental/__places/places.cuh>
#include <cuda/experimental/__stf/utility/hash.cuh>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see code in __places still includes code in __stf. Is that an intermediary state of affairs and is the long-term plan to excise that dependency? Far as I can tell right now __places and __stf depend on each other.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to decide where to move such utilities ...


// Used only for unit tests, not in the actual implementation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
* @brief Implementation of green context views
*/

#include <cuda/experimental/__stf/places/stream_pool.cuh>
#include <cuda/experimental/__places/stream_pool.cuh>
#include <cuda/experimental/__stf/utility/hash.cuh>

#if _CCCL_CTK_AT_LEAST(12, 4)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
//===----------------------------------------------------------------------===//
//
// Part of CUDASTF in CUDA C++ Core Libraries,
// Part of CUDA Experimental in CUDA C++ Core Libraries,
// under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
// SPDX-FileCopyrightText: Copyright (c) 2022-2024 NVIDIA CORPORATION & AFFILIATES.
// SPDX-FileCopyrightText: Copyright (c) 2022-2026 NVIDIA CORPORATION & AFFILIATES.
//
//===----------------------------------------------------------------------===//

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@
# pragma system_header
#endif // no system header

#include <cuda/experimental/__places/exec/cuda_stream.cuh>
#include <cuda/experimental/__places/exec/green_context.cuh>
#include <cuda/experimental/__places/places.cuh>
#include <cuda/experimental/__stf/internal/async_resources_handle.cuh>
#include <cuda/experimental/__stf/places/exec/cuda_stream.cuh>
#include <cuda/experimental/__stf/places/exec/green_context.cuh>
#include <cuda/experimental/__stf/places/places.cuh>

namespace cuda::experimental::stf
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,8 @@
# pragma system_header
#endif // no system header

#include <cuda/experimental/__stf/internal/interpreted_execution_policy.cuh>
#include <cuda/experimental/__stf/places/data_place_impl.cuh>
#include <cuda/experimental/__stf/places/exec/green_ctx_view.cuh>
#include <cuda/experimental/__places/data_place_impl.cuh>
#include <cuda/experimental/__places/exec/green_ctx_view.cuh>
#include <cuda/experimental/__stf/utility/core.cuh>

#include <typeinfo>
Expand All @@ -40,7 +39,6 @@
#endif
#include <cuda/experimental/__stf/utility/cuda_safe_call.cuh>
#include <cuda/experimental/__stf/utility/dimensions.cuh>
#include <cuda/experimental/__stf/utility/occupancy.cuh>
#include <cuda/experimental/__stf/utility/scope_guard.cuh>

// Sync only will not move data....
Expand Down Expand Up @@ -893,9 +891,6 @@ private:
exec_place prev_; // Previous state to restore
};

// Deprecated: Use exec_place_scope instead
using exec_place_guard = exec_place_scope;

inline exec_place_scope exec_place::activate(size_t idx) const
{
return exec_place_scope(*this, idx);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ public:

/**
* @brief Get the next stream in the pool; when a slot is empty, activate the place (RAII guard) and call
* place.create_stream(). Defined in places.cuh so the pool can use exec_place_guard and exec_place::create_stream().
* place.create_stream(). Defined in places.cuh so the pool can use exec_place_scope and exec_place::create_stream().
*/
decorated_stream next(const exec_place& place);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
# pragma system_header
#endif // no system header

#include <cuda/experimental/__places/places.cuh>
#include <cuda/experimental/__stf/internal/async_prereq.cuh>
#include <cuda/experimental/__stf/places/places.cuh>

#include <mutex>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@
# pragma system_header
#endif // no system header

#include <cuda/experimental/__places/exec/green_context.cuh>
#include <cuda/experimental/__stf/internal/exec_affinity.cuh>
#include <cuda/experimental/__stf/internal/executable_graph_cache.cuh>
#include <cuda/experimental/__stf/places/exec/green_context.cuh>
#include <cuda/experimental/__stf/utility/core.cuh>
#include <cuda/experimental/__stf/utility/cuda_safe_call.cuh>
#include <cuda/experimental/__stf/utility/hash.cuh> // for ::std::hash<::std::pair<::std::ptrdiff_t, ::std::ptrdiff_t>>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@
# pragma system_header
#endif // no system header

#include <cuda/experimental/__places/machine.cuh>
#include <cuda/experimental/__stf/allocators/block_allocator.cuh>
#include <cuda/experimental/__stf/internal/async_resources_handle.cuh>
#include <cuda/experimental/__stf/internal/ctx_resource.cuh>
#include <cuda/experimental/__stf/internal/execution_policy.cuh> // backend_ctx<T>::launch() uses execution_policy
#include <cuda/experimental/__stf/internal/interpreted_execution_policy.cuh>
#include <cuda/experimental/__stf/internal/machine.cuh> // backend_ctx_untyped::impl usese machine
#include <cuda/experimental/__stf/internal/reorderer.cuh> // backend_ctx_untyped::impl uses reorderer
#include <cuda/experimental/__stf/internal/repeat.cuh>
#include <cuda/experimental/__stf/internal/scheduler.cuh> // backend_ctx_untyped::impl uses scheduler
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

#include <cuda/std/__exception/exception_macros.h>

#include <cuda/experimental/__places/exec/cuda_stream.cuh>
#include <cuda/experimental/__stf/allocators/adapters.cuh>
#include <cuda/experimental/__stf/allocators/buddy_allocator.cuh>
#include <cuda/experimental/__stf/allocators/cached_allocator.cuh>
Expand All @@ -28,7 +29,6 @@
#include <cuda/experimental/__stf/internal/scalar_interface.cuh>
#include <cuda/experimental/__stf/internal/task_dep.cuh>
#include <cuda/experimental/__stf/internal/void_interface.cuh>
#include <cuda/experimental/__stf/places/exec/cuda_stream.cuh>
#include <cuda/experimental/__stf/stream/stream_ctx.cuh>

#include <map>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
# pragma system_header
#endif // no system header

#include <cuda/experimental/__places/places.cuh>
#include <cuda/experimental/__stf/internal/interpreted_execution_policy.cuh>
#include <cuda/experimental/__stf/places/places.cuh>
#include <cuda/experimental/__stf/utility/occupancy.cuh>

namespace cuda::experimental::stf
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
# pragma system_header
#endif // no system header

#include <cuda/experimental/__stf/places/place_partition.cuh>
#include <cuda/experimental/__places/place_partition.cuh>

#include <thread>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#include <cuda/experimental/__stf/internal/task_dep.cuh>
#include <cuda/experimental/__stf/internal/task_statistics.cuh>
#include <cuda/experimental/__stf/stream/internal/event_types.cuh>
#include <cuda/experimental/__stf/utility/occupancy.cuh>

namespace cuda::experimental::stf
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
# pragma system_header
#endif // no system header

#include <cuda/experimental/__places/places.cuh>
#include <cuda/experimental/__stf/internal/async_prereq.cuh>
#include <cuda/experimental/__stf/places/places.cuh>

namespace cuda::experimental::stf
{
Expand Down
Loading
Loading