Skip to content

API: Device API v2. Removed old API. - #1342

Merged
rakhmets merged 14 commits into
ai-dynamo:mainfrom
rakhmets:topic/rm-device-api-v1
Feb 27, 2026
Merged

rakhmets merged 14 commits into
ai-dynamo:mainfrom
rakhmets:topic/rm-device-api-v1

Conversation

@rakhmets

@rakhmets rakhmets commented Feb 18, 2026

Copy link
Copy Markdown
Contributor

What?

Deleted the previous version of the Device API.
Renamed nixlMemViewElement to nixlMemViewElem.
Replaced NO_DELAY flag by defer, making without defer default.

Summary by CodeRabbit

  • Refactor

    • Removed GPU transfer-request and GPU-signal management from the public API; device-side transfer helpers simplified.
    • Memory-view preparation now targets local descriptor lists; device transfer flag handling consolidated and simplified.
    • Descriptor element type renamed in device-facing calls.
  • Breaking Changes

    • GPU-specific creation/release/query APIs and related handle types removed; callers must use non-GPU paths.
  • Tests

    • Multiple GPU/device-transfer tests and related scaffolding removed.

@github-actions

Copy link
Copy Markdown

👋 Hi rakhmets! Thank you for contributing to ai-dynamo/nixl.

Your PR reviewers will review your contribution then trigger the CI to test your changes.

🚀

@rakhmets
rakhmets force-pushed the topic/rm-device-api-v1 branch from 230c16c to 22ca3cd Compare February 19, 2026 10:08
Signed-off-by: Raul Akhmetshin <rakhmetshin@nvidia.com>
Signed-off-by: Raul Akhmetshin <rakhmetshin@nvidia.com>

@coderabbitai coderabbitai Bot left a comment

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.

Actionable comments posted: 2

♻️ Duplicate comments (1)
src/plugins/ucx/mem_list.cpp (1)

184-184: Previous suggestion applied correctly.

The constexpr std::string_view and std::string{error_message} construction at the throw sites match what was previously suggested. The anonymous namespace wrapping is also consistent with the project's style guidelines (anonymous namespaces preferred over static).

Also applies to: 190-190, 195-195

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/plugins/ucx/mem_list.cpp` at line 184, The constexpr std::string_view
error_message{"UCX GPU device API is not supported"} should be defined in the
anonymous namespace and reused at all throw sites in mem_list.cpp (replace
ad-hoc string constructions with std::string{error_message} where the exception
is thrown); ensure the variable name error_message is used consistently at each
throw site so the same message and type are reused (this same change should be
applied to the other throw locations that previously used raw string literals).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@examples/device/ep/csrc/kernels/nixl_ep.cu`:
- Around line 262-263: Change the inconsistent cast of dst_rank when
constructing nixlMemViewElem: replace the (unsigned) cast with (size_t) so the
index field receives a size_t like other call sites; update the construction of
nixlMemViewElem (using nixl_ctx.remote_mvh, (size_t)dst_rank,
nixl_ctx.offset_get(dst_ptr)) so subsequent EP_DEVICE_ASSERT and nixlAtomicAdd
calls (with num_tokens_sent and dst_expert_local_idx) use the correct type.

In `@src/api/gpu/ucx/nixl_device.cuh`:
- Around line 38-49: Add an explicit send_push constant and make to_ucp_flags
validate incoming bits: in namespace nixl_gpu_flags declare constexpr uint64_t
send_push = 0; and update to_ucp_flags(uint64_t flags) to first assert that
(flags & ~known_mask) == 0 where known_mask is the bitwise OR of all known flags
(defer | send_push), then map known bits to UCP flags (keep existing logic for
defer -> toggle UCP_DEVICE_FLAG_NODELAY) and fail fast (e.g., assert or
static/runtime check) if unknown bits are present so unrecognised flags are not
silently dropped.

---

Duplicate comments:
In `@src/plugins/ucx/mem_list.cpp`:
- Line 184: The constexpr std::string_view error_message{"UCX GPU device API is
not supported"} should be defined in the anonymous namespace and reused at all
throw sites in mem_list.cpp (replace ad-hoc string constructions with
std::string{error_message} where the exception is thrown); ensure the variable
name error_message is used consistently at each throw site so the same message
and type are reused (this same change should be applied to the other throw
locations that previously used raw string literals).

ℹ️ Review info

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 451c478 and 7b481c8.

📒 Files selected for processing (4)
  • examples/device/ep/csrc/kernels/nixl_ep.cu
  • src/api/gpu/ucx/nixl_device.cuh
  • src/plugins/ucx/mem_list.cpp
  • test/gtest/device_api/single_write_test.cu

Comment thread examples/device/ep/csrc/kernels/nixl_ep.cu Outdated
Comment thread src/api/gpu/ucx/nixl_device.cuh
@rakhmets

Copy link
Copy Markdown
Contributor Author

/build

itayalroy
itayalroy previously approved these changes Feb 26, 2026

@itayalroy itayalroy left a comment

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.

nixl_ep changes look good

Signed-off-by: Raul Akhmetshin <74596089+rakhmets@users.noreply.github.com>
@rakhmets

Copy link
Copy Markdown
Contributor Author

/build

Comment thread src/api/gpu/ucx/nixl_device.cuh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants