mirror of
https://github.com/ggml-org/llama.cpp.git
synced 2026-09-17 20:31:47 +02:00
vulkan: work around NV bug with argsort_large.comp (#28975)
This commit is contained in:
@@ -27,6 +27,8 @@ layout (push_constant) uniform parameter {
|
||||
uint inner_end;
|
||||
} p;
|
||||
|
||||
shared int s;
|
||||
|
||||
void argsort(bool needs_bounds_check, const uint row) {
|
||||
// bitonic sort
|
||||
int col = int(gl_GlobalInvocationID.x);
|
||||
@@ -35,6 +37,12 @@ void argsort(bool needs_bounds_check, const uint row) {
|
||||
const uint row_offset = row * p.ncols;
|
||||
uint idx_offset = row * p.ncols_padded;
|
||||
|
||||
// workaround for NV driver/compiler bug - dummy use of shared memory
|
||||
if (gl_LocalInvocationIndex == 0) {
|
||||
s = 0;
|
||||
col += s;
|
||||
}
|
||||
|
||||
bool need_barrier = false;
|
||||
|
||||
// initialize indices
|
||||
|
||||
Reference in New Issue
Block a user