-
Notifications
You must be signed in to change notification settings - Fork 13.6k
cuda/vulkan : bicubic interpolation #17022
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
base: master
Are you sure you want to change the base?
Conversation
|
Thank you, looks good for OpenCL. |
0cc4m
left a comment
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.
The Vulkan code is fine.
tests/test-backend-ops.cpp
Outdated
| test_cases.emplace_back(new test_interpolate(GGML_TYPE_F32, {1, 4, 3, 2}, {2, 8, 3, 2}, GGML_SCALE_MODE_BILINEAR | GGML_SCALE_FLAG_ALIGN_CORNERS)); | ||
| test_cases.emplace_back(new test_interpolate(GGML_TYPE_F32, {4, 1, 3, 2}, {1, 1, 3, 2}, GGML_SCALE_MODE_BILINEAR | GGML_SCALE_FLAG_ALIGN_CORNERS)); | ||
| for (ggml_scale_mode mode : {GGML_SCALE_MODE_BILINEAR, GGML_SCALE_MODE_BICUBIC}) { | ||
| test_cases.emplace_back(new test_interpolate(GGML_TYPE_F32, {2, 5, 7, 11}, {5, 7, 11, 13}, mode | GGML_SCALE_FLAG_ALIGN_CORNERS)); |
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.
| test_cases.emplace_back(new test_interpolate(GGML_TYPE_F32, {2, 5, 7, 11}, {5, 7, 11, 13}, mode | GGML_SCALE_FLAG_ALIGN_CORNERS)); | |
| test_cases.emplace_back(new test_interpolate(GGML_TYPE_F32, {2, 5, 7, 11}, {5, 7, 11, 13}, mode | GGML_SCALE_FLAG_ALIGN_CORNERS)); |
ggml/src/ggml-vulkan/ggml-vulkan.cpp
Outdated
| case GGML_SCALE_MODE_BILINEAR: | ||
| return ctx->device->pipeline_upscale_bilinear_f32; | ||
| case GGML_SCALE_MODE_BICUBIC: | ||
| return ctx->device->pipeline_upscale_bicubic_f32; |
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.
| return ctx->device->pipeline_upscale_bicubic_f32; | |
| return ctx->device->pipeline_upscale_bicubic_f32; |
…tests * adapt OpenCL backend to not support the OP in that case so tests don't fail
|
Fixed the whitespace issues. Also did a rebase, which should fix the test-thread-safety issue from last CI run. |
Backend support for
GGML_OP_UPSCALEwithGGML_SCALE_MODE_BICUBICggml_backend_supports_opto return false for bicubicCombined PR so I can add backend-ops tests without having them fail for some backends.