llama.cpp icon indicating copy to clipboard operation
llama.cpp copied to clipboard

vulkan: add LOG operation support for F32 and F16

Open zayac opened this issue 1 month ago • 2 comments

Summary

Implements LOG operation for the Vulkan backend with F32 and F16 support.

Part of #14909.

Testing

./build/bin/test-backend-ops -o LOG
ggml_vulkan: Found 1 Vulkan devices:
ggml_vulkan: 0 = NVIDIA GeForce RTX 5070 (NVIDIA) | uma: 0 | fp16: 1 | bf16: 1 | warp size: 32 | shared memory: 49152 | int dot: 1 | matrix cores: NV_coopmat2
Testing 2 devices

Backend 1/2: Vulkan0
  Device description: NVIDIA GeForce RTX 5070
  Device memory: 12227 MB (10998 MB free)

  LOG(type=f16,ne=[10,5,4,3]): OK
  LOG(type=f16,ne=[7,1,5,3]): OK
  LOG(type=f32,ne=[10,5,4,3]): OK
  LOG(type=f32,ne=[7,1,5,3]): OK
  4/4 tests passed
  Backend Vulkan0: OK
Backend 2/2: CPU
  Skipping CPU backend
2/2 backends passed
OK

zayac avatar Nov 12 '25 00:11 zayac

Thanks, Jeff, for the feedback. I addressed all the comments. PTAL.

zayac avatar Nov 12 '25 21:11 zayac

Hi @0cc4m, could you please review / approve this PR?

zayac avatar Nov 14 '25 17:11 zayac

Someone has updated the same line in ops.md, so there's another conflict, sorry. I'll merge once you rebase it again.

0cc4m avatar Nov 16 '25 06:11 0cc4m

Someone has updated the same line in ops.md, so there's another conflict, sorry. I'll merge once you rebase it again.

Should be good now. Please merge as fast as possible :)

zayac avatar Nov 16 '25 21:11 zayac

Was this supposed to happen? https://github.com/ggml-org/llama.cpp/actions/runs/19414817156/job/55541539280

CISC avatar Nov 17 '25 09:11 CISC

No, I think that's another RTE issue. It didn't happen on my hardware, but seems persistent on the CI.

0cc4m avatar Nov 17 '25 09:11 0cc4m

I can neither reproduce it locally.

Both

./build/bin/test-backend-ops test -o LOG
./build/bin/test-backend-ops test -b Vulkan0

succeed for me.

zayac avatar Nov 17 '25 09:11 zayac

Let's see if #17320 fixes it.

0cc4m avatar Nov 17 '25 12:11 0cc4m