github ggml-org/llama.cpp b11889

pre-release2 hours ago
Details

cuda : use std::string instead of VLA for archName (#30463)

  • cuda : use std::string instead of VLA for archName

Modernize the code (old C style) and fix the following warnings:

ggml/src/ggml-cuda/ggml-cuda.cu:180:19: warning: variable length arrays in C++ are a Clang extension [-Wvla-cxx-extension]
  180 |     char archName[archLen + 1];
      |                   ^~~~~~~~~~~
ggml/src/ggml-cuda/ggml-cuda.cu:180:19: note: read of non-const variable 'archLen' is not allowed in a constant expression
ggml/src/ggml-cuda/ggml-cuda.cu:179:9: note: declared here
  179 |     int archLen = strlen(devName);
      |         ^

Signed-off-by: Adrien Gallouët angt@huggingface.co

  • Add a comment about archName

Signed-off-by: Adrien Gallouët adrien@gallouet.fr


Signed-off-by: Adrien Gallouët angt@huggingface.co
Signed-off-by: Adrien Gallouët adrien@gallouet.fr

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:

Don't miss a new llama.cpp release

NewReleases is sending notifications on new releases.