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

added cuda float16->float32 upcasting to ggml_cuda_cpy #685

Closed
wants to merge 1 commit into from

Conversation

balisujohn
Copy link
Contributor

Really basic addition. This seems to work in tortoise.cpp, but I haven't tested it after copying it here other thank to see that it compiles. It wasn't obvious to me if there are tests for cuda ops in ggml where I could add a test for this behavior. Curious to hear if I should add a test somewhere and If I should lint etc..

@slaren
Copy link
Member

slaren commented Jan 8, 2024

You can add a test to test-backend-ops by adding a test case. Something like this should work:

test_cases.emplace_back(new test_cpy(GGML_TYPE_F16, GGML_TYPE_F32, {256, 10, 10, 1}));

ggml_backend_cuda_supports_op also needs to be updated to return true for this case, otherwise the test will be skipped as "not supported"

It seems that #686 also contains these changes, should we focus on that instead?

@balisujohn
Copy link
Contributor Author

Yeah that works for me, since these are both improvements to ggml_cuda_cpy. I'll be away from my graphics card for a few days but once I'm back I'll look into adding a test for this and the 4d copy behavior.

@balisujohn balisujohn closed this Jan 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants