ggerganov / ggml

Tensor library for machine learning
MIT License
11.22k stars 1.04k forks source link

vulkan: argsort: barriers must be under uniform control flow #951

Closed smeso closed 1 month ago

smeso commented 2 months ago

a return before a barrier that happens only in some threads in a workgroup leads to UB. While the old code actually works on some devices, it fails on some others (i.e. "smaller" GPUs).

BTW, I think it would be better to set specialization constants when the graph is built, in that way the local workgroup could be sized appropriately. But it would take a lot of work.

ggerganov commented 2 months ago

@0cc4m PTAL