Browse Source

CUDA: add log line when mxfp4 acceleration is used (#18483)

* CUDA: add log line when mxfp4 acceleration is used

* add in backend_get_features
Aman Gupta 1 month ago
parent
commit
d77d7c5c06
1 changed files with 10 additions and 0 deletions
  1. 10 0
      ggml/src/ggml-cuda/ggml-cuda.cu

+ 10 - 0
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