Skip to content
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

Add support for sqrt on CUDA #7953

Merged
merged 8 commits into from
Jun 16, 2024

Conversation

calvin-laurenson
Copy link
Contributor

  • Self Reported Review Complexity:Add support for sqrt on CUDA
    • Review Complexity : Low
    • Review Complexity : Medium
    • Review Complexity : High
  • I have read the contributing guidelines

This PR adds supports for the GGML_OP_SQRT operation on CUDA. I basically just copy pasted the code for GGML_OP_SQR. It also uncomments the CUDA initialization in the pca code in the cvector-generator example (that was the motivator for this PR,). I had some trouble with writing the test case but I think it does what it is supposed to do now.

@github-actions github-actions bot added testing Everything test related Nvidia GPU Issues specific to Nvidia GPUs examples ggml changes relating to the ggml tensor library for machine learning labels Jun 16, 2024
Copy link
Collaborator

@JohannesGaessler JohannesGaessler left a comment

Choose a reason for hiding this comment

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

The CUDA part looks (other than my comment) fine to me. I don't see anything wrong with the changes to tests/test-backend-ops.cpp but my understanding of that code is comparatively poor.

ggml-cuda/unary.cu Outdated Show resolved Hide resolved
@mofosyne mofosyne added the Review Complexity : Medium Generally require more time to grok but manageable by beginner to medium expertise level label Jun 16, 2024
Co-authored-by: Johannes Gäßler <johannesg@5d6.de>
@JohannesGaessler JohannesGaessler merged commit 43b35e3 into ggerganov:master Jun 16, 2024
66 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
examples ggml changes relating to the ggml tensor library for machine learning Nvidia GPU Issues specific to Nvidia GPUs Review Complexity : Medium Generally require more time to grok but manageable by beginner to medium expertise level testing Everything test related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants