From: Aman Gupta Date: Tue, 30 Dec 2025 09:40:46 +0000 (+0800) Subject: CUDA: add log line when mxfp4 acceleration is used (#18483) X-Git-Tag: upstream/0.0.7599~20 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=d77d7c5c0654dc52b51f03941b12ae85d7227608;p=pkg%2Fggml%2Fsources%2Fllama.cpp CUDA: add log line when mxfp4 acceleration is used (#18483) * CUDA: add log line when mxfp4 acceleration is used * add in backend_get_features --- diff --git a/ggml/src/ggml-cuda/ggml-cuda.cu b/ggml/src/ggml-cuda/ggml-cuda.cu index 40ffe92c..55e1c20c 100644 --- a/ggml/src/ggml-cuda/ggml-cuda.cu +++ b/ggml/src/ggml-cuda/ggml-cuda.cu @@ -4785,6 +4785,16 @@ static ggml_backend_feature * ggml_backend_cuda_get_features(ggml_backend_reg_t features.push_back({ "FA_ALL_QUANTS", "1" }); #endif + { + const auto & info = ggml_cuda_info(); + for (int id = 0; id < info.device_count; ++id) { + if (blackwell_mma_available(info.devices[id].cc)) { + features.push_back({ "BLACKWELL_NATIVE_FP4", "1"}); + break; + } + } + } + #undef _STRINGIFY #undef STRINGIFY