-
Notifications
You must be signed in to change notification settings - Fork 197
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CUBLAS wrappers with switchable host/device pointer mode #453
CUBLAS wrappers with switchable host/device pointer mode #453
Conversation
rerun tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Artem for this PR! The changes look good to me.
One thing still worth to discuss with @cjnolet: how many overloads for If we are still consolidating the RAFT API then one could consider a follow up PR to remove some of the overloads (together with cleanup in downstream repositories):
|
Indeed, that was the first thing I noticed when I began reviewing this PR. I don't think we need them, and even more specifically, once the mdspan PR is merged, we should be able to acept That said, if these changes are urgent, I'm okay creating a Github issue to follow up when the mdsan is ready and getting these merged. |
Thanks, I'd prefer to get this merged now to proceed with rapidsai/cuml#4446, which is almost two month old now. |
@cjnolet I had a discussion with Artem about this:
Considering these points, we would prefer to go forward with the current PR and rapidsai/cuml#4446. Once span / mdspan is merged, we shall consolidate the API of gemm / gemmv to use mdspan, and refactor the relevant calls in the CD solver. |
I'd prefer not to use RMM in the public API. The new mdspan will provide a Otherwise, I don't see any reason to hold up this PR. |
I've gone ahead and added our plan to an existing issue, which I created to clean up the ctk wrappers in cuml in general: #475 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@achirkin, just missing doxygen but otherwise looks great.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks again @achirkin!
rerun tests |
1 similar comment
rerun tests |
@gpucibot merge |
Add a few overloads for raft-CUBLAS
gemv
,gemm
,axpy
functions to support switching between host and device pointer mode. This allows passing some of the parameters (constantsalpha
,beta
) as device pointers, which sometimes improves performance.By default, CUBLAS context is created in the host pointer mode. To keep this presumption, the device pointer mode is enabled only for the time of a particular CUBLAS call.
This feature is required for rapidsai/cuml#4446.