Skip to content

EXAMPLES/DEVICE/EP: Added missing const to Buffer::query_mask_buffer.#1926

Open
rakhmets wants to merge 1 commit into
ai-dynamo:mainfrom
rakhmets:topic/nixl-ep-query-mask-buffer-const
Open

EXAMPLES/DEVICE/EP: Added missing const to Buffer::query_mask_buffer.#1926
rakhmets wants to merge 1 commit into
ai-dynamo:mainfrom
rakhmets:topic/nixl-ep-query-mask-buffer-const

Conversation

@rakhmets

@rakhmets rakhmets commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

What?

Added missing const to the declaration of Buffer::query_mask_buffer.
Added missing const to a parameter of ep_kernels::query_mask_buffer.

Why?

To improve the readability of the code, following C++ core guidelines.
Spotted by the PR (#1793), need to reduce the size of the PR, removing unrelated changes.

Signed-off-by: Raul Akhmetshin <rakhmetshin@nvidia.com>
@coderabbitai

coderabbitai Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

query_mask_buffer now treats the input mask as read-only across the CUDA and Buffer interfaces. The Buffer method is const-qualified and uses a typed tensor data accessor while retaining existing validation.

Changes

Query mask buffer const correctness

Layer / File(s) Summary
CUDA query interface constness
examples/device/ep/csrc/kernels/api.cuh, examples/device/ep/csrc/kernels/nixl_ep_ll.cu
Kernel and host wrapper signatures now accept mask_buffer_ptr as const int*.
Buffer query implementation constness
examples/device/ep/csrc/nixl_ep.hpp, examples/device/ep/csrc/nixl_ep.cpp
Buffer::query_mask_buffer is const-qualified and passes the validated tensor through data_ptr<int>() while preserving existing checks.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested reviewers: ebarilanM

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title is concise and accurately summarizes the main change: adding missing const qualifiers to Buffer::query_mask_buffer.
Description check ✅ Passed The description covers What and Why clearly, and the optional How section is acceptable to omit for this small change.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@rakhmets

Copy link
Copy Markdown
Contributor Author

/build

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.

1 participant