Skip to content

Fix: correct cuMemcpyHtoD_v2 param names - #240

Open
thearyanahmed wants to merge 2 commits into
Project-HAMi:mainfrom
thearyanahmed:fix/cumemcpyhtod-param-names
Open

Fix: correct cuMemcpyHtoD_v2 param names#240
thearyanahmed wants to merge 2 commits into
Project-HAMi:mainfrom
thearyanahmed:fix/cumemcpyhtod-param-names

Conversation

@thearyanahmed

@thearyanahmed thearyanahmed commented Jul 29, 2026

Copy link
Copy Markdown

Following the NVIDIA ABI, this PR fixes the param names of CUresult cuMemcpyHtoD_v2() . Non breaking changes.

Summary by CodeRabbit

  • Bug Fixes
    • Corrected host-to-device memory copy handling so source and destination arguments are forwarded in the proper order.
    • Updated diagnostic messages to accurately reflect the copy direction.

@hami-robot

hami-robot Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: thearyanahmed
Once this PR has been reviewed and has the lgtm label, please assign archlitchi for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@hami-robot

hami-robot Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Welcome @thearyanahmed! It looks like this is your first PR to Project-HAMi/HAMi-core 🎉

@hami-robot hami-robot Bot added the size/XS label Jul 29, 2026
@coderabbitai

coderabbitai Bot commented Jul 29, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@thearyanahmed, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 33 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: c32da945-e0ce-451a-bdd0-bdf7f322ad62

📥 Commits

Reviewing files that changed from the base of the PR and between a81886b and fe08322.

📒 Files selected for processing (1)
  • src/cuda/memory.c
📝 Walkthrough

Walkthrough

The cuMemcpyHtoD_v2 wrapper now names its parameters according to host-to-device direction, updates its debug log, and forwards the device destination and host source in the corrected order.

Changes

CUDA memory copy wrapper

Layer / File(s) Summary
Align HtoD wrapper arguments
src/cuda/memory.c
cuMemcpyHtoD_v2 uses dstDevice and srcHost, updates logging, and forwards arguments in host-to-device order.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Suggested reviewers: chaunceyjiang, archlitchi

Poem

A bunny checks the bytes hop by hop,
Host to device, no traffic stop.
Names now point where buffers go,
Logs the path so all can know.
Tiny patch, a tidy cheer—
The CUDA trail is crystal-clear!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: correcting cuMemcpyHtoD_v2 parameter names.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

Signed-off-by: Aryan Ahmed Anik <thearyanahmed@gmail.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/cuda/memory.c`:
- Line 376: Update the debug call and CUDA_OVERRIDE_CALL invocations in the
affected CUDA memory functions to add spaces after every comma, including the
LOG_DEBUG call around cuMemcpyHtoD_v2, so they comply with cpplint formatting.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 7fa74da6-beae-4efb-afa2-b0be284d6d53

📥 Commits

Reviewing files that changed from the base of the PR and between 52f33fc and a81886b.

📒 Files selected for processing (1)
  • src/cuda/memory.c

Comment thread src/cuda/memory.c Outdated
Signed-off-by: Aryan Ahmed Anik <thearyanahmed@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant