Skip to content

[java] Utility function for cudaMemcpy#983

Merged
rapids-bot[bot] merged 3 commits intorapidsai:branch-25.08from
mythrocks:minor-memcpy-rephrase
Jun 6, 2025
Merged

[java] Utility function for cudaMemcpy#983
rapids-bot[bot] merged 3 commits intorapidsai:branch-25.08from
mythrocks:minor-memcpy-rephrase

Conversation

@mythrocks
Copy link
Contributor

This commit does a minor rephrasing of calls to cudaMemCpy.

Prior to this change:

  1. Calls to cudaMemcpy were using hardcoded / undocumented magic numbers for the direction of the copy. These have been replaced an enum that mirrors what is used in the CUDA Runtime call.
  2. cudaMemcpy would return an error value that needed to be checked / converted into a RuntimeError. This has been moved into the utility function, to reduce the noise at the call site.

This change also includes some minor cleanup of unused imports in the modified files.

This commit does a minor rephrasing of calls to `cudaMemCpy`.

Prior to this change:
  1. Calls to `cudaMemcpy` were using hardcoded / undocumented magic
     numbers for the direction of the copy. These have been replaced
     an enum that mirrors what is used in the CUDA Runtime call.
  2. `cudaMemcpy` would return an error value that needed to be checked
     / converted into a RuntimeError.  This has been moved into the
     utility function, to reduce the noise at the call site.

This change also includes some minor cleanup of unused imports in the
modified files.
@mythrocks mythrocks self-assigned this Jun 5, 2025
@mythrocks mythrocks added improvement Improves an existing functionality non-breaking Introduces a non-breaking change Java labels Jun 5, 2025
@mythrocks
Copy link
Contributor Author

(Another case of gtest failures.)

@cjnolet
Copy link
Member

cjnolet commented Jun 6, 2025

/merge

@rapids-bot rapids-bot bot merged commit 71a408a into rapidsai:branch-25.08 Jun 6, 2025
53 checks passed
bkarsin pushed a commit to bkarsin/cuvs that referenced this pull request Jun 19, 2025
This commit does a minor rephrasing of calls to `cudaMemCpy`.

Prior to this change:
  1. Calls to `cudaMemcpy` were using hardcoded / undocumented magic numbers for the direction of the copy. These have been replaced an enum that mirrors what is used in the CUDA Runtime call.
  2. `cudaMemcpy` would return an error value that needed to be checked / converted into a RuntimeError.  This has been moved into the utility function, to reduce the noise at the call site.

This change also includes some minor cleanup of unused imports in the modified files.

Authors:
  - MithunR (https://github.com/mythrocks)

Approvers:
  - Corey J. Nolet (https://github.com/cjnolet)

URL: rapidsai#983
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improvement Improves an existing functionality Java non-breaking Introduces a non-breaking change

Development

Successfully merging this pull request may close these issues.

2 participants