Commit e21cd43
Fix #9: Vulkan clang build break + missing CUDA init in CLI
- tq_vulkan_init.c: include turboquant/tq_types.h and forward-declare
tq_vulkan_override_traits() so clang accepts the file (GCC tolerated
the implicit decl, clang -Werror=implicit-function-declaration did not).
- tq_cuda_dispatch.cu: add tq_cuda_override_traits() symmetric to the
Vulkan path, installing CUDA quantize/attention fns into TQ_TRAITS.
- tools/quant.c: add the missing #ifdef TQ_BUILD_CUDA init block so
-DTQ_BUILD_CUDA=ON actually dispatches KV ops to GPU instead of
silently running CPU-only.
- Both backends now print an explicit "GPU acceleration covers KV cache
only; weight matmul runs on CPU" notice to match project non-goals
and avoid the "GPU idle" surprise reported in #9.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent e161d2e commit e21cd43
3 files changed
Lines changed: 43 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
358 | 358 | | |
359 | 359 | | |
360 | 360 | | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
361 | 386 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
17 | 21 | | |
18 | 22 | | |
19 | 23 | | |
| |||
465 | 469 | | |
466 | 470 | | |
467 | 471 | | |
| 472 | + | |
| 473 | + | |
468 | 474 | | |
469 | 475 | | |
470 | 476 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
324 | 324 | | |
325 | 325 | | |
326 | 326 | | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
327 | 339 | | |
328 | 340 | | |
329 | 341 | | |
| |||
0 commit comments