{"id":499770,"date":"2026-10-22T12:59:19","date_gmt":"2026-10-22T09:59:19","guid":{"rendered":"https:\/\/savepearlharbor.com\/?p=499770"},"modified":"2026-10-22T12:59:19","modified_gmt":"2026-10-22T09:59:19","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=499770","title":{"rendered":"NVIDIA CMP 50HX: \u0415\u0449\u0435 \u043d\u0435 \u0432\u0441\u0435 \u043f\u043e\u0442\u0435\u0440\u044f\u043d\u043e\u2026"},"content":{"rendered":"<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<h2>\u041f\u0440\u0435\u0434\u044b\u0441\u0442\u043e\u0440\u0438\u044f<\/h2>\n<p>\u0415\u0441\u0442\u044c \u0434\u043e\u043c\u0430\u0448\u043d\u0438\u0439 \u0441\u0435\u0440\u0432\u0435\u0440 \u043e\u0431\u044b\u0447\u043d\u043e\u0439 \u201c\u043f\u043e\u0434\u0441\u0442\u043e\u043b\u044c\u043d\u043e\u0439\u201d \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438. Proxmox \u0441 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c\u0438 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u043a\u0430\u043c\u0438. \u0412 \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u043c\u043e\u043c\u0435\u043d\u0442 \u043f\u0440\u0438\u043a\u0443\u043f\u0438\u043b \u043d\u0430 \u0430\u0443\u043a\u0446\u0438\u043e\u043d\u0435 NVIDIA CMP 50HX \u0437\u0430 \u043a\u043e\u043f\u0435\u0439\u043a\u0438, \u0440\u0430\u0434\u0438 \u043f\u043e\u0438\u0433\u0440\u0430\u0442\u044c\u0441\u044f \u0441 \u043f\u0440\u043e\u0441\u0442\u0435\u043d\u044c\u043a\u0438\u043c\u0438 \u043c\u043e\u0434\u0435\u043b\u044c\u043a\u0430\u043c\u0438. \u041c\u043e\u0434\u0435\u043b\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u044e \u0447\u0435\u0440\u0435\u0437 llama.cpp, \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e Whisper \u0434\u043b\u044f \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0432\u0430\u043d\u0438\u044f \u0440\u0435\u0447\u0438. \u0411\u044b\u0441\u0442\u0440\u043e \u0441\u043c\u0438\u0440\u0438\u043b\u0441\u044f \u0441\u043e \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c\u044e \u0440\u0430\u0431\u043e\u0442\u044b \u0438 \u0436\u0438\u043b \u0441 \u044d\u0442\u0438\u043c \u0432\u0441\u0435\u043c \u0441\u043f\u043e\u043a\u043e\u0439\u043d\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u0435\u0441\u044f\u0446\u0435\u0432, \u043f\u043e\u043a\u0430 \u043d\u0435 \u043d\u0430\u0442\u043a\u043d\u0443\u043b\u0441\u044f \u043d\u0430 \u0441\u0442\u0430\u0442\u044c\u044e <a href=\"https:\/\/habr.com\/ru\/articles\/948396\/\" rel=\"noopener nofollow\">NVIDIA CMP \u2013 \u043c\u0438\u043a\u0440\u043e\u0441\u043a\u043e\u043f\u044b \u0434\u043b\u044f \u0437\u0430\u0431\u0438\u0432\u0430\u043d\u0438\u044f \u0433\u0432\u043e\u0437\u0434\u0435\u0439? \u041a\u043e\u043f\u0430\u0435\u043c \u0433\u043b\u0443\u0431\u0436\u0435\u2026<\/a>.<\/p>\n<p>\u041e\u0447\u0435\u043d\u044c \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u043f\u0440\u043e\u0447\u0435\u0441\u0442\u044c <a href=\"https:\/\/habr.com\/ru\/articles\/948396\/\" rel=\"noopener nofollow\">\u0441\u0442\u0430\u0442\u044c\u044e<\/a>, \u043e\u0449\u0443\u0442\u0438\u043c\u043e \u043f\u0440\u043e\u0441\u0432\u0435\u0442\u043b\u044f\u0435\u0442 \u043c\u043e\u0437\u0433 \u0432 \u0447\u0430\u0441\u0442\u0438 \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b (\u0438 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430 \u0440\u0435\u0448\u0435\u043d\u0438\u044f), \u043e \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043f\u043e\u0439\u0434\u0435\u0442 \u0440\u0435\u0447\u044c \u043d\u0438\u0436\u0435.<\/p>\n<h2>\u041e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0435 \u043a \u201c\u0432\u044b\u0441\u0448\u0435\u043c\u0443 \u0440\u0430\u0437\u0443\u043c\u0443\u201d<\/h2>\n<p>\u041e\u0442\u043f\u0440\u0430\u0432\u0438\u043b \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 \u0441\u0442\u0430\u0442\u044c\u044e \u201c\u0432 \u0447\u0430\u0442\u201d \u0441 \u043f\u0440\u043e\u0441\u044c\u0431\u043e\u0439 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u0442\u044c \u0440\u0435\u0448\u0435\u043d\u0438\u0435. \u0412 \u0438\u0442\u043e\u0433\u0435 \u0447\u0435\u0440\u0435\u0437 20 \u043c\u0438\u043d\u0443\u0442 \u0443 \u043c\u0435\u043d\u044f \u0431\u044b\u043b \u0433\u043e\u0442\u043e\u0432\u044b\u0439 \u0441\u0442\u0435\u043d\u0434 \u0441 \u043f\u0430\u0442\u0447\u0435\u043c \u0434\u043b\u044f \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u043e\u0432 <code>ggml<\/code>. \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 <code>ggml<\/code> \u0432 <code>llama.cpp<\/code> \u0438 <code>whisper.cpp<\/code> \u043e\u0431\u0449\u0438\u0439, \u043e\u0434\u0438\u043d \u0438 \u0442\u043e\u0442 \u0436\u0435 \u043f\u0430\u0442\u0447 \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u0434\u043b\u044f \u043e\u0431\u043e\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432.<\/p>\n<blockquote>\n<p>\u0415\u0441\u043b\u0438 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u0430\u043c \u043d\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0435\u043d, \u043c\u043e\u0436\u043d\u043e \u0441\u0440\u0430\u0437\u0443 \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043a <a href=\"#result\" rel=\"noopener nofollow\">\u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u043c<\/a> \u0438 <a href=\"#conclusion\" rel=\"noopener nofollow\">\u0433\u043e\u0442\u043e\u0432\u043e\u043c\u0443 \u0440\u0435\u0448\u0435\u043d\u0438\u044e<\/a>.<\/p>\n<\/blockquote>\n<details class=\"spoiler\">\n<summary>llamacpp-cmp.patch<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"diff\">diff --git a\/ggml\/src\/ggml-cuda\/common.cuh b\/ggml\/src\/ggml-cuda\/common.cuhindex fea1cf9..046728a 100644--- a\/ggml\/src\/ggml-cuda\/common.cuh+++ b\/ggml\/src\/ggml-cuda\/common.cuh@@ -738,7 +738,17 @@ static __device__ __forceinline__ int ggml_cuda_dp4a(const int a, const int b, i  #else \/\/ defined(GGML_USE_HIP) -#if __CUDA_ARCH__ &gt;= GGML_CUDA_CC_DP4A || defined(GGML_USE_MUSA)+#if defined(GGML_CUDA_CMP_EMU_DP4A) &amp;&amp; !defined(GGML_USE_MUSA)+    \/\/ NVIDIA CMP mining GPUs: the hardware dp4a is throttled (about 1\/8 rate on CMP 40HX\/50HX).+    \/\/ Four plain integer multiply-adds written as inline PTX are faster and are not folded back+    \/\/ into dp4a by the compiler (a plain C expression would be).+    int r = c;+    asm(\"mad.lo.s32 %0, %1, %2, %0;\" : \"+r\"(r) : \"r\"((int)(int8_t)(a      )), \"r\"((int)(int8_t)(b      )));+    asm(\"mad.lo.s32 %0, %1, %2, %0;\" : \"+r\"(r) : \"r\"((int)(int8_t)(a &gt;&gt;  8)), \"r\"((int)(int8_t)(b &gt;&gt;  8)));+    asm(\"mad.lo.s32 %0, %1, %2, %0;\" : \"+r\"(r) : \"r\"((int)(int8_t)(a &gt;&gt; 16)), \"r\"((int)(int8_t)(b &gt;&gt; 16)));+    asm(\"mad.lo.s32 %0, %1, %2, %0;\" : \"+r\"(r) : \"r\"((int)(int8_t)(a &gt;&gt; 24)), \"r\"((int)(int8_t)(b &gt;&gt; 24)));+    return r;+#elif __CUDA_ARCH__ &gt;= GGML_CUDA_CC_DP4A || defined(GGML_USE_MUSA)     return __dp4a(a, b, c); #else \/\/ __CUDA_ARCH__ &gt;= GGML_CUDA_CC_DP4A || defined(GGML_USE_MUSA)     const int8_t * a8 = (const int8_t *) &amp;a;diff --git a\/ggml\/src\/ggml-cuda\/ggml-cuda.cu b\/ggml\/src\/ggml-cuda\/ggml-cuda.cuindex 9fe618f..c9ed96e 100644--- a\/ggml\/src\/ggml-cuda\/ggml-cuda.cu+++ b\/ggml\/src\/ggml-cuda\/ggml-cuda.cu@@ -1403,6 +1403,36 @@ static __global__ void k_compute_batched_ptrs(     ptrs_dst[0*ne23 + i12 + i13*ne12] = (      char *)         dst + i12*nbd2 + i13*nbd3; } +#if !defined(GGML_USE_HIP) &amp;&amp; !defined(GGML_USE_MUSA)+\/\/ NVIDIA CMP mining GPUs (CMP 40HX\/50HX\/90HX): tensor cores and FMA are throttled, so cuBLAS must be+\/\/ told not to use them (see https:\/\/habr.com\/ru\/articles\/948396\/: FP16 GEMM goes from ~3 to ~24+\/\/ \"units\" with CUBLAS_COMPUTE_16F_PEDANTIC on a CMP 50HX).+\/\/ GGML_CUDA_CMP_MODE=1 forces this on, =0 forces it off, unset\/other = auto-detect by device name.+static bool ggml_cuda_device_is_cmp(const int device) {+    static int8_t cache[GGML_CUDA_MAX_DEVICES] = {0}; \/\/ 0 = unknown, 1 = no, 2 = yes+    if (device &lt; 0 || device &gt;= GGML_CUDA_MAX_DEVICES) {+        return false;+    }+    if (cache[device] == 0) {+        const char * env = getenv(\"GGML_CUDA_CMP_MODE\");+        bool is_cmp;+        if (env != nullptr &amp;&amp; env[0] == '0') {+            is_cmp = false;+        } else if (env != nullptr &amp;&amp; env[0] == '1') {+            is_cmp = true;+        } else {+            cudaDeviceProp prop;+            is_cmp = cudaGetDeviceProperties(&amp;prop, device) == cudaSuccess &amp;&amp; strstr(prop.name, \"CMP\") != nullptr;+        }+        cache[device] = is_cmp ? 2 : 1;+        if (is_cmp) {+            GGML_LOG_INFO(\"%s: device %d treated as NVIDIA CMP: cuBLAS FP16 GEMM without tensor cores (PEDANTIC)\\n\", __func__, device);+        }+    }+    return cache[device] == 2;+}+#endif \/\/ !defined(GGML_USE_HIP) &amp;&amp; !defined(GGML_USE_MUSA)+ \/\/ Type traits for mapping ggml types to CUDA\/cuBLAS types template&lt;ggml_type T&gt; struct batched_mul_mat_traits;@@ -1577,6 +1607,15 @@ static void ggml_cuda_mul_mat_cublas_impl(ggml_backend_cuda_context &amp; ctx, const     GGML_ASSERT(ne12 % ne02 == 0);     GGML_ASSERT(ne13 % ne03 == 0); +    auto gemm_algo = CUBLAS_GEMM_DEFAULT_TENSOR_OP;+#if !defined(GGML_USE_HIP) &amp;&amp; !defined(GGML_USE_MUSA)+    if (compute_type == GGML_TYPE_F16 &amp;&amp; cu_compute_type == CUBLAS_COMPUTE_16F &amp;&amp; ggml_cuda_device_is_cmp(ctx.device)) {+        \/\/ NVIDIA CMP: the tensor-core path is throttled; pure FP16 CUDA-core GEMM is ~7x faster.+        cu_compute_type = CUBLAS_COMPUTE_16F_PEDANTIC;+        gemm_algo       = CUBLAS_GEMM_DEFAULT;+    }+#endif \/\/ !defined(GGML_USE_HIP) &amp;&amp; !defined(GGML_USE_MUSA)+     \/\/ broadcast factors     const int64_t r2 = ne12\/ne02;     const int64_t r3 = ne13\/ne03;@@ -1599,7 +1638,7 @@ static void ggml_cuda_mul_mat_cublas_impl(ggml_backend_cuda_context &amp; ctx, const                            src1_ptr, cu_data_type_b, s11,                     beta,   dst_ptr, cu_data_type,   ldc,                     cu_compute_type,-                    CUBLAS_GEMM_DEFAULT_TENSOR_OP));+                    gemm_algo));     } else if (r2 == 1 &amp;&amp; r3 == 1 &amp;&amp; is_src0_cont_2 &amp;&amp; is_src1_cont_2) {         \/\/ with a [0, 2, 1, 3] perm. and ne02==1 the matrix strides need to be determined from dim 3:         const int64_t sma = ne02 == 1 ? s03 : s02;@@ -1615,7 +1654,7 @@ static void ggml_cuda_mul_mat_cublas_impl(ggml_backend_cuda_context &amp; ctx, const                 beta,   dst_ptr, cu_data_type,   ldc, ne1*ldc, \/\/ strideC                 ne12*ne13,                 cu_compute_type,-                CUBLAS_GEMM_DEFAULT_TENSOR_OP));+                gemm_algo));     } else {         \/\/ use cublasGemmBatchedEx         const int64_t ne23 = ne12*ne13;@@ -1653,7 +1692,7 @@ static void ggml_cuda_mul_mat_cublas_impl(ggml_backend_cuda_context &amp; ctx, const                 beta,  (      void **) (ptrs_dst.get() + 0*ne23), cu_data_type,   ldc,                 ne23,                 cu_compute_type,-                CUBLAS_GEMM_DEFAULT_TENSOR_OP));+                gemm_algo));     }      \/\/ Convert output back to F32 if needed<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><span class=\"sc-logo-wrapper\"><\/span><\/a><\/div><\/pre>\n<\/div>\n<\/details>\n<blockquote>\n<p><strong>\u0412\u0430\u0436\u043d\u043e\u0435 \u0437\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u0435:<\/strong> \u041f\u0430\u0442\u0447 \u0441\u043e\u0431\u0440\u0430\u043d \u0434\u043b\u044f \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 (\u043d\u0430 \u0434\u0430\u0442\u0443 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438 \u0441\u0442\u0430\u0442\u044c\u0438) \u0432\u0435\u0442\u043e\u043a \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0435\u0432. \u041d\u0430 llama.cpp (\u0432\u0435\u0442\u043a\u0430 <code>a0e6dc7<\/code>) \u043f\u0430\u0442\u0447 \u043d\u0430\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0447\u0438\u0441\u0442\u043e (<code>git apply<\/code>). \u041d\u0430 whisper.cpp (\u0432\u0435\u0442\u043a\u0430 <code>0c7be69<\/code>) \u0441\u0442\u0440\u043e\u043a\u0438 \u0441\u0434\u0432\u0438\u043d\u0443\u0442\u044b \u043d\u0430 45, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 <code>git apply<\/code> \u043e\u0442\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u043d\u043e <code>patch -p1<\/code> \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442 \u0432\u0441\u0435 \u043f\u044f\u0442\u044c \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u043e\u0432 (fuzz 1\u20132). \u041f\u043e\u0441\u043b\u0435 \u043d\u0430\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043f\u0430\u0442\u0447\u0430 \u0432\u0441\u0435 \u0442\u0440\u0438 \u0432\u044b\u0437\u043e\u0432\u0430 GEMM \u0432 <code>ggml_cuda_mul_mat_cublas_impl<\/code> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u043d\u043e\u0432\u0443\u044e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e <code>gemm_algo<\/code>.<\/p>\n<p>\u0414\u043b\u044f \u0431\u0443\u0434\u0443\u0449\u0438\u0445 \u0432\u0435\u0442\u043e\u043a, \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u043e \u043f\u0430\u0442\u0447 \u043d\u0443\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c (\u0438\u043b\u0438 \u043f\u0435\u0440\u0435\u0434\u0435\u043b\u044b\u0432\u0430\u0442\u044c)<\/p>\n<\/blockquote>\n<h3>\u0427\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442 \u043f\u0430\u0442\u0447<\/h3>\n<h4>1. cuBLAS FP16 \u0431\u0435\u0437 \u0442\u0435\u043d\u0437\u043e\u0440\u043d\u044b\u0445 \u044f\u0434\u0435\u0440 (ggml-cuda.cu)<\/h4>\n<p>\u0412 <code>ggml_cuda_mul_mat_cublas_impl<\/code> \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f <code>ggml_cuda_device_is_cmp()<\/code>. \u041e\u043d\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u043a\u0430\u0440\u0442\u0443 CMP \u043f\u043e \u0438\u043c\u0435\u043d\u0438 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0438 \u043a\u044d\u0448\u0438\u0440\u0443\u0435\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442. \u041d\u0430 CMP \u0432\u044b\u0437\u043e\u0432\u044b <code>cublasGemmEx<\/code> \/ <code>cublasGemmStridedBatchedEx<\/code> \/ <code>cublasGemmBatchedEx<\/code> \u043f\u043e\u043b\u0443\u0447\u0430\u044e\u0442 \u0434\u0440\u0443\u0433\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b:<\/p>\n<ul>\n<li>\n<p><code>CUBLAS_COMPUTE_16F<\/code> \u2192 <code>CUBLAS_COMPUTE_16F_PEDANTIC<\/code>;<\/p>\n<\/li>\n<li>\n<p><code>CUBLAS_GEMM_DEFAULT_TENSOR_OP<\/code> \u2192 <code>CUBLAS_GEMM_DEFAULT<\/code>.<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435\u043c \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f <code>GGML_CUDA_CMP_MODE<\/code>: <code>1<\/code> \u043f\u0440\u0438\u043d\u0443\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0440\u0435\u0436\u0438\u043c, <code>0<\/code> \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0435\u0442, \u0431\u0435\u0437 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0430\u0432\u0442\u043e\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435. \u041f\u0440\u0438 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u0438 \u0432 \u043b\u043e\u0433 \u043f\u0438\u0448\u0435\u0442\u0441\u044f \u0441\u0442\u0440\u043e\u043a\u0430:<\/p>\n<pre><code>ggml_cuda_device_is_cmp: device 0 treated as NVIDIA CMP: cuBLAS FP16 GEMM without tensor cores (PEDANTIC)<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><span class=\"sc-logo-wrapper icon-only\"><\/span><\/a><\/div><\/pre>\n<p>\u041f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0441\u043f\u043e\u0441\u043e\u0431 \u043c\u0430\u0442\u0440\u0438\u0447\u043d\u043e\u0433\u043e \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u044f \u0441 \u0432\u0435\u0441\u0430\u043c\u0438 \u0432 F16 (\u044d\u0442\u043e \u043f\u0440\u0435\u0436\u0434\u0435 \u0432\u0441\u0435\u0433\u043e <code>Whisper<\/code>).<\/p>\n<h4>2. \u042d\u043c\u0443\u043b\u044f\u0446\u0438\u044f dp4a (common.cuh)<\/h4>\n<p>\u0415\u0441\u043b\u0438 \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u0441 <code>-DGGML_CUDA_CMP_EMU_DP4A<\/code>, \u0444\u0443\u043d\u043a\u0446\u0438\u044f <code>ggml_cuda_dp4a<\/code> \u0432\u043c\u0435\u0441\u0442\u043e <code>__dp4a<\/code> \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0447\u0435\u0442\u044b\u0440\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 <code>mad.lo.s32<\/code>, \u0437\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0435 Inline-PTX:<\/p>\n<pre><code class=\"cpp\">int r = c;asm(\"mad.lo.s32 %0, %1, %2, %0;\" : \"+r\"(r) : \"r\"((int)(int8_t)(a      )), \"r\"((int)(int8_t)(b      )));asm(\"mad.lo.s32 %0, %1, %2, %0;\" : \"+r\"(r) : \"r\"((int)(int8_t)(a &gt;&gt;  8)), \"r\"((int)(int8_t)(b &gt;&gt;  8)));asm(\"mad.lo.s32 %0, %1, %2, %0;\" : \"+r\"(r) : \"r\"((int)(int8_t)(a &gt;&gt; 16)), \"r\"((int)(int8_t)(b &gt;&gt; 16)));asm(\"mad.lo.s32 %0, %1, %2, %0;\" : \"+r\"(r) : \"r\"((int)(int8_t)(a &gt;&gt; 24)), \"r\"((int)(int8_t)(b &gt;&gt; 24)));return r;<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><span class=\"sc-logo-wrapper icon-only\"><\/span><\/a><\/div><\/pre>\n<p>Inline-PTX \u0437\u0434\u0435\u0441\u044c \u043d\u0443\u0436\u0435\u043d \u043f\u043e\u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u043e\u0431\u044b\u0447\u043d\u043e\u0435 C-\u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u0441\u0432\u0435\u0440\u043d\u0443\u043b \u0431\u044b \u043e\u0431\u0440\u0430\u0442\u043d\u043e \u0432 <code>dp4a<\/code>. \u041d\u0430 <code>dp4a<\/code> \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u044b \u044f\u0434\u0440\u0430 \u043a\u0432\u0430\u043d\u0442\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u044f \u043c\u0430\u0442\u0440\u0438\u0446\u044b \u043d\u0430 \u0432\u0435\u043a\u0442\u043e\u0440 (MMVQ) \u0438 MMQ \u0431\u0435\u0437 \u0442\u0435\u043d\u0437\u043e\u0440\u043d\u044b\u0445 \u044f\u0434\u0435\u0440, \u0430 \u0437\u043d\u0430\u0447\u0438\u0442, \u043f\u0440\u0435\u0436\u0434\u0435 \u0432\u0441\u0435\u0433\u043e \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u0442\u043e\u043a\u0435\u043d\u043e\u0432.<\/p>\n<h2>\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u0441\u0442\u0435\u043d\u0434\u0430 \u0438 \u0441\u0431\u043e\u0440\u043a\u0430 \u0431\u0435\u043d\u0447\u043c\u0430\u0440\u043a\u043e\u0432<\/h2>\n<blockquote>\n<p>\u0415\u0441\u043b\u0438 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u0430\u043c \u043d\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0435\u043d, \u043c\u043e\u0436\u043d\u043e \u0441\u0440\u0430\u0437\u0443 \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043a <a href=\"#result\" rel=\"noopener nofollow\">\u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u043c<\/a> \u0438 <a href=\"#conclusion\" rel=\"noopener nofollow\">\u0433\u043e\u0442\u043e\u0432\u043e\u043c\u0443 \u0440\u0435\u0448\u0435\u043d\u0438\u044e<\/a>.<\/p>\n<\/blockquote>\n<h4>0. \u041c\u043e\u0439 \u0441\u0442\u0435\u043d\u0434<\/h4>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<th>\n<p align=\"left\">\n<\/th>\n<th>\n<p align=\"left\">\n<\/th>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">GPU<\/p>\n<\/td>\n<td>\n<p align=\"left\">NVIDIA CMP 50HX, 10 \u0413\u0411, compute capability 7.5<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">\u0414\u0440\u0430\u0439\u0432\u0435\u0440<\/p>\n<\/td>\n<td>\n<p align=\"left\">580.126.09<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">CUDA Toolkit<\/p>\n<\/td>\n<td>\n<p align=\"left\">12.8 (\u0441\u0431\u043e\u0440\u043a\u0430), \u0434\u0440\u0430\u0439\u0432\u0435\u0440 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 CUDA 13.0<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">CPU \/ RAM<\/p>\n<\/td>\n<td>\n<p align=\"left\">12 \u043f\u043e\u0442\u043e\u043a\u043e\u0432, 32 \u0413\u0411<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">\u041e\u0421<\/p>\n<\/td>\n<td>\n<p align=\"left\">Proxmox VE (\u044f\u0434\u0440\u043e 6.8.12-pve)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">llama.cpp<\/p>\n<\/td>\n<td>\n<p align=\"left\"><code>a0e6dc7<\/code> (master \u043d\u0430 15.10.2026)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">whisper.cpp<\/p>\n<\/td>\n<td>\n<p align=\"left\"><code>0c7be69<\/code> (master \u043d\u0430 15.10.2026)<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<h4>1. \u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043e\u0431\u043e\u0440\u0443\u0434\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u0430<\/h4>\n<pre><code class=\"bash\">nvidia-smi --query-gpu=name,compute_cap,driver_version,memory.total --format=csv<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><span class=\"sc-logo-wrapper icon-only\"><\/span><\/a><\/div><\/pre>\n<p>\u0412 \u043a\u043e\u043b\u043e\u043d\u043a\u0435 <code>name<\/code> \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u0441\u043b\u043e\u0432\u043e <code>CMP<\/code> (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <code>NVIDIA CMP 50HX<\/code>), \u0438\u043d\u0430\u0447\u0435 \u0430\u0432\u0442\u043e\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0432 \u043f\u0430\u0442\u0447\u0435 \u043d\u0435 \u0441\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442. \u0414\u0440\u0430\u0439\u0432\u0435\u0440 \u043d\u0443\u0436\u0435\u043d \u0441 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 CUDA 12.x: \u0432 \u0432\u044b\u0432\u043e\u0434\u0435 <code>nvidia-smi<\/code> \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c <code>CUDA Version: 12.x<\/code> \u0438\u043b\u0438 \u0432\u044b\u0448\u0435.<\/p>\n<p>\u0414\u043b\u044f \u0434\u0440\u0443\u0433\u0438\u0445 CMP \u043f\u043e\u0434\u0441\u0442\u0430\u0432\u044c\u0442\u0435 \u0441\u0432\u043e\u044e \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443 \u0432\u043c\u0435\u0441\u0442\u043e <code>75<\/code>:<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<th>\n<p align=\"left\">\u041a\u0430\u0440\u0442\u0430<\/p>\n<\/th>\n<th>\n<p align=\"left\">\u0427\u0438\u043f<\/p>\n<\/th>\n<th>\n<p align=\"left\"><code>CMAKE_CUDA_ARCHITECTURES<\/code><\/p>\n<\/th>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">CMP 30HX, 40HX, 50HX<\/p>\n<\/td>\n<td>\n<p align=\"left\">Turing<\/p>\n<\/td>\n<td>\n<p align=\"left\"><code>75<\/code><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<blockquote>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u043b\u0430\u0441\u044c \u0442\u043e\u043b\u044c\u043a\u043e CMP 50HX<\/p>\n<\/blockquote>\n<h4>2. \u041f\u0430\u043a\u0435\u0442\u044b \u0438 CUDA Toolkit<\/h4>\n<p>Debian \/ Ubuntu:<\/p>\n<pre><code class=\"bash\">sudo apt updatesudo apt install -y build-essential cmake git ccache curl python3cmake --version    # \u043d\u0443\u0436\u0435\u043d 3.18+, \u043f\u0440\u043e\u0432\u0435\u0440\u0435\u043d\u043e \u043d\u0430 3.25<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><span class=\"sc-logo-wrapper icon-only\"><\/span><\/a><\/div><\/pre>\n<p>\u0423\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e \u0432 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u043c \u0442\u0443\u043b\u043a\u0438\u0442\u0435 \u0435\u0441\u0442\u044c <strong>nvcc \u0438 cuBLAS<\/strong>:<\/p>\n<pre><code class=\"bash\">ls $CUDA_ROOT\/bin\/nvccls $CUDA_ROOT\/include\/cublas_v2.h $CUDA_ROOT\/lib64\/libcublas.so*$CUDA_ROOT\/bin\/nvcc --version<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><span class=\"sc-logo-wrapper icon-only\"><\/span><\/a><\/div><\/pre>\n<p>\u0415\u0441\u043b\u0438 <code>cublas_v2.h<\/code> \u043d\u0435\u0442, \u044d\u0442\u043e\u0442 \u0442\u0443\u043b\u043a\u0438\u0442 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d \u043d\u0435\u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e; \u0432\u043e\u0437\u044c\u043c\u0438\u0442\u0435 \u0434\u0440\u0443\u0433\u043e\u0439 (\u043d\u0430 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u0432 12.8). \u041f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c cuBLAS \u043c\u043e\u0436\u043d\u043e \u0442\u0430\u043a:<\/p>\n<pre><code class=\"bash\">sudo apt install -y cuda-toolkit-12-8     # \u0438\u043b\u0438 libcublas-dev-12-8 \u043f\u0440\u0438 \u043d\u0430\u043b\u0438\u0447\u0438\u0438 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f NVIDIA<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><span class=\"sc-logo-wrapper icon-only\"><\/span><\/a><\/div><\/pre>\n<p>\u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435, \u043a\u0443\u0434\u0430 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0441\u0438\u043c\u043b\u0438\u043d\u043a <code>\/usr\/local\/cuda<\/code>:<\/p>\n<pre><code class=\"bash\">readlink -f \/usr\/local\/cuda<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><span class=\"sc-logo-wrapper icon-only\"><\/span><\/a><\/div><\/pre>\n<p>\u0415\u0441\u043b\u0438 \u043e\u043d \u0432\u0435\u0434\u0451\u0442 \u043d\u0435 \u043d\u0430 <code>$CUDA_ROOT<\/code> (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043d\u0430 CUDA 13), \u044d\u0442\u043e \u043d\u0435 \u0441\u0442\u0440\u0430\u0448\u043d\u043e, \u043d\u043e \u0432 cmake <strong>\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e<\/strong> \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0439\u0442\u0435 <code>-DCUDAToolkit_ROOT<\/code>, \u0438\u043d\u0430\u0447\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u0430 \u043e\u0448\u0438\u0431\u043a\u0430 \u043b\u0438\u043d\u043a\u043e\u0432\u043a\u0438 <code>cudaGetDeviceProperties_v2<\/code>.<\/p>\n<h4>3. C\u0431\u043e\u0440\u043a\u0430 \u0431\u0435\u043d\u0447\u043c\u0430\u0440\u043a\u043e\u0432 \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f<\/h4>\n<p>\u0414\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0432\u0441\u0435\u0445 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432, \u0441\u043e\u0431\u0440\u0430\u043b 5 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u0441 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u043e\u0439 \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u0435\u0439 \u043e\u043f\u0446\u0438\u0439 \u0438 \u043f\u0440\u043e\u0433\u043d\u0430\u043b \u0442\u0435\u0441\u0442\u0430\u043c\u0438. \u041a\u0430\u0436\u0434\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0441\u043e\u0431\u0438\u0440\u0430\u043b\u0441\u044f \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u043c \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 \u0441 \u043e\u0431\u0449\u0438\u043c\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438:<\/p>\n<pre><code>-DGGML_CUDA=ON \\-DCMAKE_BUILD_TYPE=Release \\-DCMAKE_CUDA_COMPILER=\/usr\/local\/cuda-12.8\/bin\/nvcc<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><span class=\"sc-logo-wrapper icon-only\"><\/span><\/a><\/div><\/pre>\n<p>\u0412 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u0441\u0431\u043e\u0440\u043a\u0438<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<th>\n<p align=\"left\">\u0412\u0430\u0440\u0438\u0430\u043d\u0442<\/p>\n<\/th>\n<th>\n<p align=\"left\">\u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430<\/p>\n<\/th>\n<th>\n<p align=\"left\">\u0414\u043e\u043f. \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b<\/p>\n<\/th>\n<th>\n<p align=\"left\">\u0421\u0431\u043e\u0440\u043a\u0430<\/p>\n<\/th>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\"><strong>A<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\">75<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u2014<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0411\u0430\u0437\u043e\u0432\u0430\u044f \u0441\u0431\u043e\u0440\u043a\u0430 (\u0431\u0435\u0437 \u043f\u0430\u0442\u0447\u0430)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\"><strong>B<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\">61-virtual<\/p>\n<\/td>\n<td>\n<p align=\"left\"><code>GGML_CUDA_FORCE_MMQ=ON<\/code><\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041a\u043e\u0434 Pascal: \u0431\u0435\u0437 \u0442\u0435\u043d\u0437\u043e\u0440\u043d\u044b\u0445 \u044f\u0434\u0435\u0440, MMQ \u043d\u0430 dp4a<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\"><strong>C<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\">61-virtual<\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>B<\/strong> + <code>-fmad=false<\/code><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>B<\/strong> + \u0437\u0430\u043f\u0440\u0435\u0442 FMA \u0432\u043e \u0432\u0441\u0435\u0445 \u044f\u0434\u0440\u0430\u0445<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\"><strong>D<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\">61-virtual<\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>C<\/strong> + <code>-DGGML_CUDA_CMP_EMU_DP4A<\/code><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>C<\/strong> + \u044d\u043c\u0443\u043b\u044f\u0446\u0438\u044f dp4a<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\"><strong>E<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\">75<\/p>\n<\/td>\n<td>\n<p align=\"left\"><code>-fmad=false -DGGML_CUDA_CMP_EMU_DP4A<\/code><\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0413\u0438\u0431\u0440\u0438\u0434: \u0442\u0435\u043d\u0437\u043e\u0440\u043d\u044b\u0435 \u044f\u0434\u0440\u0430 \u0434\u043b\u044f MMQ \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u044b, FMA \u0438 dp4a \u0443\u0431\u0440\u0430\u043d\u044b<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<details class=\"spoiler\">\n<summary>\u041a\u043e\u043c\u0430\u043d\u0434\u044b \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u043a\u0438<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"bash\"># A: \u0411\u0430\u0437\u043e\u0432\u0430\u044f \u0441\u0431\u043e\u0440\u043a\u0430 (\u0431\u0435\u0437 \u043f\u0430\u0442\u0447\u0430)cmake -B build_a -DGGML_CUDA=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_CUDA_COMPILER=\/usr\/local\/cuda-12.8\/bin\/nvcc -DCMAKE_CUDA_ARCHITECTURES=75# B: \u041a\u043e\u0434 Pascal: \u0431\u0435\u0437 \u0442\u0435\u043d\u0437\u043e\u0440\u043d\u044b\u0445 \u044f\u0434\u0435\u0440, MMQ \u043d\u0430 dp4acmake -B build_b -DGGML_CUDA=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_CUDA_COMPILER=\/usr\/local\/cuda-12.8\/bin\/nvcc -DCMAKE_CUDA_ARCHITECTURES=\"61-virtual\" -DGGML_CUDA_FORCE_MMQ=ON# C: B + \u0437\u0430\u043f\u0440\u0435\u0442 FMA \u0432\u043e \u0432\u0441\u0435\u0445 \u044f\u0434\u0440\u0430\u0445cmake -B build_c -DGGML_CUDA=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_CUDA_COMPILER=\/usr\/local\/cuda-12.8\/bin\/nvcc -DCMAKE_CUDA_ARCHITECTURES=\"61-virtual\" -DGGML_CUDA_FORCE_MMQ=ON \\      -DCMAKE_CUDA_FLAGS=\"-fmad=false\"# D: C + \u044d\u043c\u0443\u043b\u044f\u0446\u0438\u044f dp4acmake -B build_d -DGGML_CUDA=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_CUDA_COMPILER=\/usr\/local\/cuda-12.8\/bin\/nvcc -DCMAKE_CUDA_ARCHITECTURES=\"61-virtual\" -DGGML_CUDA_FORCE_MMQ=ON \\      -DCMAKE_CUDA_FLAGS=\"-fmad=false -DGGML_CUDA_CMP_EMU_DP4A\"# E: \u0413\u0438\u0431\u0440\u0438\u0434: \u0442\u0435\u043d\u0437\u043e\u0440\u043d\u044b\u0435 \u044f\u0434\u0440\u0430 \u0434\u043b\u044f MMQ \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u044b, FMA \u0438 dp4a \u0443\u0431\u0440\u0430\u043d\u044bcmake -B build_e -DGGML_CUDA=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_CUDA_COMPILER=\/usr\/local\/cuda-12.8\/bin\/nvcc -DCMAKE_CUDA_ARCHITECTURES=75 -fmad=false -DGGML_CUDA_CMP_EMU_DP4Afor n in a b c d e; do cmake --build build_$n -j --target llama-bench; done<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><span class=\"sc-logo-wrapper icon-only\"><\/span><\/a><\/div><\/pre>\n<\/div>\n<\/details>\n<hr\/>\n<p><a class=\"anchor\" name=\"result\" id=\"result\"><\/a><\/p>\n<h2>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b: llama.cpp<\/h2>\n<h4>\u041c\u0435\u0442\u043e\u0434\u0438\u043a\u0430 \u0437\u0430\u043c\u0435\u0440\u043e\u0432<\/h4>\n<ul>\n<li>\n<p><strong>LLM:<\/strong> <code>llama-bench -m &lt;\u043c\u043e\u0434\u0435\u043b\u044c&gt; -p 512 -n 128 -ngl 99<\/code>, \u043f\u043e 5 \u043f\u043e\u0432\u0442\u043e\u0440\u043e\u0432 (\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e), <code>pp512<\/code> \u2014 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043f\u0440\u043e\u043c\u043f\u0442\u0430 \u0438\u0437 512 \u0442\u043e\u043a\u0435\u043d\u043e\u0432 (prefill), <code>tg128<\/code> \u2014 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 128 \u0442\u043e\u043a\u0435\u043d\u043e\u0432. \u041e\u0431\u0435 \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u0432 \u0442\u043e\u043a\u0435\u043d\u0430\u0445 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0443, \u0431\u043e\u043b\u044c\u0448\u0435 \u2014 \u043b\u0443\u0447\u0448\u0435.<\/p>\n<\/li>\n<li>\n<p><strong>\u0424\u043b\u0430\u0433\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430:<\/strong> <code>-fa 1 -ctk q8_0 -ctv q8_0<\/code> (flash attention \u0438 KV-\u043a\u044d\u0448 \u0432 q8_0).<\/p>\n<\/li>\n<li>\n<p><strong>Whisper:<\/strong> <code>whisper-cli<\/code> \u0441 \u043c\u043e\u0434\u0435\u043b\u044c\u044e large-v3-turbo \u043d\u0430 <code>samples\/jfk.wav<\/code> (11 \u0441\u0435\u043a\u0443\u043d\u0434 \u0430\u0443\u0434\u0438\u043e), \u0432\u0440\u0435\u043c\u044f \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f (encode) \u0438 \u043e\u0431\u0449\u0435\u0435 \u0432\u0440\u0435\u043c\u044f.<\/p>\n<\/li>\n<li>\n<p><strong>\u041e\u0447\u0438\u0441\u0442\u043a\u0430:<\/strong> \u041f\u0435\u0440\u0435\u0434 \u043a\u0430\u0436\u0434\u044b\u043c \u0437\u0430\u043c\u0435\u0440\u043e\u043c GPU \u0431\u044b\u043b \u043f\u0443\u0441\u0442 (0 \u041c\u0438\u0411 \u0437\u0430\u043d\u044f\u0442\u043e), \u043a\u0430\u0436\u0434\u044b\u0439 \u043f\u0440\u043e\u0433\u043e\u043d \u0448\u0451\u043b \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e 5 \u043c\u0438\u043d\u0443\u0442.<\/p>\n<\/li>\n<\/ul>\n<h4>1. Qwen3.5-9B Q4_K_M (5,28 \u0413\u0438\u0411)<\/h4>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<th>\n<p align=\"left\">\u0421\u0431\u043e\u0440\u043a\u0430<\/p>\n<\/th>\n<th>\n<p align=\"left\">pp512, \u0442\u043e\u043a\/\u0441<\/p>\n<\/th>\n<th>\n<p align=\"left\">tg128, \u0442\u043e\u043a\/\u0441<\/p>\n<\/th>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">A \u2014 \u0431\u0430\u0437\u043e\u0432\u0430\u044f<\/p>\n<\/td>\n<td>\n<p align=\"left\">307.8 \u00b1 0.6<\/p>\n<\/td>\n<td>\n<p align=\"left\">29.9 \u00b1 0.5<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">B \u2014 Pascal + MMQ<\/p>\n<\/td>\n<td>\n<p align=\"left\">84.4 \u00b1 0.1<\/p>\n<\/td>\n<td>\n<p align=\"left\">28.8 \u00b1 0.6<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">C \u2014 B + \u0431\u0435\u0437 FMA<\/p>\n<\/td>\n<td>\n<p align=\"left\">111.7 \u00b1 0.1<\/p>\n<\/td>\n<td>\n<p align=\"left\">44.7 \u00b1 0.3<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">D \u2014 C + \u044d\u043c\u0443\u043b\u044f\u0446\u0438\u044f dp4a<\/p>\n<\/td>\n<td>\n<p align=\"left\">105.9 \u00b1 0.1<\/p>\n<\/td>\n<td>\n<p align=\"left\">54.6 \u00b1 0.2<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\"><strong>E \u2014 sm_75 + \u0431\u0435\u0437 FMA + \u044d\u043c\u0443\u043b\u044f\u0446\u0438\u044f dp4a<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>412.0 \u00b1 1.6<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>58.8 \u00b1 0.2<\/strong><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<h4>2. Qwen3.8-9B-Distill Q4_K_M (5,37 \u0413\u0438\u0411)<\/h4>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<th>\n<p align=\"left\">\u0421\u0431\u043e\u0440\u043a\u0430<\/p>\n<\/th>\n<th>\n<p align=\"left\">pp512, \u0442\u043e\u043a\/\u0441<\/p>\n<\/th>\n<th>\n<p align=\"left\">tg128, \u0442\u043e\u043a\/\u0441<\/p>\n<\/th>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">A \u2014 \u0431\u0430\u0437\u043e\u0432\u0430\u044f<\/p>\n<\/td>\n<td>\n<p align=\"left\">309.5 \u00b1 0.8<\/p>\n<\/td>\n<td>\n<p align=\"left\">30.0 \u00b1 0.7<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">B \u2014 Pascal + MMQ<\/p>\n<\/td>\n<td>\n<p align=\"left\">84.7 \u00b1 0.1<\/p>\n<\/td>\n<td>\n<p align=\"left\">29.4 \u00b1 0.6<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">C \u2014 B + \u0431\u0435\u0437 FMA<\/p>\n<\/td>\n<td>\n<p align=\"left\">111.7 \u00b1 0.1<\/p>\n<\/td>\n<td>\n<p align=\"left\">45.5 \u00b1 0.2<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">D \u2014 C + \u044d\u043c\u0443\u043b\u044f\u0446\u0438\u044f dp4a<\/p>\n<\/td>\n<td>\n<p align=\"left\">108.0 \u00b1 0.1<\/p>\n<\/td>\n<td>\n<p align=\"left\">55.1 \u00b1 0.1<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\"><strong>E \u2014 sm_75 + \u0431\u0435\u0437 FMA + \u044d\u043c\u0443\u043b\u044f\u0446\u0438\u044f dp4a<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>412.6 \u00b1 1.4<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>57.8 \u00b1 0.1<\/strong><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<h4>3. Qwen3.8-9B-Distill Q5_K_M (6,18 \u0413\u0438\u0411)<\/h4>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<th>\n<p align=\"left\">\u0421\u0431\u043e\u0440\u043a\u0430<\/p>\n<\/th>\n<th>\n<p align=\"left\">pp512, \u0442\u043e\u043a\/\u0441<\/p>\n<\/th>\n<th>\n<p align=\"left\">tg128, \u0442\u043e\u043a\/\u0441<\/p>\n<\/th>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">A \u2014 \u0431\u0430\u0437\u043e\u0432\u0430\u044f<\/p>\n<\/td>\n<td>\n<p align=\"left\">311.4 \u00b1 0.3<\/p>\n<\/td>\n<td>\n<p align=\"left\">29.9 \u00b1 0.2<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">B \u2014 Pascal + MMQ<\/p>\n<\/td>\n<td>\n<p align=\"left\">84.7 \u00b1 0.1<\/p>\n<\/td>\n<td>\n<p align=\"left\">28.4 \u00b1 0.7<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">C \u2014 B + \u0431\u0435\u0437 FMA<\/p>\n<\/td>\n<td>\n<p align=\"left\">111.6 \u00b1 0.1<\/p>\n<\/td>\n<td>\n<p align=\"left\">44.2 \u00b1 0.3<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">D \u2014 C + \u044d\u043c\u0443\u043b\u044f\u0446\u0438\u044f dp4a<\/p>\n<\/td>\n<td>\n<p align=\"left\">117.1 \u00b1 0.1<\/p>\n<\/td>\n<td>\n<p align=\"left\">51.2 \u00b1 0.0<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\"><strong>E \u2014 sm_75 + \u0431\u0435\u0437 FMA + \u044d\u043c\u0443\u043b\u044f\u0446\u0438\u044f dp4a<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>410.7 \u00b1 1.4<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>53.2 \u00b1 0.2<\/strong><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<h3>\u0427\u0442\u043e \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u0438 \u0437\u0430\u043c\u0435\u0440\u044b<\/h3>\n<p><strong>1. \u0422\u0435\u043d\u0437\u043e\u0440\u043d\u044b\u0435 \u044f\u0434\u0440\u0430 \u0434\u043b\u044f INT8 \u043d\u0430 CMP 50HX \u043d\u0435 \u0443\u0440\u0435\u0437\u0430\u043d\u044b, \u043f\u043e \u043a\u0440\u0430\u0439\u043d\u0435\u0439 \u043c\u0435\u0440\u0435 \u0432 MMQ.<\/strong>  \u0412\u0430\u0440\u0438\u0430\u043d\u0442\u044b B\u2013D, \u0433\u0434\u0435 \u0442\u0435\u043d\u0437\u043e\u0440\u043d\u044b\u0445 \u044f\u0434\u0435\u0440 \u043d\u0435\u0442 \u0432\u043e\u043e\u0431\u0449\u0435, \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e\u0442 \u043f\u0440\u043e\u043c\u043f\u0442 \u0432 3\u20134 \u0440\u0430\u0437\u0430 \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u0435\u0435 \u0431\u0430\u0437\u043e\u0432\u043e\u0433\u043e. \u0417\u043d\u0430\u0447\u0438\u0442 \u043e\u0431\u0445\u043e\u0434\u0438\u0442\u044c \u0438\u0445 \u043d\u0435 \u043d\u0443\u0436\u043d\u043e.<\/p>\n<p><strong>2. \u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044e \u0442\u043e\u0440\u043c\u043e\u0437\u044f\u0442 FMA \u0438 dp4a.<\/strong> \u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u0442\u043e\u043a\u0435\u043d\u043e\u0432 \u0443\u043f\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u0432 \u044f\u0434\u0440\u0430 MMVQ, \u0430 \u043e\u043d\u0438 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u044b \u043d\u0430 <code>dp4a<\/code> \u0438 FMA. \u0415\u0441\u043b\u0438 \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0442\u044c \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u00abPascal-\u0432\u0435\u0442\u043a\u0438\u00bb, \u043f\u0435\u0440\u0435\u0445\u043e\u0434 \u043e\u0442 B \u043a C (\u0437\u0430\u043f\u0440\u0435\u0442 FMA) \u0434\u0430\u0451\u0442 +55% \u043a \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438, \u0430 \u043e\u0442 C \u043a D (\u044d\u043c\u0443\u043b\u044f\u0446\u0438\u044f dp4a) \u0435\u0449\u0451 +16\u201323%.<\/p>\n<p><strong>3. \u041e\u0442\u0441\u044e\u0434\u0430 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 E: \u043b\u0443\u0447\u0448\u0435\u0435 \u043e\u0442 \u043e\u0431\u043e\u0438\u0445.<\/strong> \u041e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c <code>sm_75<\/code>, \u0447\u0442\u043e\u0431\u044b MMQ \u0448\u0451\u043b \u0447\u0435\u0440\u0435\u0437 \u0442\u0435\u043d\u0437\u043e\u0440\u043d\u044b\u0435 \u044f\u0434\u0440\u0430, \u0438 \u0443\u0431\u0438\u0440\u0430\u0435\u043c FMA \u0438 dp4a. \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043d\u0430 Q4_K_M:<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<th>\n<p align=\"left\">\n<\/th>\n<th>\n<p align=\"left\">pp512<\/p>\n<\/th>\n<th>\n<p align=\"left\">tg128<\/p>\n<\/th>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">A (\u0431\u044b\u043b\u043e)<\/p>\n<\/td>\n<td>\n<p align=\"left\">306.8<\/p>\n<\/td>\n<td>\n<p align=\"left\">28.4<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">E (\u0441\u0442\u0430\u043b\u043e)<\/p>\n<\/td>\n<td>\n<p align=\"left\">412.6<\/p>\n<\/td>\n<td>\n<p align=\"left\">57.8<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">\u0423\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u0435<\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>\u00d71.34<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>\u00d72.04<\/strong><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u041e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u0441\u0442\u043e\u0438\u0442 \u043f\u043e\u044f\u0441\u043d\u0438\u0442\u044c, \u043f\u043e\u0447\u0435\u043c\u0443 E \u043e\u0431\u0433\u043e\u043d\u044f\u0435\u0442 A \u0434\u0430\u0436\u0435 \u043f\u043e prefill. \u0424\u043b\u0430\u0433 <code>-fmad=false<\/code> \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442 \u043d\u0430 \u0432\u0441\u0435 \u044f\u0434\u0440\u0430: \u043d\u0430 \u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438, softmax, RoPE, \u0434\u0435\u043a\u0432\u0430\u043d\u0442\u0438\u0437\u0430\u0446\u0438\u044e \u0438 flash attention. \u041d\u0430 CMP \u0432\u0441\u0435 \u043e\u043d\u0438 \u0443\u043f\u0438\u0440\u0430\u044e\u0442\u0441\u044f \u0432 \u0443\u0440\u0435\u0437\u0430\u043d\u043d\u044b\u0439 FMA.<\/p>\n<p><strong>4. \u0427\u0435\u043c \u043a\u0440\u0443\u043f\u043d\u0435\u0435 \u043a\u0432\u0430\u043d\u0442, \u0442\u0435\u043c \u043d\u0438\u0436\u0435 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f, \u0430 prefill \u043d\u0435 \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f.<\/strong> \u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u0443\u043f\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u0432 \u043e\u0431\u044a\u0451\u043c \u0432\u0435\u0441\u043e\u0432: 58 \u0442\u043e\u043a\/\u0441 \u043d\u0430 Q4_K_M \u043f\u0440\u043e\u0442\u0438\u0432 53 \u043d\u0430 Q5_K_M. Prefill \u0432\u043e \u0432\u0441\u0435\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u043e\u043a\u043e\u043b\u043e 410 \u0442\u043e\u043a\/\u0441.<\/p>\n<h2>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b: whisper.cpp<\/h2>\n<p>\u041c\u043e\u0434\u0435\u043b\u044c large-v3-turbo \u0445\u0440\u0430\u043d\u0438\u0442 \u0432\u0435\u0441\u0430 \u0432 F16, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0437\u0434\u0435\u0441\u044c \u043e\u0441\u043d\u043e\u0432\u043d\u0443\u044e \u0440\u043e\u043b\u044c \u0438\u0433\u0440\u0430\u0435\u0442 \u043f\u0435\u0440\u0432\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u043f\u0430\u0442\u0447\u0430 (cuBLAS PEDANTIC). \u0415\u0451 \u044d\u0444\u0444\u0435\u043a\u0442 \u0438\u0437\u043c\u0435\u0440\u044f\u043b\u0441\u044f \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u043d\u0430 \u0441\u0431\u043e\u0440\u043a\u0435 A, \u0441 \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\u043c <code>GGML_CUDA_CMP_MODE<\/code>.<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<th>\n<p align=\"left\">\u0421\u0431\u043e\u0440\u043a\u0430<\/p>\n<\/th>\n<th>\n<p align=\"left\">encode, \u043c\u0441<\/p>\n<\/th>\n<th>\n<p align=\"left\">total, \u043c\u0441<\/p>\n<\/th>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">A, <code>GGML_CUDA_CMP_MODE=0<\/code><\/p>\n<\/td>\n<td>\n<p align=\"left\">873.7<\/p>\n<\/td>\n<td>\n<p align=\"left\">2071.8<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">A, \u0430\u0432\u0442\u043e\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 (PEDANTIC \u0432\u043a\u043b\u044e\u0447\u0451\u043d)<\/p>\n<\/td>\n<td>\n<p align=\"left\">265.7<\/p>\n<\/td>\n<td>\n<p align=\"left\">1038.7<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">B<\/p>\n<\/td>\n<td>\n<p align=\"left\">1097.1<\/p>\n<\/td>\n<td>\n<p align=\"left\">2454.8<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">C<\/p>\n<\/td>\n<td>\n<p align=\"left\">251.5<\/p>\n<\/td>\n<td>\n<p align=\"left\">999.4<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">D<\/p>\n<\/td>\n<td>\n<p align=\"left\">251.5<\/p>\n<\/td>\n<td>\n<p align=\"left\">999.4<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">E<\/p>\n<\/td>\n<td>\n<p align=\"left\">267.3<\/p>\n<\/td>\n<td>\n<p align=\"left\">1020.6<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<h3>\u0412\u044b\u0432\u043e\u0434\u044b:<\/h3>\n<ul>\n<li>\n<p><strong>PEDANTIC FP16 GEMM \u0443\u0441\u043a\u043e\u0440\u044f\u0435\u0442 \u044d\u043d\u043a\u043e\u0434\u0435\u0440 \u0432 3,3 \u0440\u0430\u0437\u0430<\/strong> (874 \u2192 266 \u043c\u0441), \u0430 \u043e\u0431\u0449\u0435\u0435 \u0432\u0440\u0435\u043c\u044f \u0441\u043e\u043a\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u0432\u0434\u0432\u043e\u0435. \u041f\u0440\u0438\u0440\u043e\u0441\u0442 \u0432 7 \u0440\u0430\u0437 \u0438\u0437 \u0441\u0442\u0430\u0442\u044c\u0438, \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u043d\u044b\u0439 \u043d\u0430 \u0447\u0438\u0441\u0442\u043e\u043c GEMM, \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f, \u043d\u043e \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0435 \u044d\u0444\u0444\u0435\u043a\u0442 \u0432\u0441\u0451 \u0440\u0430\u0432\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u043e\u0439.<\/p>\n<\/li>\n<\/ul>\n<hr\/>\n<p><a class=\"anchor\" name=\"conclusion\" id=\"conclusion\"><\/a><\/p>\n<h2>\u0418\u0442\u043e\u0433\u0438<\/h2>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<th>\n<p align=\"left\">\u0417\u0430\u0434\u0430\u0447\u0430<\/p>\n<\/th>\n<th>\n<p align=\"left\">\u0411\u044b\u043b\u043e<\/p>\n<\/th>\n<th>\n<p align=\"left\">\u0421\u0442\u0430\u043b\u043e<\/p>\n<\/th>\n<th>\n<p align=\"left\">\u0423\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u0435<\/p>\n<\/th>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">LLM, \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f (tg128)<\/p>\n<\/td>\n<td>\n<p align=\"left\">28.4 \u0442\u043e\u043a\/\u0441<\/p>\n<\/td>\n<td>\n<p align=\"left\">57.8 \u0442\u043e\u043a\/\u0441<\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>\u00d72.0<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">LLM, \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043f\u0440\u043e\u043c\u043f\u0442\u0430 (pp512)<\/p>\n<\/td>\n<td>\n<p align=\"left\">306.8 \u0442\u043e\u043a\/\u0441<\/p>\n<\/td>\n<td>\n<p align=\"left\">412.6 \u0442\u043e\u043a\/\u0441<\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>\u00d71.34<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">Whisper, \u044d\u043d\u043a\u043e\u0434\u0435\u0440 (jfk.wav)<\/p>\n<\/td>\n<td>\n<p align=\"left\">874 \u043c\u0441<\/p>\n<\/td>\n<td>\n<p align=\"left\">~266 \u043c\u0441<\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>\u00d73.3<\/strong><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u0427\u0442\u043e \u043f\u043e\u043d\u044f\u0442\u043d\u043e \u0438\u0437 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f CMP 50HX:<\/p>\n<ol>\n<li>\n<p><code><strong>FMA<\/strong><\/code><strong> \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0443\u0440\u0435\u0437\u0430\u043d, \u0438 \u044d\u0442\u043e \u0433\u043b\u0430\u0432\u043d\u044b\u0439 \u0442\u043e\u0440\u043c\u043e\u0437.<\/strong> \u0421\u0431\u043e\u0440\u043a\u0430 \u0441 <code>-fmad=false<\/code> \u2014 \u0441\u0430\u043c\u044b\u0439 \u0434\u0435\u0448\u0451\u0432\u044b\u0439 \u0438 \u0441\u0430\u043c\u044b\u0439 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u0439 \u0448\u0430\u0433: \u043a\u043e\u0434 \u043d\u0435 \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f, \u043d\u0443\u0436\u0435\u043d \u0442\u043e\u043b\u044c\u043a\u043e \u0444\u043b\u0430\u0433 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430.<\/p>\n<\/li>\n<li>\n<p><code><strong>dp4a<\/strong><\/code><strong> \u0443\u0440\u0435\u0437\u0430\u043d<\/strong>. \u042d\u043c\u0443\u043b\u044f\u0446\u0438\u044f \u0447\u0435\u0440\u0435\u0437 \u0437\u0430\u043c\u0435\u043d\u0443 \u0447\u0435\u0442\u044b\u0440\u0435\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0432 <code>mad.lo.s32<\/code> \u0434\u0430\u0451\u0442 \u0435\u0449\u0451 \u043e\u043a\u043e\u043b\u043e +20% \u043a \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438.<\/p>\n<\/li>\n<li>\n<p><code><strong>cuBLAS FP16<\/strong><\/code><strong> \u0443\u0440\u0435\u0437\u0430\u043d<\/strong>. \u0420\u0435\u0436\u0438\u043c PEDANTIC \u0443\u0441\u043a\u043e\u0440\u044f\u0435\u0442 F16-\u043c\u043e\u0434\u0435\u043b\u0438 \u0432\u0440\u043e\u0434\u0435 whisper \u0432 3 \u0441 \u043b\u0438\u0448\u043d\u0438\u043c \u0440\u0430\u0437\u0430.<\/p>\n<\/li>\n<li>\n<p><code><strong>INT8 MMQ<\/strong><\/code><strong> \u043d\u0430 \u0442\u0435\u043d\u0437\u043e\u0440\u043d\u044b\u0445 \u044f\u0434\u0440\u0430\u0445 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e.<\/strong> \u0421\u0431\u043e\u0440\u043a\u0430 \u043f\u043e\u0434 Pascal (<code>61-virtual<\/code>) \u0441\u043d\u0438\u0436\u0430\u0435\u0442 prefill \u0432\u0442\u0440\u043e\u0435, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u0435\u043b\u0430\u0442\u044c \u0435\u0451 \u043d\u0435 \u043d\u0443\u0436\u043d\u043e.<\/p>\n<\/li>\n<\/ol>\n<p>\u0420\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u043c\u0430\u044f \u0441\u0431\u043e\u0440\u043a\u0430 \u0434\u043b\u044f CMP 50HX (\u0438, \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e, \u0434\u043b\u044f \u0434\u0440\u0443\u0433\u0438\u0445 CMP \u043d\u0430 Turing):<\/p>\n<pre><code class=\"bash\">cmake -B build -DGGML_CUDA=ON -DCMAKE_CUDA_ARCHITECTURES=75 \\      -DCMAKE_CUDA_FLAGS=\"-fmad=false -DGGML_CUDA_CMP_EMU_DP4A\"<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><span class=\"sc-logo-wrapper icon-only\"><\/span><\/a><\/div><\/pre>\n<p>\u043f\u043b\u044e\u0441 \u043f\u0430\u0442\u0447 \u0434\u043b\u044f cuBLAS PEDANTIC.<\/p>\n<details class=\"spoiler\">\n<summary>\u0418\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u043a\u0438<\/summary>\n<div class=\"spoiler__content\">\n<h2>1. \u0418\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438 \u0438 \u043f\u0430\u0442\u0447<\/h2>\n<h3>llama.cpp<\/h3>\n<pre><code class=\"bash\">mkdir -p $WORK &amp;&amp; cd $WORKgit clone https:\/\/github.com\/ggml-org\/llama.cppcd llama.cpp# \u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e: \u0437\u0430\u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0432\u0435\u0440\u0435\u043d\u043d\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044egit checkout a0e6dc7git apply --check -v $PATCH &amp;&amp; git apply $PATCHgit diff --stat<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><span class=\"sc-logo-wrapper icon-only\"><\/span><\/a><\/div><\/pre>\n<p>\u0414\u043e\u043b\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c\u0441\u044f:<\/p>\n<pre><code> ggml\/src\/ggml-cuda\/common.cuh   | 12 ++++++++++- ggml\/src\/ggml-cuda\/ggml-cuda.cu | 45 ++++++++++++++++++++++++++++++++++++++---<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><span class=\"sc-logo-wrapper icon-only\"><\/span><\/a><\/div><\/pre>\n<p>\u0415\u0441\u043b\u0438 <code>git apply<\/code> \u043e\u0442\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 (\u0443 \u0432\u0430\u0441 \u0434\u0440\u0443\u0433\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f), \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0439\u0442\u0435 \u043f\u043e \u043e\u0447\u0435\u0440\u0435\u0434\u0438:<\/p>\n<pre><code class=\"bash\">git apply --3way $PATCH                 # \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u043f\u043e\u043b\u043d\u043e\u0433\u043e \u043a\u043b\u043e\u043d\u0430, \u043d\u0435 --depth 1patch -p1 --dry-run &lt; $PATCH &amp;&amp; patch -p1 &lt; $PATCH<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><span class=\"sc-logo-wrapper icon-only\"><\/span><\/a><\/div><\/pre>\n<h3>whisper.cpp<\/h3>\n<pre><code class=\"bash\">cd $WORKgit clone https:\/\/github.com\/ggml-org\/whisper.cppcd whisper.cpp# \u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e: git checkout 0c7be69git apply --check $PATCH &amp;&amp; git apply $PATCH \\  || (patch -p1 --dry-run &lt; $PATCH &amp;&amp; patch -p1 &lt; $PATCH)<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><span class=\"sc-logo-wrapper icon-only\"><\/span><\/a><\/div><\/pre>\n<p>\u0412 whisper.cpp \u043f\u0430\u0442\u0447 \u043e\u0431\u044b\u0447\u043d\u043e \u043b\u043e\u0436\u0438\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 <code>patch<\/code> \u0441\u043e \u0441\u0434\u0432\u0438\u0433\u043e\u043c \u0441\u0442\u0440\u043e\u043a \u0438 fuzz. \u042d\u0442\u043e \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e, \u043d\u043e \u043f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e <strong>\u043f\u0440\u043e\u0432\u0435\u0440\u044c\u0442\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442<\/strong>.<\/p>\n<h3>\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043d\u0430\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043f\u0430\u0442\u0447\u0430 (\u0434\u043b\u044f \u043e\u0431\u043e\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432)<\/h3>\n<pre><code class=\"bash\">for r in llama.cpp whisper.cpp; do  echo \"== $r\"  f=$WORK\/$r\/ggml\/src\/ggml-cuda\/ggml-cuda.cu  grep -c \"gemm_algo));\" $f                         # \u043e\u0436\u0438\u0434\u0430\u0435\u0442\u0441\u044f 3  grep -c \"CUBLAS_GEMM_DEFAULT_TENSOR_OP));\" $f     # \u043e\u0436\u0438\u0434\u0430\u0435\u0442\u0441\u044f 0  grep -c \"GGML_CUDA_CMP_EMU_DP4A\" $WORK\/$r\/ggml\/src\/ggml-cuda\/common.cuh   # \u043e\u0436\u0438\u0434\u0430\u0435\u0442\u0441\u044f 1done<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><span class=\"sc-logo-wrapper icon-only\"><\/span><\/a><\/div><\/pre>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u0432\u0438\u0434\u0438\u0442\u0435 <code>CUBLAS_GEMM_DEFAULT_TENSOR_OP));<\/code> \u0433\u0434\u0435-\u0442\u043e \u0435\u0449\u0451, \u0437\u043d\u0430\u0447\u0438\u0442, \u0432 \u0432\u0430\u0448\u0435\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u0435\u0441\u0442\u044c \u0432\u044b\u0437\u043e\u0432\u044b cuBLAS, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0430\u0442\u0447 \u043d\u0435 \u043f\u043e\u043a\u0440\u044b\u0432\u0430\u0435\u0442. \u0417\u0430\u043c\u0435\u043d\u0438\u0442\u0435 \u0432 \u043d\u0438\u0445 <code>CUBLAS_GEMM_DEFAULT_TENSOR_OP<\/code> \u043d\u0430 <code>gemm_algo<\/code> \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u043f\u043e \u043e\u0431\u0440\u0430\u0437\u0446\u0443 \u0438 \u0434\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0442\u043e\u0442 \u0436\u0435 \u0431\u043b\u043e\u043a <code>if (... ggml_cuda_device_is_cmp(...))<\/code>.<\/p>\n<h2>2. \u0421\u0431\u043e\u0440\u043a\u0430<\/h2>\n<p>\u041e\u0431\u0449\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b:<\/p>\n<pre><code class=\"bash\">CMP_FLAGS=(  -DCUDAToolkit_ROOT=$CUDA_ROOT  -DCMAKE_CUDA_COMPILER=$CUDA_ROOT\/bin\/nvcc  -DGGML_CUDA=ON  -DCMAKE_BUILD_TYPE=Release  -DBUILD_SHARED_LIBS=OFF  -DCMAKE_CUDA_ARCHITECTURES=75  \"-DCMAKE_CUDA_FLAGS=-fmad=false -DGGML_CUDA_CMP_EMU_DP4A\")export PATH=$CUDA_ROOT\/bin:$PATH<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><span class=\"sc-logo-wrapper icon-only\"><\/span><\/a><\/div><\/pre>\n<h3>llama.cpp<\/h3>\n<pre><code class=\"bash\">cd $WORK\/llama.cppcmake -B build_e \"${CMP_FLAGS[@]}\" -DLLAMA_CURL=OFFcmake --build build_e -j $JOBS --target llama-server llama-cli llama-bench<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><span class=\"sc-logo-wrapper icon-only\"><\/span><\/a><\/div><\/pre>\n<h3>whisper.cpp<\/h3>\n<pre><code class=\"bash\">cd $WORK\/whisper.cppcmake -B build_e \"${CMP_FLAGS[@]}\"cmake --build build_e -j $JOBS --target whisper-server whisper-cli whisper-bench<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><span class=\"sc-logo-wrapper icon-only\"><\/span><\/a><\/div><\/pre>\n<p>\u0421\u0431\u043e\u0440\u043a\u0430 \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 5\u201310 \u043c\u0438\u043d\u0443\u0442 \u043d\u0430 \u043f\u0440\u043e\u0435\u043a\u0442, \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 CPU.<\/p>\n<h3>\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430, \u0447\u0442\u043e \u0441\u043e\u0431\u0440\u0430\u043b\u043e\u0441\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e<\/h3>\n<pre><code class=\"bash\">for f in $WORK\/llama.cpp\/build_e\/CMakeCache.txt $WORK\/whisper.cpp\/build_e\/CMakeCache.txt; do  grep -E \"^CMAKE_CUDA_FLAGS:|^CMAKE_CUDA_ARCHITECTURES|^CUDA_cudart_LIBRARY:\" $fdoneldd $WORK\/llama.cpp\/build_e\/bin\/llama-server | grep -E \"cublas|cudart\"<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><span class=\"sc-logo-wrapper icon-only\"><\/span><\/a><\/div><\/pre>\n<p>\u0412\u043e \u0432\u0441\u0435\u0445 \u043f\u0443\u0442\u044f\u0445 \u0434\u043e\u043b\u0436\u0435\u043d \u0441\u0442\u043e\u044f\u0442\u044c <code>$CUDA_ROOT<\/code> (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <code>cuda-12.8<\/code>), \u0430 \u043d\u0435 <code>\/usr\/local\/cuda<\/code> \u2192 13.x.<\/p>\n<blockquote>\n<p><strong>\u0421\u0431\u043e\u0440\u043a\u0430 \u043e\u0442 root.<\/strong> <code>sudo<\/code> \u0441\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0435\u0442 <code>PATH<\/code>, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 <code>export PATH<\/code> \u0432\u044b\u0448\u0435 \u043d\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442. \u0424\u043b\u0430\u0433 <code>-DCUDAToolkit_ROOT<\/code> \u0432 <code>CMP_FLAGS<\/code> \u044d\u0442\u0443 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u0440\u0435\u0448\u0430\u0435\u0442, \u043d\u0435 \u0443\u0431\u0438\u0440\u0430\u0439\u0442\u0435 \u0435\u0433\u043e.<\/p>\n<\/blockquote>\n<\/div>\n<\/details>\n<hr\/>\n<h2>\u0412\u044b\u0432\u043e\u0434\u044b<\/h2>\n<p>\u0413\u0438\u043f\u043e\u0442\u0435\u0437\u0430, \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u043d\u0430\u044f \u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0439 <a href=\"https:\/\/habr.com\/ru\/articles\/948396\/\" rel=\"noopener nofollow\">\u0441\u0442\u0430\u0442\u044c\u0435<\/a>, \u0432\u043f\u043e\u043b\u043d\u0435 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0430\u0435\u0442\u0441\u044f.<\/p>\n<p>\u041c\u043e\u0436\u043d\u043e \u043b\u0438 \u0435\u0449\u0435 \u0447\u0442\u043e-\u0442\u043e \u0432\u044b\u0436\u0430\u0442\u044c \u0438\u0437 \u044d\u0442\u0438\u0445 \u043a\u0430\u0440\u0442\u043e\u0447\u0435\u043a (\u0434\u0443\u043c\u0430\u044e, \u0447\u0442\u043e \u043d\u0435\u0442). \u0415\u0441\u0442\u044c \u043b\u0438 \u0437\u0430\u0434\u0430\u0447\u0438 \u0434\u043b\u044f \u043a\u043e\u0442\u043e\u0440\u044b\u0445  \u0441\u0435\u0439\u0447\u0430\u0441 \u043e\u0431\u043e\u0441\u043d\u043e\u0432\u0430\u043d\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u0440\u0442\u044b \u2013 \u0440\u0435\u0448\u0430\u0442\u044c \u0432\u0430\u043c. \u0412 \u043c\u043e\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0432\u044b\u0438\u0433\u0440\u044b\u0448 \u0432 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 \u0440\u0430\u0431\u043e\u0442\u044b Whisper\u2019a \u043e\u043a\u0430\u0437\u0430\u043b\u0441\u044f \u0432\u0435\u0441\u044c\u043c\u0430 \u043e\u0449\u0443\u0442\u0438\u043c\u044b\u043c.<\/p>\n<p><strong>\u0412\u0441\u0435\u043c \u0434\u043e\u0431\u0440\u0430!<\/strong><\/p>\n<\/div>\n<p>\u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/1097816\/\">https:\/\/habr.com\/ru\/articles\/1097816\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u041f\u0440\u0435\u0434\u044b\u0441\u0442\u043e\u0440\u0438\u044f\u0415\u0441\u0442\u044c \u0434\u043e\u043c\u0430\u0448\u043d\u0438\u0439 \u0441\u0435\u0440\u0432\u0435\u0440 \u043e\u0431\u044b\u0447\u043d\u043e\u0439 \u201c\u043f\u043e\u0434\u0441\u0442\u043e\u043b\u044c\u043d\u043e\u0439\u201d \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438. Proxmox \u0441 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c\u0438 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u043a\u0430\u043c\u0438. \u0412 \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u043c\u043e\u043c\u0435\u043d\u0442 \u043f\u0440\u0438\u043a\u0443\u043f\u0438\u043b \u043d\u0430 \u0430\u0443\u043a\u0446\u0438\u043e\u043d\u0435 NVIDIA CMP 50HX \u0437\u0430 \u043a\u043e\u043f\u0435\u0439\u043a\u0438, \u0440\u0430\u0434\u0438 \u043f\u043e\u0438\u0433\u0440\u0430\u0442\u044c\u0441\u044f \u0441 \u043f\u0440\u043e\u0441\u0442\u0435\u043d\u044c\u043a\u0438\u043c\u0438 \u043c\u043e\u0434\u0435\u043b\u044c\u043a\u0430\u043c\u0438. \u041c\u043e\u0434\u0435\u043b\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u044e \u0447\u0435\u0440\u0435\u0437 llama.cpp, \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e Whisper \u0434\u043b\u044f \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0432\u0430\u043d\u0438\u044f \u0440\u0435\u0447\u0438. \u0411\u044b\u0441\u0442\u0440\u043e \u0441\u043c\u0438\u0440\u0438\u043b\u0441\u044f \u0441\u043e \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c\u044e \u0440\u0430\u0431\u043e\u0442\u044b \u0438 \u0436\u0438\u043b \u0441 \u044d\u0442\u0438\u043c \u0432\u0441\u0435\u043c \u0441\u043f\u043e\u043a\u043e\u0439\u043d\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u0435\u0441\u044f\u0446\u0435\u0432, \u043f\u043e\u043a\u0430 \u043d\u0435 \u043d\u0430\u0442\u043a\u043d\u0443\u043b\u0441\u044f \u043d\u0430 \u0441\u0442\u0430\u0442\u044c\u044e NVIDIA CMP \u2013 \u043c\u0438\u043a\u0440\u043e\u0441\u043a\u043e\u043f\u044b \u0434\u043b\u044f \u0437\u0430\u0431\u0438\u0432\u0430\u043d\u0438\u044f \u0433\u0432\u043e\u0437\u0434\u0435\u0439? \u041a\u043e\u043f\u0430\u0435\u043c \u0433\u043b\u0443\u0431\u0436\u0435\u2026.\u041e\u0447\u0435\u043d\u044c \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u043f\u0440\u043e\u0447\u0435\u0441\u0442\u044c \u0441\u0442\u0430\u0442\u044c\u044e, \u043e\u0449\u0443\u0442\u0438\u043c\u043e \u043f\u0440\u043e\u0441\u0432\u0435\u0442\u043b\u044f\u0435\u0442 \u043c\u043e\u0437\u0433 \u0432 \u0447\u0430\u0441\u0442\u0438 \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b (\u0438 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430 \u0440\u0435\u0448\u0435\u043d\u0438\u044f), \u043e \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043f\u043e\u0439\u0434\u0435\u0442 \u0440\u0435\u0447\u044c \u043d\u0438\u0436\u0435.\u041e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0435 \u043a \u201c\u0432\u044b\u0441\u0448\u0435\u043c\u0443 \u0440\u0430\u0437\u0443\u043c\u0443\u201d\u041e\u0442\u043f\u0440\u0430\u0432\u0438\u043b \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 \u0441\u0442\u0430\u0442\u044c\u044e \u201c\u0432 \u0447\u0430\u0442\u201d \u0441 \u043f\u0440\u043e\u0441\u044c\u0431\u043e\u0439 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u0442\u044c \u0440\u0435\u0448\u0435\u043d\u0438\u0435. \u0412 \u0438\u0442\u043e\u0433\u0435 \u0447\u0435\u0440\u0435\u0437 20 \u043c\u0438\u043d\u0443\u0442 \u0443 \u043c\u0435\u043d\u044f \u0431\u044b\u043b \u0433\u043e\u0442\u043e\u0432\u044b\u0439 \u0441\u0442\u0435\u043d\u0434 \u0441 \u043f\u0430\u0442\u0447\u0435\u043c \u0434\u043b\u044f \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u043e\u0432 ggml. \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 ggml \u0432 llama.cpp \u0438 whisper.cpp \u043e\u0431\u0449\u0438\u0439, \u043e\u0434\u0438\u043d \u0438 \u0442\u043e\u0442 \u0436\u0435 \u043f\u0430\u0442\u0447 \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u0434\u043b\u044f \u043e\u0431\u043e\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432.\u0415\u0441\u043b\u0438 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u0430\u043c \u043d\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0435\u043d, \u043c\u043e\u0436\u043d\u043e \u0441\u0440\u0430\u0437\u0443 \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043a \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u043c \u0438 \u0433\u043e\u0442\u043e\u0432\u043e\u043c\u0443 \u0440\u0435\u0448\u0435\u043d\u0438\u044e.llamacpp-cmp.patchdiff &#8212;git a\/ggml\/src\/ggml-cuda\/common.cuh b\/ggml\/src\/ggml-cuda\/common.cuhindex fea1cf9..046728a 100644&#8212; a\/ggml\/src\/ggml-cuda\/common.cuh+++ b\/ggml\/src\/ggml-cuda\/common.cuh@@ -738,7 +738,17 @@ static __device__ __forceinline__ int ggml_cuda_dp4a(const int a, const int b, i  #else \/\/ defined(GGML_USE_HIP) -#if __CUDA_ARCH__ &gt;= GGML_CUDA_CC_DP4A || defined(GGML_USE_MUSA)+#if defined(GGML_CUDA_CMP_EMU_DP4A) &amp;&amp; !defined(GGML_USE_MUSA)+    \/\/ NVIDIA CMP mining GPUs: the hardware dp4a is throttled (about 1\/8 rate on CMP 40HX\/50HX).+    \/\/ Four plain integer multiply-adds written as inline PTX are faster and are not folded back+    \/\/ into dp4a by the compiler (a plain C expression would be).+    int r = c;+    asm(&#171;mad.lo.s32 %0, %1, %2, %0;&#187; : &#171;+r&#187;(r) : &#171;r&#187;((int)(int8_t)(a      )), &#171;r&#187;((int)(int8_t)(b      )));+    asm(&#171;mad.lo.s32 %0, %1, %2, %0;&#187; : &#171;+r&#187;(r) : &#171;r&#187;((int)(int8_t)(a &gt;&gt;  8)), &#171;r&#187;((int)(int8_t)(b &gt;&gt;  8)));+    asm(&#171;mad.lo.s32 %0, %1, %2, %0;&#187; : &#171;+r&#187;(r) : &#171;r&#187;((int)(int8_t)(a &gt;&gt; 16)), &#171;r&#187;((int)(int8_t)(b &gt;&gt; 16)));+    asm(&#171;mad.lo.s32 %0, %1, %2, %0;&#187; : &#171;+r&#187;(r) : &#171;r&#187;((int)(int8_t)(a &gt;&gt; 24)), &#171;r&#187;((int)(int8_t)(b &gt;&gt; 24)));+    return r;+#elif __CUDA_ARCH__ &gt;= GGML_CUDA_CC_DP4A || defined(GGML_USE_MUSA)     return __dp4a(a, b, c); #else \/\/ __CUDA_ARCH__ &gt;= GGML_CUDA_CC_DP4A || defined(GGML_USE_MUSA)     const int8_t * a8 = (const int8_t *) &amp;a;diff &#8212;git a\/ggml\/src\/ggml-cuda\/ggml-cuda.cu b\/ggml\/src\/ggml-cuda\/ggml-cuda.cuindex 9fe618f..c9ed96e 100644&#8212; a\/ggml\/src\/ggml-cuda\/ggml-cuda.cu+++ b\/ggml\/src\/ggml-cuda\/ggml-cuda.cu@@ -1403,6 +1403,36 @@ static __global__ void k_compute_batched_ptrs(     ptrs_dst[0*ne23 + i12 + i13*ne12] = (      char *)         dst + i12*nbd2 + i13*nbd3; } +#if !defined(GGML_USE_HIP) &amp;&amp; !defined(GGML_USE_MUSA)+\/\/ NVIDIA CMP mining GPUs (CMP 40HX\/50HX\/90HX): tensor cores and FMA are throttled, so cuBLAS must be+\/\/ told not to use them (see https:\/\/habr.com\/ru\/articles\/948396\/: FP16 GEMM goes from ~3 to ~24+\/\/ &#171;units&#187; with CUBLAS_COMPUTE_16F_PEDANTIC on a CMP 50HX).+\/\/ GGML_CUDA_CMP_MODE=1 forces this on, =0 forces it off, unset\/other = auto-detect by device name.+static bool ggml_cuda_device_is_cmp(const int device) {+    static int8_t cache[GGML_CUDA_MAX_DEVICES] = {0}; \/\/ 0 = unknown, 1 = no, 2 = yes+    if (device &lt; 0 || device &gt;= GGML_CUDA_MAX_DEVICES) {+        return false;+    }+    if (cache[device] == 0) {+        const char * env = getenv(&#171;GGML_CUDA_CMP_MODE&#187;);+        bool is_cmp;+        if (env != nullptr &amp;&amp; env[0] == &#8216;0&#8217;) {+            is_cmp = false;+        } else if (env != nullptr &amp;&amp; env[0] == &#8216;1&#8217;) {+            is_cmp = true;+        } else {+            cudaDeviceProp prop;+            is_cmp = cudaGetDeviceProperties(&amp;prop, device) == cudaSuccess &amp;&amp; strstr(prop.name, &#171;CMP&#187;) != nullptr;+        }+        cache[device] = is_cmp ? 2 : 1;+        if (is_cmp) {+            GGML_LOG_INFO(&#171;%s: device %d treated as NVIDIA CMP: cuBLAS FP16 GEMM without tensor cores (PEDANTIC)\\n&#187;, __func__, device);+        }+    }+    return cache[device] == 2;+}+#endif \/\/ !defined(GGML_USE_HIP) &amp;&amp; !defined(GGML_USE_MUSA)+ \/\/ Type traits for mapping ggml types to CUDA\/cuBLAS types template&lt;ggml_type T&gt; struct batched_mul_mat_traits;@@ -1577,6 +1607,15 @@ static void ggml_cuda_mul_mat_cublas_impl(ggml_backend_cuda_context &amp; ctx, const     GGML_ASSERT(ne12 % ne02 == 0);     GGML_ASSERT(ne13 % ne03 == 0); +    auto gemm_algo = CUBLAS_GEMM_DEFAULT_TENSOR_OP;+#if !defined(GGML_USE_HIP) &amp;&amp; !defined(GGML_USE_MUSA)+    if (compute_type == GGML_TYPE_F16 &amp;&amp; cu_compute_type == CUBLAS_COMPUTE_16F &amp;&amp; ggml_cuda_device_is_cmp(ctx.device)) {+        \/\/ NVIDIA CMP: the tensor-core path is throttled; pure FP16 CUDA-core GEMM is ~7x faster.+        cu_compute_type = CUBLAS_COMPUTE_16F_PEDANTIC;+        gemm_algo       = CUBLAS_GEMM_DEFAULT;+    }+#endif \/\/ !defined(GGML_USE_HIP) &amp;&amp; !defined(GGML_USE_MUSA)+     \/\/ broadcast factors     const int64_t r2 = ne12\/ne02;     const int64_t r3 = ne13\/ne03;@@ -1599,7 +1638,7 @@ static void ggml_cuda_mul_mat_cublas_impl(ggml_backend_cuda_context &amp; ctx, const                            src1_ptr, cu_data_type_b, s11,                     beta,   dst_ptr, cu_data_type,   ldc,                     cu_compute_type,-                    CUBLAS_GEMM_DEFAULT_TENSOR_OP));+                    gemm_algo));     } else if (r2 == 1 &amp;&amp; r3 == 1 &amp;&amp; is_src0_cont_2 &amp;&amp; is_src1_cont_2) {         \/\/ with a [0, 2, 1, 3] perm. and ne02==1 the matrix strides need to be determined from dim 3:         const int64_t sma = ne02 == 1 ? s03 : s02;@@ -1615,7 +1654,7 @@ static void ggml_cuda_mul_mat_cublas_impl(ggml_backend_cuda_context &amp; ctx, const                 beta,   dst_ptr, cu_data_type,   ldc, ne1*ldc, \/\/ strideC                 ne12*ne13,                 cu_compute_type,-                CUBLAS_GEMM_DEFAULT_TENSOR_OP));+                gemm_algo));     } else {         \/\/ use cublasGemmBatchedEx         const int64_t ne23 = ne12*ne13;@@ -1653,7 +1692,7 @@ static void ggml_cuda_mul_mat_cublas_impl(ggml_backend_cuda_context &amp; ctx, const                 beta,  (      void **) (ptrs_dst.get() + 0*ne23), cu_data_type,   ldc,                 ne23,                 cu_compute_type,-                CUBLAS_GEMM_DEFAULT_TENSOR_OP));+                gemm_algo));     }      \/\/ Convert output back to F32 if needed\u0412\u0430\u0436\u043d\u043e\u0435 \u0437\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u0435: \u041f\u0430\u0442\u0447 \u0441\u043e\u0431\u0440\u0430\u043d \u0434\u043b\u044f \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 (\u043d\u0430 \u0434\u0430\u0442\u0443 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438 \u0441\u0442\u0430\u0442\u044c\u0438) \u0432\u0435\u0442\u043e\u043a \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0435\u0432. \u041d\u0430 llama.cpp (\u0432\u0435\u0442\u043a\u0430 a0e6dc7) \u043f\u0430\u0442\u0447 \u043d\u0430\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0447\u0438\u0441\u0442\u043e (git apply). \u041d\u0430 whisper.cpp (\u0432\u0435\u0442\u043a\u0430 0c7be69) \u0441\u0442\u0440\u043e\u043a\u0438 \u0441\u0434\u0432\u0438\u043d\u0443\u0442\u044b \u043d\u0430 45, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 git apply \u043e\u0442\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u043d\u043e patch -p1 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442 \u0432\u0441\u0435 \u043f\u044f\u0442\u044c \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u043e\u0432 (fuzz 1\u20132). \u041f\u043e\u0441\u043b\u0435 \u043d\u0430\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043f\u0430\u0442\u0447\u0430 \u0432\u0441\u0435 \u0442\u0440\u0438 \u0432\u044b\u0437\u043e\u0432\u0430 GEMM \u0432 ggml_cuda_mul_mat_cublas_impl \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u043d\u043e\u0432\u0443\u044e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e gemm_algo.\u0414\u043b\u044f \u0431\u0443\u0434\u0443\u0449\u0438\u0445 \u0432\u0435\u0442\u043e\u043a, \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u043e \u043f\u0430\u0442\u0447 \u043d\u0443\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c (\u0438\u043b\u0438 \u043f\u0435\u0440\u0435\u0434\u0435\u043b\u044b\u0432\u0430\u0442\u044c)\u0427\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442 \u043f\u0430\u0442\u04471. cuBLAS FP16 \u0431\u0435\u0437 \u0442\u0435\u043d\u0437\u043e\u0440\u043d\u044b\u0445 \u044f\u0434\u0435\u0440 (ggml-cuda.cu)\u0412 ggml_cuda_mul_mat_cublas_impl \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f ggml_cuda_device_is_cmp(). \u041e\u043d\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u043a\u0430\u0440\u0442\u0443 CMP \u043f\u043e \u0438\u043c\u0435\u043d\u0438 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0438 \u043a\u044d\u0448\u0438\u0440\u0443\u0435\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442. \u041d\u0430 CMP \u0432\u044b\u0437\u043e\u0432\u044b cublasGemmEx \/ cublasGemmStridedBatchedEx \/ cublasGemmBatchedEx \u043f\u043e\u043b\u0443\u0447\u0430\u044e\u0442 \u0434\u0440\u0443\u0433\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b:CUBLAS_COMPUTE_16F \u2192 CUBLAS_COMPUTE_16F_PEDANTIC;CUBLAS_GEMM_DEFAULT_TENSOR_OP \u2192 CUBLAS_GEMM_DEFAULT.\u041f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435\u043c \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f GGML_CUDA_CMP_MODE: 1 \u043f\u0440\u0438\u043d\u0443\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0440\u0435\u0436\u0438\u043c, 0 \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0435\u0442, \u0431\u0435\u0437 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0430\u0432\u0442\u043e\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435. \u041f\u0440\u0438 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u0438 \u0432 \u043b\u043e\u0433 \u043f\u0438\u0448\u0435\u0442\u0441\u044f \u0441\u0442\u0440\u043e\u043a\u0430:ggml_cuda_device_is_cmp: device 0 treated as NVIDIA CMP: cuBLAS FP16 GEMM without tensor cores (PEDANTIC)\u041f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0441\u043f\u043e\u0441\u043e\u0431 \u043c\u0430\u0442\u0440\u0438\u0447\u043d\u043e\u0433\u043e \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u044f \u0441 \u0432\u0435\u0441\u0430\u043c\u0438 \u0432 F16 (\u044d\u0442\u043e \u043f\u0440\u0435\u0436\u0434\u0435 \u0432\u0441\u0435\u0433\u043e Whisper).2. \u042d\u043c\u0443\u043b\u044f\u0446\u0438\u044f dp4a (common.cuh)\u0415\u0441\u043b\u0438 \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u0441 -DGGML_CUDA_CMP_EMU_DP4A, \u0444\u0443\u043d\u043a\u0446\u0438\u044f ggml_cuda_dp4a \u0432\u043c\u0435\u0441\u0442\u043e __dp4a \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0447\u0435\u0442\u044b\u0440\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 mad.lo.s32, \u0437\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0435 Inline-PTX:int r = c;asm(&#171;mad.lo.s32 %0, %1, %2, %0;&#187; : &#171;+r&#187;(r) : &#171;r&#187;((int)(int8_t)(a      )), &#171;r&#187;((int)(int8_t)(b      )));asm(&#171;mad.lo.s32 %0, %1, %2, %0;&#187; : &#171;+r&#187;(r) : &#171;r&#187;((int)(int8_t)(a &gt;&gt;  8)), &#171;r&#187;((int)(int8_t)(b &gt;&gt;  8)));asm(&#171;mad.lo.s32 %0, %1, %2, %0;&#187; : &#171;+r&#187;(r) : &#171;r&#187;((int)(int8_t)(a &gt;&gt; 16)), &#171;r&#187;((int)(int8_t)(b &gt;&gt; 16)));asm(&#171;mad.lo.s32 %0, %1, %2, %0;&#187; : &#171;+r&#187;(r) : &#171;r&#187;((int)(int8_t)(a &gt;&gt; 24)), &#171;r&#187;((int)(int8_t)(b &gt;&gt; 24)));return r;Inline-PTX \u0437\u0434\u0435\u0441\u044c \u043d\u0443\u0436\u0435\u043d \u043f\u043e\u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u043e\u0431\u044b\u0447\u043d\u043e\u0435 C-\u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u0441\u0432\u0435\u0440\u043d\u0443\u043b \u0431\u044b \u043e\u0431\u0440\u0430\u0442\u043d\u043e \u0432 dp4a. \u041d\u0430 dp4a \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u044b \u044f\u0434\u0440\u0430 \u043a\u0432\u0430\u043d\u0442\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u044f \u043c\u0430\u0442\u0440\u0438\u0446\u044b \u043d\u0430 \u0432\u0435\u043a\u0442\u043e\u0440 (MMVQ) \u0438 MMQ \u0431\u0435\u0437 \u0442\u0435\u043d\u0437\u043e\u0440\u043d\u044b\u0445 \u044f\u0434\u0435\u0440, \u0430 \u0437\u043d\u0430\u0447\u0438\u0442, \u043f\u0440\u0435\u0436\u0434\u0435 \u0432\u0441\u0435\u0433\u043e \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u0442\u043e\u043a\u0435\u043d\u043e\u0432.\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u0441\u0442\u0435\u043d\u0434\u0430 \u0438 \u0441\u0431\u043e\u0440\u043a\u0430 \u0431\u0435\u043d\u0447\u043c\u0430\u0440\u043a\u043e\u0432\u0415\u0441\u043b\u0438 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u0430\u043c \u043d\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0435\u043d, \u043c\u043e\u0436\u043d\u043e \u0441\u0440\u0430\u0437\u0443 \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043a \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u043c \u0438 \u0433\u043e\u0442\u043e\u0432\u043e\u043c\u0443 \u0440\u0435\u0448\u0435\u043d\u0438\u044e.0. \u041c\u043e\u0439 \u0441\u0442\u0435\u043d\u0434GPUNVIDIA CMP 50HX, 10 \u0413\u0411, compute capability 7.5\u0414\u0440\u0430\u0439\u0432\u0435\u0440580.126.09CUDA Toolkit12.8 (\u0441\u0431\u043e\u0440\u043a\u0430), \u0434\u0440\u0430\u0439\u0432\u0435\u0440 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 CUDA 13.0CPU \/ RAM12 \u043f\u043e\u0442\u043e\u043a\u043e\u0432, 32 \u0413\u0411\u041e\u0421Proxmox VE (\u044f\u0434\u0440\u043e 6.8.12-pve)llama.cppa0e6dc7 (master \u043d\u0430 15.10.2026)whisper.cpp0c7be69 (master \u043d\u0430 15.10.2026)1. \u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043e\u0431\u043e\u0440\u0443\u0434\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u0430nvidia-smi &#8212;query-gpu=name,compute_cap,driver_version,memory.total &#8212;format=csv\u0412 \u043a\u043e\u043b\u043e\u043d\u043a\u0435 name \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u0441\u043b\u043e\u0432\u043e CMP (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, NVIDIA CMP 50HX), \u0438\u043d\u0430\u0447\u0435 \u0430\u0432\u0442\u043e\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0432 \u043f\u0430\u0442\u0447\u0435 \u043d\u0435 \u0441\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442. \u0414\u0440\u0430\u0439\u0432\u0435\u0440 \u043d\u0443\u0436\u0435\u043d \u0441 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 CUDA 12.x: \u0432 \u0432\u044b\u0432\u043e\u0434\u0435 nvidia-smi \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c CUDA Version: 12.x \u0438\u043b\u0438 \u0432\u044b\u0448\u0435.\u0414\u043b\u044f \u0434\u0440\u0443\u0433\u0438\u0445 CMP \u043f\u043e\u0434\u0441\u0442\u0430\u0432\u044c\u0442\u0435 \u0441\u0432\u043e\u044e \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443 \u0432\u043c\u0435\u0441\u0442\u043e 75:\u041a\u0430\u0440\u0442\u0430\u0427\u0438\u043fCMAKE_CUDA_ARCHITECTURESCMP 30HX, 40HX, 50HXTuring75\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u043b\u0430\u0441\u044c \u0442\u043e\u043b\u044c\u043a\u043e CMP 50HX2. \u041f\u0430\u043a\u0435\u0442\u044b \u0438 CUDA ToolkitDebian \/ Ubuntu:sudo apt updatesudo apt install -y build-essential cmake git ccache curl python3cmake &#8212;version    # \u043d\u0443\u0436\u0435\u043d 3.18+, \u043f\u0440\u043e\u0432\u0435\u0440\u0435\u043d\u043e \u043d\u0430 3.25\u0423\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e \u0432 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u043c \u0442\u0443\u043b\u043a\u0438\u0442\u0435 \u0435\u0441\u0442\u044c nvcc \u0438 cuBLAS:ls $CUDA_ROOT\/bin\/nvccls $CUDA_ROOT\/include\/cublas_v2.h $CUDA_ROOT\/lib64\/libcublas.so*$CUDA_ROOT\/bin\/nvcc &#8212;version\u0415\u0441\u043b\u0438 cublas_v2.h \u043d\u0435\u0442, \u044d\u0442\u043e\u0442 \u0442\u0443\u043b\u043a\u0438\u0442 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d \u043d\u0435\u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e; \u0432\u043e\u0437\u044c\u043c\u0438\u0442\u0435 \u0434\u0440\u0443\u0433\u043e\u0439 (\u043d\u0430 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u0432 12.8). \u041f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c cuBLAS \u043c\u043e\u0436\u043d\u043e \u0442\u0430\u043a:sudo apt install -y&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-499770","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/499770","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=499770"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/499770\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=499770"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=499770"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=499770"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}