[STF] Rename places namespace from cuda::experimental::stf to cuda::experimental::places#8219
Merged
andralex merged 47 commits intoNVIDIA:mainfrom Apr 2, 2026
Merged
Conversation
…xperimental::places Move all __places/ headers from namespace cuda::experimental::stf to cuda::experimental::places. Each header imports needed stf utility types (pos4, dim4, cuda_safe_call, etc.) via using declarations and re-exports its public types back into cuda::experimental::stf for backward compat. Hash specializations (stf::hash<data_place>, stf::hash<exec_place>, stf::hash<green_ctx_view>) remain in the stf namespace where the primary template is defined. The composite_slice cross-boundary function signature is updated to use the qualified places type. Tests, examples, C API, and documentation are updated to use the new namespace. Made-with: Cursor
Contributor
andralex
reviewed
Mar 30, 2026
andralex
reviewed
Mar 30, 2026
cudax/include/cuda/experimental/__places/exec/green_context.cuh
Outdated
Show resolved
Hide resolved
Move all stf namespace backward compatibility using-declarations from individual __places/ headers into the central places.cuh compat block. This makes places.cuh the single curated list of places types re-exported into the stf namespace. Made-with: Cursor
caugonnet
commented
Mar 30, 2026
caugonnet
commented
Mar 30, 2026
| }; | ||
| #endif // _CCCL_CTK_AT_LEAST(12, 4) | ||
|
|
||
| // Backward compatibility: re-export places types into the stf namespace |
Contributor
Author
There was a problem hiding this comment.
We need to have a curated list ... and i hate this for now
caugonnet
commented
Mar 30, 2026
| The places API is part of the ``cuda::experimental::places`` C++ namespace | ||
| and can be used standalone via the ``cuda/experimental/places.cuh`` header, | ||
| without pulling in the full CUDASTF task-graph framework. | ||
| without pulling in the full CUDASTF task-graph framework. For backward |
Contributor
Author
There was a problem hiding this comment.
Be more specific about what exactly is made available
caugonnet
commented
Mar 30, 2026
Remove non-user-visible types from the places.cuh backward compat block and qualify them with places:: in the __stf/ files that use them. Move instance_id_t to its own __stf/internal/instance_id.cuh header since it conceptually belongs to the task framework, not the places library. The compat block now only re-exports user-facing types: data_place, exec_place, exec_place_scope, decorated_stream, make_grid, partition_cyclic, partition_tile, to_index, from_index, device_ordinal. Made-with: Cursor
Made-with: Cursor
caugonnet
commented
Mar 30, 2026
Remove redundant using places::decorated_stream from stream_ctx.cuh and remove place_partition backward compat block from place_partition.cuh since loop_dispatch.cuh now uses places:: qualified names directly. Made-with: Cursor
Contributor
Author
|
/ok to test 9ac579c |
This comment has been minimized.
This comment has been minimized.
Forward declarations like class exec_place inside namespace stf conflict with the using places::exec_place from the compat block. Remove redundant forward declarations where places.cuh is transitively included, and for files without transitive inclusion, forward-declare in namespace places and add a local using. Made-with: Cursor
Contributor
Author
|
/ok to test a55db1e |
This comment has been minimized.
This comment has been minimized.
Tests were using place_partition_scope, place_partition, place_partition_scope_to_string, and make_grid unqualified via `using namespace stf`, but these are no longer re-exported from the stf namespace. Also rename local variable `places` in gc_grid.cu to avoid shadowing the namespace. Made-with: Cursor
This comment has been minimized.
This comment has been minimized.
Split partition-related usings into stf_places_partition_into_stf.cuh to avoid include cycle with async_resources_handle. Extend stf_places_extended_exports with localized_array, stream ids, hash keys, and machine.
Contributor
|
/ok to test b3b4d1d |
This comment has been minimized.
This comment has been minimized.
…APIs Fix CI after partition usings moved out of stf.cuh umbrella.
Contributor
|
/ok to test 79b3ded |
This comment has been minimized.
This comment has been minimized.
- stf_places_into_stf_core: include places.cuh for isolated header tests - stf_places_extended_exports: include hash.cuh so SortIncludes cannot break specialization order; drop redundant hash includes from callers - composite_slice: extended + into_stf_core only (sorted order safe)
Contributor
|
/ok to test 25d6260 |
This comment has been minimized.
This comment has been minimized.
Contributor
|
/ok to test 25d6260 |
Contributor
@andralex, there was an error processing your request: See the following link for more information: https://docs.gha-runners.nvidia.com/cpr/e/2/ |
miscco
approved these changes
Apr 2, 2026
NaderAlAwar
approved these changes
Apr 2, 2026
Contributor
|
/ok to test 88b034b |
Contributor
🥳 CI Workflow Results🟩 Finished in 57m 18s: Pass: 100%/52 | Total: 22h 13m | Max: 43m 35s | Hits: 59%/26965See results here. |
gonidelis
pushed a commit
to gonidelis/cccl
that referenced
this pull request
Apr 8, 2026
…xperimental::places (NVIDIA#8219) * [STF] Rename places namespace from cuda::experimental::stf to cuda::experimental::places Move all __places/ headers from namespace cuda::experimental::stf to cuda::experimental::places. Each header imports needed stf utility types (pos4, dim4, cuda_safe_call, etc.) via using declarations and re-exports its public types back into cuda::experimental::stf for backward compat. Hash specializations (stf::hash<data_place>, stf::hash<exec_place>, stf::hash<green_ctx_view>) remain in the stf namespace where the primary template is defined. The composite_slice cross-boundary function signature is updated to use the qualified places type. Tests, examples, C API, and documentation are updated to use the new namespace. Made-with: Cursor * remove some redundant using * consolidate places backward compat into places.cuh Move all stf namespace backward compatibility using-declarations from individual __places/ headers into the central places.cuh compat block. This makes places.cuh the single curated list of places types re-exported into the stf namespace. Made-with: Cursor * qualify internal places types with places:: in __stf/ headers Remove non-user-visible types from the places.cuh backward compat block and qualify them with places:: in the __stf/ files that use them. Move instance_id_t to its own __stf/internal/instance_id.cuh header since it conceptually belongs to the task framework, not the places library. The compat block now only re-exports user-facing types: data_place, exec_place, exec_place_scope, decorated_stream, make_grid, partition_cyclic, partition_tile, to_index, from_index, device_ordinal. Made-with: Cursor * remove make_grid from places backward compat block Made-with: Cursor * clang-format * comments about a TODO * qualify place_partition types with places:: in loop_dispatch.cuh Remove redundant using places::decorated_stream from stream_ctx.cuh and remove place_partition backward compat block from place_partition.cuh since loop_dispatch.cuh now uses places:: qualified names directly. Made-with: Cursor * fix forward declarations of places types in stf headers Forward declarations like class exec_place inside namespace stf conflict with the using places::exec_place from the compat block. Remove redundant forward declarations where places.cuh is transitively included, and for files without transitive inclusion, forward-declare in namespace places and add a local using. Made-with: Cursor * qualify places:: types in test files after compat block cleanup Tests were using place_partition_scope, place_partition, place_partition_scope_to_string, and make_grid unqualified via `using namespace stf`, but these are no longer re-exported from the stf namespace. Also rename local variable `places` in gc_grid.cu to avoid shadowing the namespace. Made-with: Cursor * clang-format * use 'using namespace places' in tests instead of explicit qualification Replace `places::` qualifiers with `using namespace cuda::experimental::places;` for consistency with the existing `using namespace cuda::experimental::stf;` pattern in test files. Made-with: Cursor * disambiguate stf::reserved in C API after places namespace split Both stf::reserved and places::reserved exist, so unqualified 'reserved::' is ambiguous when both namespaces are imported. Made-with: Cursor * remove green_context.cuh backward compat block All 5 re-exported types (exec_place_green_ctx_impl, get_cuda_context_id, green_context_helper, green_ctx_data_place_impl, make_green_ctx_data_place) are either internal-only or test-convenience types. Tests that use green_context_helper now import cuda::experimental::places directly. Made-with: Cursor * remove unnecessary stf namespace import of exec_place_cuda_stream_impl Made-with: Cursor * remove unnecessary stf namespace imports from __places headers Made-with: Cursor * introduce independent places::hash template for places types Define places::hash<T> as a standalone primary template with specializations for data_place, exec_place, and green_ctx_view. Update all stf code and tests to use places::hash for places types instead of the former stf::hash specializations. Made-with: Cursor * use 'using namespace places' in test/example files instead of fully qualified places::hash Made-with: Cursor * clang-format * move green_ctx_view hash specialization to green_ctx_view.cuh Made-with: Cursor * clang-format * Fix places/STF namespace qualification in green context plumbing - Use places::green_context_helper in async_resources_handle (class lives in cuda::experimental::places; fixes cudax.test.places builds). - Qualify stf::mv and stf::hash_all in green_ctx_view.cuh; drop redundant using-declarations. Made-with: Cursor * Extra fixed for namespaces * use properly qualified names * Add missing using namespace in examples * add missing namespace * [STF] Disable stackable_loop_dispatch test The test is hitting a double free or corruption (fasttop) at runtime. Disabling it until the root cause is investigated. Made-with: Cursor * better message * cudax: re-export places into STF from STF-only headers; remove using namespace places from STF tests * cudax: fix STF places exports on CTK<12.4; extend places umbrella * cudax: re-export cyclic_partition into stf; include cyclic_shape in places umbrella * lookup fix * cudax(places): use cuda_try consistently; cuda_try<fn> for unambiguous APIs; update places tests * stf: export places names into stf; remove places:: call sites Split partition-related usings into stf_places_partition_into_stf.cuh to avoid include cycle with async_resources_handle. Extend stf_places_extended_exports with localized_array, stream ids, hash keys, and machine. * stf tests: include stf_places_partition_into_stf for place_partition APIs Fix CI after partition usings moved out of stf.cuh umbrella. * stf places bridges: self-contained headers, hash via extended_exports - stf_places_into_stf_core: include places.cuh for isolated header tests - stf_places_extended_exports: include hash.cuh so SortIncludes cannot break specialization order; drop redundant hash includes from callers - composite_slice: extended + into_stf_core only (sorted order safe) --------- Co-authored-by: Andrei Alexandrescu <andrei@erdani.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Move all __places/ headers from namespace cuda::experimental::stf to cuda::experimental::places. Each header imports needed stf utility types (pos4, dim4, cuda_safe_call, etc.) via using declarations and re-exports its public types back into cuda::experimental::stf for backward compat.
Hash specializations (stf::hash<data_place>, stf::hash<exec_place>, stf::hash<green_ctx_view>) remain in the stf namespace where the primary template is defined. The composite_slice cross-boundary function signature is updated to use the qualified places type.
Tests, examples, C API, and documentation are updated to use the new namespace.
Made-with: Cursor
Description
closes
Checklist