 Safi UllahandJeff Bolz
|
3f545becce
|
vulkan : added the PAD_REFLECT_1D operation (#26586)
* vulkan : added PAD_REFLECT_1D operation
Implemented the GGML_OP_PAD_REFLECT_1D operation for the Vulkan backend
Changes:
- pad_reflect_1d.comp: implemented the GLSL compute shader with reflection logic
- vulkan-shaders-gen.cpp: register the shader for SPIR-V compilation
- ggml-vulkan.cpp: pushed constants struct, pipeline creation,
supports_op, dispatch function, compute switch and debug validation
Tested the PAD_REFLECT_1D on Intel Iris Xe (Vulkan 1.4, Mesa 25.2.8):
Correctness:
PAD_REFLECT_1D(type=f32,ne_a=[512,34,2,1],pad_0=10,pad_1=9) = Pass
PAD_REFLECT_1D(type=f32,ne_a=[3000,384,4,1],pad_0=10,pad_1=9) = Pass
2/2 tests passed
- All test are passed
Performance:
ne_a=[512,34,2,1] -> 5.38 us/run, 24.55 GB/s
ne_a=[3000,80,1,1] -> 30.09 us/run, 59.62 GB/s
ne_a=[3000,384,4,1] -> 158.31 us/run, 54.39 GB/s
* Update ggml/src/ggml-vulkan/vulkan-shaders/pad_reflect_1d.comp
Co-authored-by: Jeff Bolz <[email protected]>
---------
Co-authored-by: Jeff Bolz <[email protected]>
|
2026-08-22 14:42:20 -05:00 |
|