Skip to content

[STF] Rename places namespace from cuda::experimental::stf to cuda::experimental::places#8219

Merged
andralex merged 47 commits intoNVIDIA:mainfrom
caugonnet:stf_places_namespaces
Apr 2, 2026
Merged

[STF] Rename places namespace from cuda::experimental::stf to cuda::experimental::places#8219
andralex merged 47 commits intoNVIDIA:mainfrom
caugonnet:stf_places_namespaces

Conversation

@caugonnet
Copy link
Copy Markdown
Contributor

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

  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

…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
@caugonnet caugonnet self-assigned this Mar 30, 2026
@caugonnet caugonnet added stf Sequential Task Flow programming model places labels Mar 30, 2026
@github-project-automation github-project-automation bot moved this to Todo in CCCL Mar 30, 2026
@copy-pr-bot
Copy link
Copy Markdown
Contributor

copy-pr-bot bot commented Mar 30, 2026

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@cccl-authenticator-app cccl-authenticator-app bot moved this from Todo to In Progress in CCCL Mar 30, 2026
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
};
#endif // _CCCL_CTK_AT_LEAST(12, 4)

// Backward compatibility: re-export places types into the stf namespace
Copy link
Copy Markdown
Contributor Author

@caugonnet caugonnet Mar 30, 2026

Choose a reason for hiding this comment

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

We need to have a curated list ... and i hate this for now

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
Copy link
Copy Markdown
Contributor Author

@caugonnet caugonnet Mar 30, 2026

Choose a reason for hiding this comment

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

Be more specific about what exactly is made available

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 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
@caugonnet
Copy link
Copy Markdown
Contributor Author

/ok to test 9ac579c

@github-actions

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
@caugonnet
Copy link
Copy Markdown
Contributor Author

/ok to test a55db1e

@github-actions

This comment has been minimized.

caugonnet and others added 3 commits March 31, 2026 08:56
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
@github-actions

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.
@andralex
Copy link
Copy Markdown
Contributor

andralex commented Apr 2, 2026

/ok to test b3b4d1d

@github-actions

This comment has been minimized.

…APIs

Fix CI after partition usings moved out of stf.cuh umbrella.
@andralex
Copy link
Copy Markdown
Contributor

andralex commented Apr 2, 2026

/ok to test 79b3ded

@github-actions

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)
@andralex
Copy link
Copy Markdown
Contributor

andralex commented Apr 2, 2026

/ok to test 25d6260

@andralex andralex marked this pull request as ready for review April 2, 2026 05:32
@andralex andralex requested review from a team as code owners April 2, 2026 05:32
@andralex andralex enabled auto-merge (squash) April 2, 2026 05:32
@cccl-authenticator-app cccl-authenticator-app bot moved this from In Progress to In Review in CCCL Apr 2, 2026
Copy link
Copy Markdown
Contributor

@andralex andralex left a comment

Choose a reason for hiding this comment

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

More to come

@github-actions

This comment has been minimized.

@andralex
Copy link
Copy Markdown
Contributor

andralex commented Apr 2, 2026

/ok to test 25d6260

@copy-pr-bot
Copy link
Copy Markdown
Contributor

copy-pr-bot bot commented Apr 2, 2026

/ok to test 25d6260

@andralex, there was an error processing your request: E2

See the following link for more information: https://docs.gha-runners.nvidia.com/cpr/e/2/

@andralex
Copy link
Copy Markdown
Contributor

andralex commented Apr 2, 2026

/ok to test 88b034b

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 2, 2026

🥳 CI Workflow Results

🟩 Finished in 57m 18s: Pass: 100%/52 | Total: 22h 13m | Max: 43m 35s | Hits: 59%/26965

See results here.

@andralex andralex merged commit 9832833 into NVIDIA:main Apr 2, 2026
72 of 74 checks passed
@github-project-automation github-project-automation bot moved this from In Review to Done in CCCL Apr 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

places stf Sequential Task Flow programming model

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants