Skip to content

b12819

Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 28 Nov 00:21
0020197

CUDA: cache the device type at init (#33142)

  • CUDA: cache the device type at init

ggml_backend_cuda_device_get_type called cudaGetDeviceProperties on every
call, which takes ~0.7-1 ms with the CUDA 12 runtime. With tensor
overrides on multiple GPUs the scheduler queries the device type for every
split input, so this ran dozens of times per token.

Store the device type in ggml_cuda_device_info at init. It is derived from
prop.integrated, not from the integrated flag, which is forced off (#15034).

Ref #33132


Co-authored-by: Johannes Gäßler johannesg@5d6.de

Website:

Attestations:

macOS/iOS:

Linux:

Android:

Windows:

openEuler:

  • DISABLED
  • openEuler x86 (310p)
  • openEuler x86 (910b, ACL Graph)
  • openEuler aarch64 (310p)
  • openEuler aarch64 (910b, ACL Graph)

UI: