{"id":89172,"date":"2026-08-02T15:40:52","date_gmt":"2026-08-02T07:40:52","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/89172.html"},"modified":"2026-08-02T15:40:52","modified_gmt":"2026-08-02T07:40:52","slug":"windows-%e5%8e%9f%e7%94%9f%e7%bc%96%e8%af%91-sglang%ef%bc%886-8%c2%b7%e4%b8%8b%ef%bc%89%ef%bc%9a%e5%b8%b8%e9%87%8f%e6%b1%82%e5%80%bc%e3%80%81%e9%87%8d%e8%bd%bd%e5%86%b3%e8%ae%ae%e4%b8%8e%e7%bc%96","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/89172.html","title":{"rendered":"Windows \u539f\u751f\u7f16\u8bd1 SGLang\uff086\/8\u00b7\u4e0b\uff09\uff1a\u5e38\u91cf\u6c42\u503c\u3001\u91cd\u8f7d\u51b3\u8bae\u4e0e\u7f16\u8bd1\u5668\u5d29\u6e83 C1001"},"content":{"rendered":"<h2>Windows \u539f\u751f\u7f16\u8bd1 SGLang&#xff08;6\/8\u00b7\u4e0b&#xff09;&#xff1a;\u5e38\u91cf\u6c42\u503c\u3001\u91cd\u8f7d\u51b3\u8bae\u4e0e\u7f16\u8bd1\u5668\u5d29\u6e83 C1001<\/h2>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/08\/20260802074050-6a6ef482007cb.png\" alt=\"\u5c01\u9762\" \/><\/p>\n<p>\u4e0a\u4e00\u7bc7\u7684\u4e03\u4e2a\u75c5\u79cd,\u5927\u591a\u662f&#034;\u7f3a\u4ec0\u4e48\u8865\u4ec0\u4e48&#034;\u7684\u65b9\u8a00\u66ff\u6362\u2014\u2014\u770b\u5f97\u89c1\u3001\u6539\u5f97\u52a8\u3002\u672c\u7bc7\u8fd9\u4e00\u7c7b\u4e0d\u4e00\u6837:\u5b83\u4eec\u662f MSVC \u5728\u8bed\u4e49\u5c42\u9762\u6bd4 GCC \u4e25\u683c\u5e26\u6765\u7684\u95ee\u9898,\u5171\u540c\u7279\u70b9\u662f\u62a5\u9519\u4f4d\u7f6e\u5f80\u5f80\u4e0d\u662f\u771f\u51f6,\u6839\u56e0\u85cf\u5728\u597d\u51e0\u5c42\u4e4b\u4e0b\u3002<\/p>\n<p>\u6240\u4ee5\u672c\u7bc7\u4e0d\u53ea\u7ed9\u4fee\u6cd5,\u66f4\u7740\u91cd\u8fd8\u539f\u6392\u67e5\u8fc7\u7a0b\u2014\u2014\u4e3a\u4ec0\u4e48\u62a5\u9519\u6307\u5411\u7684\u90a3\u4e00\u884c\u5176\u5b9e\u662f\u65e0\u8f9c\u7684\u3001\u600e\u4e48\u4e00\u6b65\u6b65\u903c\u8fd1\u771f\u6b63\u7684\u6839\u56e0\u3002\u8fd9\u90e8\u5206\u601d\u8def,\u6bd4\u6700\u7ec8\u7684\u8865\u4e01\u66f4\u6709\u8fc1\u79fb\u4ef7\u503c\u3002\u6700\u540e,\u6211\u4eec\u4f1a\u9047\u5230\u8fd9\u6b21\u653b\u5173\u91cc\u6700\u68d8\u624b\u7684\u4e00\u4e2a:MSVC \u7f16\u8bd1\u5668\u81ea\u5df1\u5185\u90e8\u5d29\u6e83,\u8fde\u5fae\u8f6f\u81ea\u5df1\u90fd\u5efa\u8bae\u4f60&#034;\u7b80\u5316\u4ee3\u7801\u6216\u4e0a\u62a5 bug&#034;\u3002<\/p>\n<hr \/>\n<h3>\u4e00\u3001\u5e38\u91cf\u6c42\u503c:MSVC \u7684 constexpr \u6bd4 GCC \u8f83\u771f\u5f97\u591a<\/h3>\n<p>C&#043;&#043; \u6807\u51c6\u5bf9&#034;\u4ec0\u4e48\u662f\u7f16\u8bd1\u671f\u5e38\u91cf\u8868\u8fbe\u5f0f&#034;\u6709\u660e\u786e\u89c4\u5b9a,\u4f46 GCC \u957f\u671f\u4ee5\u6765\u5bf9\u6b64\u76f8\u5f53\u5bbd\u677e\u2014\u2014\u5f88\u591a&#034;\u4e25\u683c\u8bf4\u4e0d\u7b97\u5e38\u91cf\u3001\u4f46 GCC \u653e\u884c\u4e86&#034;\u7684\u5199\u6cd5,\u5230\u4e86 MSVC \u5c31\u88ab\u6309\u6807\u51c6\u62d2\u7edd\u3002\u8fd9\u662f\u672c\u6b21\u653b\u5173\u91cc\u6700\u53cd\u590d\u3001\u6700\u78e8\u4eba\u7684\u4e00\u7c7b\u3002<\/p>\n<h4>\u6848\u4f8b 1:numeric_limits&lt;&gt;::max() \u5728\u8bbe\u5907\u7aef\u4e0d\u662f\u7f16\u8bd1\u671f\u5e38\u91cf<\/h4>\n<h5>\u4e00\u6b21&#034;\u6539\u4e86\u4e09\u904d&#034;\u7684\u6392\u67e5\u5b9e\u5f55<\/h5>\n<p>include\/utils.h \u91cc\u6709\u8fd9\u4e48\u4e00\u884c,\u5b9a\u4e49 FP8 E4M3 \u683c\u5f0f\u7684\u6700\u5927\u503c:<\/p>\n<p><span class=\"token keyword\">using<\/span> FP8_TYPE <span class=\"token operator\">&#061;<\/span> c10<span class=\"token double-colon punctuation\">::<\/span>Float8_e4m3fn<span class=\"token punctuation\">;<\/span><br \/>\nC10_HOST_DEVICE <span class=\"token keyword\">constexpr<\/span> <span class=\"token keyword\">auto<\/span> FP8_E4M3_MAX <span class=\"token operator\">&#061;<\/span> std<span class=\"token double-colon punctuation\">::<\/span><span class=\"token class-name\">numeric_limits<\/span><span class=\"token operator\">&lt;<\/span>FP8_TYPE<span class=\"token operator\">&gt;<\/span><span class=\"token double-colon punctuation\">::<\/span><span class=\"token function\">max<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p>\u8fd9\u4e00\u884c\u5f15\u51fa\u7684\u95ee\u9898,\u6211\u4eec\u524d\u540e\u6539\u4e86\u4e09\u6b21\u624d\u627e\u5230\u771f\u6b63\u7684\u6839\u56e0,\u8fc7\u7a0b\u672c\u8eab\u5f88\u6709\u4ee3\u8868\u6027:<\/p>\n<p>\u7b2c\u4e00\u6b21(\u4ee5\u4e3a\u662f\u8bbe\u5907\u53ef\u89c1\u6027\u95ee\u9898):\u6700\u521d MSVC \u62a5\u7684\u662f C10_HOST_DEVICE \u6807\u6ce8\u76f8\u5173\u7684\u9519\u8bef,\u4e8e\u662f\u628a\u6807\u6ce8\u53bb\u6389\u3001\u60f3\u7b80\u5316\u6210\u7eaf constexpr\u3002\u7ed3\u679c\u5728\u771f\u6b63\u7528\u5230\u5b83\u7684 kernel \u91cc,\u62a5&#034;\u672a\u5b9a\u4e49&#034;\u2014\u2014\u56e0\u4e3a\u53bb\u6807\u6ce8\u53bb\u8fc7\u5934\u4e86,\u8bbe\u5907\u7aef\u53cd\u800c\u770b\u4e0d\u89c1\u5b83\u4e86\u3002<\/p>\n<p>\u7b2c\u4e8c\u6b21(\u4ee5\u4e3a\u662f lambda \u6355\u83b7\u94fe\u95ee\u9898):\u628a\u6807\u6ce8\u6539\u6210 C10_DEVICE(\u8bbe\u5907\u7aef\u53ef\u89c1\u7684\u53ef\u79fb\u690d\u5b8f),\u53c8\u5728 per_token_quant_fp8.cu \u91cc\u62a5&#034;\u8868\u8fbe\u5f0f\u5fc5\u987b\u662f\u5e38\u91cf\u503c&#034;\u3002\u5f53\u65f6\u6000\u7591\u662f\u5b83\u88ab lambda \u6309\u5f15\u7528\u6355\u83b7\u3001MSVC \u8ddf\u4e0d\u4e0a\u5e38\u91cf\u63a8\u5bfc,\u4e8e\u662f\u5728 kernel \u5185\u90e8\u52a0\u4e86\u4e2a\u672c\u5730\u526f\u672c\u60f3\u5207\u65ad\u5f15\u7528\u94fe\u3002\u7ed3\u679c\u8fd8\u662f\u62a5\u540c\u6837\u7684\u9519\u2014\u2014\u8bf4\u660e\u672c\u5730\u526f\u672c\u8fd9\u4e2a\u65b9\u5411\u4e5f\u6ca1\u5207\u4e2d\u8981\u5bb3\u3002<\/p>\n<p>\u7b2c\u4e09\u6b21(\u7ec8\u4e8e\u627e\u5230\u771f\u6839\u56e0):\u62a5\u9519\u6700\u7ec8\u843d\u5230\u4e86\u90a3\u4e2a\u672c\u5730\u526f\u672c\u58f0\u660e\u672c\u8eab\u8fd9\u4e00\u884c\u3002\u8fd9\u624d\u770b\u6e05:\u95ee\u9898\u6839\u672c\u4e0d\u5728\u6807\u6ce8\u3001\u4e0d\u5728 lambda \u6355\u83b7,\u800c\u5728\u7b49\u53f7\u53f3\u8fb9\u7684 std::numeric_limits&lt;FP8_TYPE&gt;::max() \u8fd9\u4e2a\u8c03\u7528\u672c\u8eab\u2014\u2014\u5b83\u5bf9 MSVC \u6765\u8bf4,\u5728 nvcc \u8bbe\u5907\u7aef\u7f16\u8bd1\u8def\u5f84\u4e0b,\u538b\u6839\u4e0d\u662f\u4e00\u4e2a\u80fd\u5728\u7f16\u8bd1\u671f\u6c42\u503c\u7684\u5e38\u91cf\u8868\u8fbe\u5f0f\u3002\u4e0d\u7ba1\u4f60\u5728\u5916\u9762\u5957\u51e0\u5c42\u672c\u5730\u53d8\u91cf\u3001\u52a0\u4ec0\u4e48\u6807\u6ce8,\u6c42\u503c\u5931\u8d25\u7684\u6e90\u5934\u90fd\u662f\u5b83\u3002<\/p>\n<h5>\u4e3a\u4ec0\u4e48 GCC \u80fd\u8fc7\u3001MSVC \u4e0d\u884c<\/h5>\n<p>std::numeric_limits&lt;c10::Float8_e4m3fn&gt;::max() \u8981\u5728\u7f16\u8bd1\u671f\u6c42\u503c,\u9700\u8981\u8fd9\u4e2a\u81ea\u5b9a\u4e49 FP8 \u7c7b\u578b\u7684 numeric_limits \u7279\u5316\u91cc\u3001max() \u7684\u5b9e\u73b0\u94fe\u8def\u5168\u7a0b\u6ee1\u8db3 constexpr \u8981\u6c42\u3002GCC \u5bf9\u8fd9\u6761\u94fe\u8def\u7684\u5e38\u91cf\u6027\u5224\u5b9a\u5bbd\u677e,\u653e\u884c\u4e86;MSVC(\u5c24\u5176\u53e0\u52a0 nvcc \u8bbe\u5907\u7aef\u7f16\u8bd1)\u4e25\u683c\u5224\u5b9a\u540e,\u8ba4\u4e3a\u5b83\u4e0d\u6784\u6210\u6838\u5fc3\u5e38\u91cf\u8868\u8fbe\u5f0f,\u4e8e\u662f\u51e1\u662f\u628a\u5b83\u7528\u5728\u9700\u8981\u7f16\u8bd1\u671f\u5e38\u91cf\u7684\u5730\u65b9(constexpr \u521d\u59cb\u5316\u3001\u6a21\u677f\u5b9e\u53c2\u3001\u5171\u4eab\u5185\u5b58\u5927\u5c0f\u7b49),\u5168\u90e8\u62a5\u9519\u3002<\/p>\n<h5>\u89e3\u6cd5:\u522b\u4f9d\u8d56\u5b83\u80fd constexpr \u6c42\u503c,\u76f4\u63a5\u5199\u6b7b\u5b57\u9762\u91cf<\/h5>\n<p>E4M3 \u683c\u5f0f\u7684\u6700\u5927\u6709\u9650\u503c\u662f\u4e00\u4e2a\u4e1a\u754c\u516c\u5f00\u3001\u56fa\u5b9a\u4e0d\u53d8\u7684\u6570\u5b57:448.0\u3002\u4e0e\u5176\u6307\u671b numeric_limits \u94fe\u8def\u80fd\u7f16\u8bd1\u671f\u6c42\u503c,\u4e0d\u5982\u76f4\u63a5\u5199\u5b57\u9762\u91cf:<\/p>\n<p>C10_DEVICE <span class=\"token keyword\">constexpr<\/span> <span class=\"token keyword\">float<\/span> FP8_E4M3_MAX <span class=\"token operator\">&#061;<\/span> <span class=\"token number\">448.0f<\/span><span class=\"token punctuation\">;<\/span>  <span class=\"token comment\">\/\/ E4M3 \u6700\u5927\u6709\u9650\u503c,\u56fa\u5b9a\u5e38\u91cf<\/span><\/p>\n<p>\u4e00\u884c\u5b57\u9762\u91cf,\u4ece\u6839\u4e0a\u7ed5\u5f00\u4e86&#034;numeric_limits::max() \u80fd\u4e0d\u80fd constexpr \u6c42\u503c&#034;\u8fd9\u4e2a\u95ee\u9898,\u800c\u4e14\u4e00\u6b21\u6027\u89e3\u51b3\u4e86\u6240\u6709\u7528\u5230\u8fd9\u4e2a\u5e38\u91cf\u7684\u6587\u4ef6\u2014\u2014\u4e0d\u7528\u518d\u9010\u4e2a\u6587\u4ef6\u52a0\u672c\u5730\u526f\u672c\u3002<\/p>\n<p>\u8fd9\u6b21\u4e09\u8fde\u6539\u7684\u6559\u8bad\u6709\u4e24\u5c42\u3002 \u6280\u672f\u4e0a:\u9762\u5bf9&#034;\u5e38\u91cf\u6c42\u503c\u5931\u8d25&#034;,\u522b\u53ea\u76ef\u7740\u62a5\u9519\u90a3\u4e00\u884c\u7684\u6807\u6ce8\u6216\u6355\u83b7\u65b9\u5f0f,\u8981\u8ffd\u5230\u7b49\u53f7\u53f3\u8fb9\u90a3\u4e2a\u8868\u8fbe\u5f0f\u672c\u8eab\u5230\u5e95\u80fd\u4e0d\u80fd\u7f16\u8bd1\u671f\u6c42\u503c\u3002\u65b9\u6cd5\u4e0a:\u7b2c\u4e8c\u6b21\u90a3\u4e2a&#034;\u672c\u5730\u526f\u672c&#034;\u8865\u4e01,\u6211\u4eec\u5f53\u65f6\u5176\u5b9e\u6ca1\u6709\u7acb\u523b\u9a8c\u8bc1\u5b83\u662f\u5426\u771f\u751f\u6548\u5c31\u7ee7\u7eed\u4e86,\u540e\u6765\u624d\u53d1\u73b0\u5b83\u6ca1\u89e3\u51b3\u95ee\u9898\u2014\u2014\u8fd9\u4e5f\u4fc3\u6210\u4e86\u672c\u7cfb\u5217\u4e00\u6761\u94c1\u5f8b:\u6bcf\u6253\u4e00\u4e2a\u8865\u4e01,\u7d27\u8ddf\u7740\u7528\u5b9e\u9645\u7f16\u8bd1\u7ed3\u679c\u9a8c\u8bc1,\u7edd\u4e0d\u51ed&#034;\u6539\u4e86\u5e94\u8be5\u5c31\u597d\u4e86&#034;\u5f80\u4e0b\u8d70\u3002(\u8fd9\u6761\u7eaa\u5f8b\u7684\u53e6\u4e00\u6b21\u60e8\u75db\u5370\u8bc1,\u89c1\u4e0b\u9762\u7684&#034;\u8865\u4e01\u79bb\u5947\u5931\u6548&#034;\u4e8b\u4ef6\u3002)<\/p>\n<h4>\u6848\u4f8b 2:const \u88ab\u8bef\u5f53 constexpr \u7528,\u53e0\u52a0\u5d4c\u5957 lambda \u63a8\u5bfc<\/h4>\n<h5>\u4ee3\u8868\u6848\u4f8b<\/h5>\n<p>csrc\/gemm\/per_token_quant_fp8.cu \u91cc:<\/p>\n<p><span class=\"token keyword\">const<\/span> <span class=\"token keyword\">int<\/span> TOKENS_PER_CTA <span class=\"token operator\">&#061;<\/span> <span class=\"token number\">8<\/span><span class=\"token punctuation\">;<\/span>          <span class=\"token comment\">\/\/ \u2190 \u6ce8\u610f\u662f const,\u4e0d\u662f constexpr<\/span><br \/>\n<span class=\"token comment\">\/\/ &#8230;<\/span><br \/>\nDISPATCH_<span class=\"token punctuation\">.<\/span><span class=\"token punctuation\">.<\/span><span class=\"token punctuation\">.<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">.<\/span><span class=\"token punctuation\">.<\/span><span class=\"token punctuation\">.<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token punctuation\">[<\/span><span class=\"token operator\">&amp;<\/span><span class=\"token punctuation\">]<\/span> <span class=\"token punctuation\">{<\/span>                  <span class=\"token comment\">\/\/ \u5916\u5c42 dispatch \u5b8f\u7684 lambda,\u6309\u5f15\u7528\u6355\u83b7<\/span><br \/>\n    <span class=\"token keyword\">constexpr<\/span> <span class=\"token keyword\">int<\/span> THREADS <span class=\"token operator\">&#061;<\/span> TOKENS_PER_CTA <span class=\"token operator\">*<\/span> kWarpSize<span class=\"token punctuation\">;<\/span>   <span class=\"token comment\">\/\/ \u8981\u6c42\u7f16\u8bd1\u671f\u5e38\u91cf<\/span><br \/>\n    <span class=\"token generic-function\"><span class=\"token function\">launch_kernel<\/span><span class=\"token generic class-name\"><span class=\"token operator\">&lt;<\/span><span class=\"token boolean\">true<\/span><span class=\"token punctuation\">,<\/span> scalar_t<span class=\"token punctuation\">,<\/span> TOKENS_PER_CTA<span class=\"token operator\">&gt;<\/span><\/span><\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">.<\/span><span class=\"token punctuation\">.<\/span><span class=\"token punctuation\">.<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span>   <span class=\"token comment\">\/\/ \u5f53\u6a21\u677f\u5b9e\u53c2,\u4e5f\u8981\u6c42\u7f16\u8bd1\u671f\u5e38\u91cf<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p>\u62a5\u9519\u4fe1\u606f\u5f88\u6709\u8ff7\u60d1\u6027,\u843d\u5728\u6700\u5916\u5c42\u90a3\u4e2a dispatch \u5b8f\u8c03\u7528\u4e0a,\u8fd8\u9644\u5e26\u4e00\u53e5 MSVC \u7684\u5185\u90e8\u8bca\u65ad:failure was caused by a read of a variable outside its lifetime,\u4ee5\u53ca \u8bf7\u53c2\u89c1&#034;this&#034;\u7684\u7528\u6cd5\u3002<\/p>\n<h5>\u6392\u67e5:\u62a5\u9519\u4f4d\u7f6e\u4e0d\u662f\u771f\u51f6<\/h5>\n<p>\u62a5\u9519\u6307\u5411\u6700\u5916\u5c42\u5b8f\u8c03\u7528(\u7b2c 270 \u884c),\u4f46\u771f\u6b63\u7684\u95ee\u9898\u5728\u4e24\u4e2a\u53e0\u52a0\u7684\u56e0\u7d20:<\/p>\n<li>TOKENS_PER_CTA \u58f0\u660e\u6210\u4e86 const int \u800c\u975e constexpr int\u3002const \u6574\u578b\u914d\u5b57\u9762\u91cf\u521d\u59cb\u503c,\u5728 GCC \u4e0b\u5e38\u88ab&#034;\u5f53\u6210&#034;\u5e38\u91cf\u8868\u8fbe\u5f0f\u7528;\u4f46\u4e25\u683c\u8bf4\u5b83\u4e0d\u4fdd\u8bc1\u662f constexpr,MSVC \u4e0d\u4e70\u8d26\u3002<\/li>\n<li>\u5b83\u53c8\u88ab\u5916\u5c42 dispatch \u5b8f\u7684 lambda \u6309\u5f15\u7528\u6355\u83b7([&amp;]),\u7136\u540e\u5728 lambda \u5185\u90e8\u5f53\u4f5c constexpr THREADS \u7684\u521d\u59cb\u5316\u503c\u3001\u4ee5\u53ca\u6a21\u677f\u5b9e\u53c2\u4f7f\u7528\u3002MSVC \u5bf9&#034;\u6309\u5f15\u7528\u6355\u83b7\u8fdb\u5d4c\u5957 lambda \u7684\u53d8\u91cf\u3001\u518d\u8981\u6c42\u5b83\u7f16\u8bd1\u671f\u5e38\u91cf&#034;\u8fd9\u6761\u94fe\u8def\u8ddf\u8e2a\u4e0d\u8fc7\u6765,\u4e8e\u662f\u62a5\u51fa\u90a3\u4e2a&#034;\u8bfb\u53d6\u8d85\u8fc7\u751f\u547d\u5468\u671f\u7684\u53d8\u91cf&#034;&#034;this&#034;\u4e4b\u7c7b\u7684\u5185\u90e8\u8bca\u65ad\u2014\u2014\u62a5\u9519\u4f4d\u7f6e\u662f\u5b8f\u5c55\u5f00\u7684\u5916\u5c42,\u771f\u51f6\u5728\u6df1\u5904\u7684\u5e38\u91cf\u6027\u3002<\/li>\n<p>\u8fd9\u7c7b&#034;\u62a5\u9519\u6307\u5411\u5b8f\u8c03\u7528\u5916\u5c42\u3001\u771f\u51f6\u5728\u5d4c\u5957 lambda \u5e38\u91cf\u63a8\u5bfc&#034;\u7684\u95ee\u9898,\u5728\u672c\u6b21\u653b\u5173\u91cc\u51fa\u73b0\u8fc7\u4e0d\u6b62\u4e00\u6b21(cutlass_mla_kernel.cu \u4e5f\u662f\u540c\u4e00\u7c7b)\u3002\u8bc6\u522b\u7279\u5f81:\u62a5\u9519\u5e26\u6709 outside its lifetime\u3001this \u7528\u6cd5\u3001\u6216&#034;\u8868\u8fbe\u5f0f\u5fc5\u987b\u662f\u5e38\u91cf\u503c&#034;,\u4e14\u6307\u5411\u4e00\u4e2a dispatch \/ \u5b8f\u8c03\u7528\u7684\u5916\u5c42\u800c\u975e\u5177\u4f53\u67d0\u884c\u8fd0\u7b97\u3002<\/p>\n<h5>\u89e3\u6cd5:\u6e90\u5934\u6539\u771f constexpr &#043; lambda \u5185\u672c\u5730\u91cd\u58f0\u660e<\/h5>\n<p>\u4e24\u6b65\u4e00\u8d77\u505a:<\/p>\n<p><span class=\"token keyword\">constexpr<\/span> <span class=\"token keyword\">int<\/span> TOKENS_PER_CTA <span class=\"token operator\">&#061;<\/span> <span class=\"token number\">8<\/span><span class=\"token punctuation\">;<\/span>        <span class=\"token comment\">\/\/ \u2460 \u6e90\u5934\u6539\u6210\u771f\u6b63\u7684 constexpr<\/span><br \/>\n<span class=\"token comment\">\/\/ &#8230;<\/span><br \/>\nDISPATCH_<span class=\"token punctuation\">.<\/span><span class=\"token punctuation\">.<\/span><span class=\"token punctuation\">.<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">.<\/span><span class=\"token punctuation\">.<\/span><span class=\"token punctuation\">.<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token punctuation\">[<\/span><span class=\"token operator\">&amp;<\/span><span class=\"token punctuation\">]<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n    <span class=\"token keyword\">constexpr<\/span> <span class=\"token keyword\">int<\/span> kTokensPerCtaLocal <span class=\"token operator\">&#061;<\/span> TOKENS_PER_CTA<span class=\"token punctuation\">;<\/span>       <span class=\"token comment\">\/\/ \u2461 lambda \u5185\u672c\u5730\u91cd\u58f0\u660e\u4e00\u4efd<\/span><br \/>\n    <span class=\"token keyword\">constexpr<\/span> <span class=\"token keyword\">int<\/span> THREADS <span class=\"token operator\">&#061;<\/span> kTokensPerCtaLocal <span class=\"token operator\">*<\/span> kWarpSize<span class=\"token punctuation\">;<\/span>  <span class=\"token comment\">\/\/ \u7528\u672c\u5730\u526f\u672c<\/span><br \/>\n    <span class=\"token generic-function\"><span class=\"token function\">launch_kernel<\/span><span class=\"token generic class-name\"><span class=\"token operator\">&lt;<\/span><span class=\"token boolean\">true<\/span><span class=\"token punctuation\">,<\/span> scalar_t<span class=\"token punctuation\">,<\/span> kTokensPerCtaLocal<span class=\"token operator\">&gt;<\/span><\/span><\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">.<\/span><span class=\"token punctuation\">.<\/span><span class=\"token punctuation\">.<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span>  <span class=\"token comment\">\/\/ \u6a21\u677f\u5b9e\u53c2\u4e5f\u7528\u672c\u5730\u526f\u672c<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p>\u2460\u628a\u6e90\u5934\u53d8\u6210\u771f constexpr,\u2461\u5728 lambda \u5185\u90e8\u91cd\u65b0\u58f0\u660e\u4e00\u4efd\u672c\u5730 constexpr,\u5207\u65ad&#034;\u8de8 lambda \u5f15\u7528\u6355\u83b7&#034;\u90a3\u6761 MSVC \u8ddf\u4e0d\u4e0a\u7684\u94fe\u8def\u3002\u6ce8\u610f\u7eaf\u8fd0\u884c\u671f\u7528\u5230\u5b83\u7684\u5730\u65b9(\u6bd4\u5982 dim3 grid(&#8230;) \u6784\u9020)\u4e0d\u7528\u6539,\u90a3\u91cc\u672c\u6765\u5c31\u4e0d\u8981\u6c42\u7f16\u8bd1\u671f\u5e38\u91cf\u3002<\/p>\n<hr \/>\n<h3>\u4e8c\u3001\u91cd\u8f7d\u51b3\u8bae:MSVC \u7684\u6b67\u4e49\u5224\u5b9a\u66f4\u4e25<\/h3>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/08\/20260802074051-6a6ef483171dd.png\" alt=\"\u6280\u672f\u56fe1\uff08\u6d41\u7a0b\/\u67b6\u6784\uff09\" \/><\/p>\n<h4>\u4ee3\u8868\u6848\u4f8b<\/h4>\n<p>csrc\/moe\/moe_sum_reduce.cu \u91cc,\u628a half \/ bfloat16 \u8f6c float:<\/p>\n<p><span class=\"token keyword\">return<\/span> <span class=\"token function\">__half2float<\/span><span class=\"token punctuation\">(<\/span><span class=\"token function\">__nv_half<\/span><span class=\"token punctuation\">(<\/span>x<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span>          <span class=\"token comment\">\/\/ x \u662f at::Half<\/span><br \/>\n<span class=\"token keyword\">return<\/span> <span class=\"token function\">__bfloat162float<\/span><span class=\"token punctuation\">(<\/span><span class=\"token function\">__nv_bfloat16<\/span><span class=\"token punctuation\">(<\/span>x<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span>  <span class=\"token comment\">\/\/ x \u662f at::BFloat16<\/span><\/p>\n<p>MSVC \u62a5:__half::__half \u6709\u591a\u4e2a\u6784\u9020\u51fd\u6570\u90fd\u80fd\u5339\u914d\u8fd9\u7ec4\u5b9e\u53c2,\u4ea7\u751f\u6b67\u4e49\u3002<\/p>\n<h4>\u4e3a\u4ec0\u4e48 GCC \u80fd\u8fc7\u3001MSVC \u4e0d\u884c<\/h4>\n<p>__nv_half(x) \u8fd9\u4e2a\u6784\u9020\u8c03\u7528,x(at::Half)\u80fd\u901a\u8fc7\u4e0d\u6b62\u4e00\u6761\u9690\u5f0f\u8f6c\u6362\u8def\u5f84\u5339\u914d\u5230 __nv_half \u7684\u591a\u4e2a\u6784\u9020\u51fd\u6570\u91cd\u8f7d\u3002GCC \u6309\u5b83\u81ea\u5df1\u7684\u91cd\u8f7d\u51b3\u8bae\u89c4\u5219\u6311\u4e86\u4e00\u4e2a;MSVC \u8ba4\u4e3a\u8fd9\u4e9b\u5019\u9009\u96be\u5206\u4f18\u52a3,\u5224\u5b9a\u4e3a\u6b67\u4e49\u3001\u62d2\u7edd\u7f16\u8bd1\u3002<\/p>\n<h4>\u89e3\u6cd5:\u7ed5\u5f00\u591a\u4f59\u7684\u4e2d\u95f4\u7c7b\u578b\u8f6c\u6362<\/h4>\n<p>\u5176\u5b9e\u8fd9\u91cc\u538b\u6839\u4e0d\u9700\u8981\u5148\u8f6c\u6210 CUDA \u7684 __nv_half\/__nv_bfloat16 \u518d\u8f6c float\u2014\u2014at::Half \/ at::BFloat16 \u81ea\u5e26\u5230 float \u7684\u9690\u5f0f\u8f6c\u6362:<\/p>\n<p><span class=\"token keyword\">return<\/span> <span class=\"token generic-function\"><span class=\"token function\">static_cast<\/span><span class=\"token generic class-name\"><span class=\"token operator\">&lt;<\/span><span class=\"token keyword\">float<\/span><span class=\"token operator\">&gt;<\/span><\/span><\/span><span class=\"token punctuation\">(<\/span>x<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span>   <span class=\"token comment\">\/\/ \u4e24\u5904\u90fd\u8fd9\u4e48\u6539<\/span><\/p>\n<p>\u4e00\u6b65\u5230\u4f4d\u8f6c float,\u65e2\u7ed5\u5f00\u4e86\u90a3\u4e2a\u6709\u6b67\u4e49\u7684\u6784\u9020\u8c03\u7528,\u53c8\u8ba9\u4ee3\u7801\u66f4\u7b80\u6d01\u3002\u9762\u5bf9\u91cd\u8f7d\u6b67\u4e49,\u4f18\u5148\u60f3&#034;\u8fd9\u4e2a\u4e2d\u95f4\u8f6c\u6362\u662f\u4e0d\u662f\u591a\u4f59\u7684&#034;,\u5f80\u5f80\u80fd\u8fde\u95ee\u9898\u5e26\u5197\u4f59\u4e00\u8d77\u6d88\u6389,\u800c\u4e0d\u662f\u8d39\u52b2\u53bb\u505a\u663e\u5f0f\u7c7b\u578b\u9650\u5b9a\u3002<\/p>\n<hr \/>\n<h3>\u4e09\u3001Windows SDK \u7684\u53e4\u8463\u5b8f\u6c61\u67d3:#define small char<\/h3>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/08\/20260802074051-6a6ef4835b707.png\" alt=\"\u6280\u672f\u56fe2\uff08\u5bf9\u6bd4\/\u8981\u70b9\uff09\" \/><\/p>\n<h4>\u4ee3\u8868\u6848\u4f8b<\/h4>\n<p>torch \u81ea\u5e26\u5934\u6587\u4ef6 c10\/cuda\/CUDACachingAllocator.h \u91cc\u6709\u4e2a\u518d\u6b63\u5e38\u4e0d\u8fc7\u7684\u6210\u5458:<\/p>\n<p><span class=\"token keyword\">struct<\/span> <span class=\"token punctuation\">.<\/span><span class=\"token punctuation\">.<\/span><span class=\"token punctuation\">.<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n    <span class=\"token keyword\">bool<\/span> small<span class=\"token punctuation\">;<\/span>   <span class=\"token comment\">\/\/ \u2190 \u7f16\u8bd1\u65f6\u8fd9\u91cc\u62a5\u4e00\u5806\u83ab\u540d\u5176\u5999\u7684\u8bed\u6cd5\u9519\u8bef<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p>bool small \u8fd9\u79cd\u5e73\u5e73\u65e0\u5947\u7684\u5199\u6cd5,\u5728 Windows \u4e0a\u5374\u62a5\u8bed\u6cd5\u9519\u8bef\u3002<\/p>\n<h4>\u4e3a\u4ec0\u4e48\u4f1a\u8fd9\u6837<\/h4>\n<p>Windows SDK \u7684\u4e00\u4e2a\u4e0a\u53e4\u5934\u6587\u4ef6 rpcndr.h(RPC \u76f8\u5173)\u91cc,\u6709\u8fd9\u4e48\u4e00\u53e5\u5386\u53f2\u9057\u7559\u7684\u5b8f:<\/p>\n<p><span class=\"token macro property\"><span class=\"token directive-hash\">#<\/span><span class=\"token directive keyword\">define<\/span> <span class=\"token macro-name\">small<\/span> <span class=\"token expression\"><span class=\"token keyword\">char<\/span><\/span><\/span><\/p>\n<p>\u4e00\u65e6\u5b83\u88ab(\u95f4\u63a5)\u5305\u542b\u8fdb\u6765,\u9884\u5904\u7406\u5668\u5c31\u4f1a\u628a\u6e90\u7801\u91cc\u6240\u6709\u7684\u6807\u8bc6\u7b26 small \u65e0\u5dee\u522b\u66ff\u6362\u6210 char\u3002\u4e8e\u662f bool small; \u88ab\u66ff\u6362\u6210 bool char;\u2014\u2014\u5f53\u7136\u8bed\u6cd5\u9519\u8bef\u3002\u8fd9\u79cd&#034;\u6b63\u5e38\u53d8\u91cf\u540d\u649e\u4e0a SDK \u53e4\u8463\u5b8f&#034;\u7684\u6c61\u67d3,\u6392\u67e5\u65f6\u6781\u5177\u8ff7\u60d1\u6027,\u56e0\u4e3a\u6e90\u7801\u672c\u8eab\u770b\u7740\u5b8c\u5168\u6ca1\u95ee\u9898\u3002<\/p>\n<h4>\u89e3\u6cd5:\u628a\u53d8\u91cf\u6539\u540d,\u907f\u5f00\u88ab\u6c61\u67d3\u7684\u6807\u8bc6\u7b26<\/h4>\n<p><span class=\"token keyword\">bool<\/span> small_<span class=\"token punctuation\">;<\/span>   <span class=\"token comment\">\/\/ small \u2192 small_,\u8fde\u540c\u6240\u6709\u5f15\u7528\u4e00\u8d77\u6539<\/span><\/p>\n<p>\u8fd9\u662f torch \u81ea\u5e26\u5934\u6587\u4ef6,\u610f\u5473\u7740\u91cd\u88c5 \/ \u5347\u7ea7 torch \u540e\u8fd9\u4e2a\u8865\u4e01\u4f1a\u88ab\u8986\u76d6,\u9700\u8981\u91cd\u6253\u3002\u672c\u7cfb\u5217\u91cc\u8fd9\u7c7b&#034;\u6253\u5728\u7b2c\u4e09\u65b9\u5305(torch \/ flashinfer)\u91cc\u3001\u4f1a\u968f\u91cd\u88c5\u4e22\u5931&#034;\u7684\u8865\u4e01,\u90fd\u5355\u72ec\u6807\u6ce8\u4e86\u91cd\u6253\u6761\u4ef6\u2014\u2014\u8fd9\u4e5f\u662f\u4e3a\u4ec0\u4e48\u6240\u6709\u8865\u4e01\u90fd\u505a\u6210\u53ef\u91cd\u590d\u8fd0\u884c\u7684\u811a\u672c\u3002<\/p>\n<hr \/>\n<h3>\u56db\u3001\u5f53 MSVC \u81ea\u5df1\u5d29\u6e83:C1001 \u5185\u90e8\u7f16\u8bd1\u5668\u9519\u8bef<\/h3>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/08\/20260802074051-6a6ef48384626.png\" alt=\"\u6280\u672f\u56fe3\uff08\u901f\u67e5\/\u6e05\u5355\uff09\" \/><\/p>\n<p>\u524d\u9762\u6240\u6709\u95ee\u9898,\u597d\u6b79\u662f&#034;\u7f16\u8bd1\u5668\u62a5\u9519\u3001\u4f60\u6539\u4ee3\u7801&#034;\u3002\u8fd9\u4e00\u4e2a\u4e0d\u4e00\u6837\u2014\u2014\u7f16\u8bd1\u5668\u81ea\u5df1\u6302\u4e86\u3002<\/p>\n<h4>\u73b0\u8c61<\/h4>\n<p>\u7f16\u8bd1 csrc\/moe\/fp8_blockwise_moe_kernel.cu \u65f6:<\/p>\n<p>fatal error C1001: \u5185\u90e8\u7f16\u8bd1\u5668\u9519\u8bef<br \/>\n(\u7f16\u8bd1\u5668\u6587\u4ef6 &#034;&#8230;\\\\symbols.c&#034;,\u7b2c 33772 \u884c)<br \/>\n\u8bf7\u5c1d\u8bd5\u7b80\u5316\u6216\u66f4\u6539\u4e0a\u8ff0\u6240\u5217\u4f4d\u7f6e\u9644\u8fd1\u7684\u7a0b\u5e8f<\/p>\n<p>\u5d29\u6e83\u53d1\u751f\u5728\u89e3\u6790 CUTLASS \u7684 sm103_blockscaled_mma_array_warpspecialized.hpp \u8fd9\u4e2a\u6a21\u677f\u5934\u6587\u4ef6\u65f6\u3002\u6ce8\u610f:C1001 \u662f\u7f16\u8bd1\u5668\u672c\u8eab\u7684\u5185\u90e8\u9519\u8bef,\u4e0d\u662f\u4f60\u7684\u4ee3\u7801&#034;\u8bed\u6cd5\u9519\u4e86&#034;,\u800c\u662f MSVC \u5728\u5904\u7406\u67d0\u6bb5\u4ee3\u7801\u65f6\u81ea\u5df1\u5d29\u4e86\u2014\u2014\u5fae\u8f6f\u7684\u62a5\u9519\u6587\u6848\u90fd\u5728\u5efa\u8bae\u4f60&#034;\u7b80\u5316\u4ee3\u7801\u6216\u4e0a\u62a5&#034;\u3002<\/p>\n<h4>\u4e3a\u4ec0\u4e48\u4e0d\u80fd&#034;\u786c\u4fee&#034;<\/h4>\n<p>C1001 \u8fd9\u79cd\u95ee\u9898,\u7406\u8bba\u4e0a\u7684&#034;\u4fee\u6cd5&#034;\u662f\u53bb\u7b80\u5316\u89e6\u53d1\u5d29\u6e83\u7684\u90a3\u6bb5 CUTLASS \u6a21\u677f\u4ee3\u7801\u3002\u4f46\u90a3\u662f\u7b2c\u4e09\u65b9\u5e93(CUTLASS)\u5185\u90e8\u9ad8\u5ea6\u590d\u6742\u7684\u6a21\u677f\u5143\u7f16\u7a0b,\u6539\u5b83\u98ce\u9669\u6781\u9ad8\u3001\u4e14\u6839\u672c\u4e0d\u662f\u6211\u4eec\u8be5\u78b0\u7684\u5730\u65b9\u3002\u5728\u4e00\u6bb5\u4f1a\u628a\u7f16\u8bd1\u5668\u641e\u5d29\u7684\u7b2c\u4e09\u65b9\u6a21\u677f\u4e0a\u627e\u7ed5\u8fc7\u5199\u6cd5,\u6295\u5165\u4ea7\u51fa\u6bd4\u6781\u4f4e\u3002<\/p>\n<h4>\u89e3\u6cd5:\u91dc\u5e95\u62bd\u85aa\u2014\u2014\u8fd9\u6bb5\u4ee3\u7801\u672c\u6765\u5c31\u7528\u4e0d\u4e0a<\/h4>\n<p>\u5173\u952e\u7684\u8f6c\u6298\u5728\u4e8e\u770b\u6e05:sm103 \/ sm100 \u8fd9\u4e9b\u547d\u540d,\u662f Blackwell(SM100 \u7cfb\u5217)\u6570\u636e\u4e2d\u5fc3\u7ea7\u67b6\u6784\u4e13\u5c5e\u7684 MoE \u5757\u7f29\u653e\u5206\u7ec4\u77e9\u9635\u4e58\u6cd5\u3002\u800c\u6211\u4eec\u7684\u76ee\u6807\u663e\u5361\u662f RTX 3090(sm_86,Ampere)\u2014\u2014\u8fd9\u6bb5\u4ee3\u7801\u8ddf\u6211\u4eec\u7684\u786c\u4ef6\u6beb\u65e0\u5173\u7cfb,\u6839\u672c\u4e0d\u9700\u8981\u7f16\u8bd1\u5b83\u3002<\/p>\n<p>\u4e8e\u662f\u4e0d\u53bb\u786c\u4fee\u5d29\u6e83,\u800c\u662f\u628a\u6574\u4e2a\u6587\u4ef6\u4ece\u7f16\u8bd1\u76ee\u6807\u91cc\u6392\u9664(\u6539 CMakeLists,\u7528 if(NOT MSVC) \u628a\u5b83\u6321\u5728 MSVC \u6784\u5efa\u4e4b\u5916)\u3002\u8fd9\u5c5e\u4e8e&#034;\u67b6\u6784\u88c1\u526a&#034;\u7684\u8303\u7574\u2014\u2014\u7528\u4e0d\u4e0a\u7684\u67b6\u6784\u4e13\u5c5e\u4ee3\u7801\u4e00\u5f8b\u4e0d\u7f16,\u8fd9\u662f\u8d2f\u7a7f\u6574\u4e2a\u653b\u5173\u7684\u4e3b\u7ebf\u51b3\u7b56,\u4e0b\u4e00\u7bc7(\u7b2c 5 \u7bc7)\u4f1a\u7cfb\u7edf\u8bb2\u3002\u8fd9\u91cc\u5148\u8bb0\u4f4f\u4e00\u4e2a\u5224\u65ad\u539f\u5219:<\/p>\n<p>\u5f53\u4f60\u649e\u4e0a\u7f16\u8bd1\u5668\u5185\u90e8\u5d29\u6e83(C1001),\u5148\u522b\u6025\u7740\u60f3\u600e\u4e48\u7ed5\u8fc7\u90a3\u6bb5\u4ee3\u7801\u2014\u2014\u5148\u95ee\u4e00\u53e5&#034;\u8fd9\u6bb5\u4ee3\u7801\u6211\u7684\u786c\u4ef6\u5230\u5e95\u7528\u4e0d\u7528\u5f97\u4e0a&#034;\u3002\u5982\u679c\u7528\u4e0d\u4e0a,\u6392\u9664\u6574\u4e2a\u6587\u4ef6,\u8fdc\u6bd4\u5728\u7b2c\u4e09\u65b9\u6a21\u677f\u91cc\u8ddf\u7f16\u8bd1\u5668\u5d29\u6e83\u6b7b\u78d5\u8981\u660e\u667a\u3002<\/p>\n<hr \/>\n<h3>\u63d2\u66f2:\u4e00\u6b21&#034;\u8865\u4e01\u79bb\u5947\u5931\u6548&#034;\u4e8b\u4ef6,\u4e0e\u4e00\u6761\u94c1\u5f8b<\/h3>\n<p>\u503c\u5f97\u5355\u72ec\u8bb0\u4e00\u7b14,\u56e0\u4e3a\u5b83\u6559\u8bad\u6df1\u523b\u3002<\/p>\n<p>\u524d\u9762\u6848\u4f8b 1 \u91cc,FP8_E4M3_MAX \u6539\u6210\u5b57\u9762\u91cf 448.0f \u7684\u8865\u4e01,\u811a\u672c\u660e\u660e\u62a5\u544a\u4e86&#034;PATCHED \u6210\u529f&#034;\u3002\u4f46\u597d\u51e0\u8f6e\u4e4b\u540e,\u5728\u53e6\u4e00\u5904\u62a5\u9519\u91cc\u95f4\u63a5\u53d1\u73b0:\u90a3\u4e00\u884c\u53c8\u53d8\u56de\u4e86\u539f\u59cb\u7684 numeric_limits \u7248\u672c\u2014\u2014\u8865\u4e01\u79bb\u5947\u5730\u5931\u6548\u4e86\u3002<\/p>\n<p>\u5177\u4f53\u539f\u56e0\u5df2\u65e0\u6cd5\u56de\u6eaf\u786e\u8ba4(\u53ef\u80fd\u662f\u811a\u672c\u67d0\u6b21\u9759\u9ed8\u51fa\u9519,\u4e5f\u53ef\u80fd\u662f\u5e76\u884c\u7684\u5176\u4ed6\u6539\u52a8\u8986\u76d6\u4e86\u5b83)\u3002\u4f46\u6559\u8bad\u975e\u5e38\u660e\u786e:\u8fd9\u662f\u6574\u4e2a\u653b\u5173\u91cc\u552f\u4e00\u4e00\u6b21,\u6ca1\u6709\u5728&#034;\u811a\u672c\u62a5\u544a\u6210\u529f&#034;\u4e4b\u540e\u7d27\u8ddf\u7740\u7528\u5b9e\u9645\u6587\u4ef6\u5185\u5bb9\u9a8c\u8bc1\u4e00\u904d,\u5c31\u7ee7\u7eed\u5f80\u4e0b\u8d70\u4e86\u2014\u2014\u7ed3\u679c\u9694\u4e86\u597d\u51e0\u8f6e\u624d\u53d1\u73b0\u5b83\u6ca1\u751f\u6548,\u767d\u767d\u591a\u7ed5\u4e86\u8def\u3002<\/p>\n<p>\u7531\u6b64\u7acb\u4e0b\u7684\u94c1\u5f8b,\u8d2f\u7a7f\u540e\u7eed\u5168\u7a0b:<\/p>\n<p>\u201c\u811a\u672c\u62a5\u544a\u6210\u529f\u201d \u2260 \u201c\u6539\u52a8\u771f\u7684\u751f\u6548\u201d\u3002\u6bcf\u6253\u4e00\u4e2a\u8865\u4e01,\u5fc5\u987b\u5728\u540c\u4e00\u6b65\u7acb\u523b\u7528\u5b9e\u9645\u6587\u4ef6\u5185\u5bb9(\u6216\u5b9e\u9645\u7f16\u8bd1\u7ed3\u679c)\u4eb2\u773c\u9a8c\u8bc1,\u4e0d\u80fd\u51ed\u4fe1\u4efb\u5f80\u4e0b\u8d70\u3002<\/p>\n<p>\u8fd9\u6761\u7eaa\u5f8b\u770b\u4f3c\u5570\u55e6,\u4f46\u5728\u4e00\u4e2a\u52a8\u8f84\u4e0a\u767e\u8f6e\u3001\u8fd8\u6709\u591a\u65b9(\u4eba &#043; \u591a\u4e2a AI \u5de5\u5177)\u5e76\u884c\u6539\u52a8\u540c\u4e00\u4efd\u6e90\u7801\u7684\u653b\u5173\u91cc,\u5b83\u662f\u9632\u6b62&#034;\u57fa\u4e8e\u9519\u8bef\u524d\u63d0\u7ee7\u7eed\u5f80\u4e0b\u3001\u6700\u540e\u7ffb\u8f66&#034;\u7684\u552f\u4e00\u4fdd\u9669\u3002\u7cfb\u5217\u6700\u540e\u7684\u65b9\u6cd5\u8bba\u7bc7\u4f1a\u628a\u8fd9\u6761\u548c\u5176\u5b83\u5de5\u7a0b\u7eaa\u5f8b\u4e00\u8d77\u5c55\u5f00\u3002<\/p>\n<hr \/>\n<h3>\u5c0f\u7ed3\u4e0e\u4e0b\u4e00\u7bc7<\/h3>\n<p>\u672c\u7bc7\u8fd9\u51e0\u7c7b\u95ee\u9898,\u662f\u6574\u4e2a\u79fb\u690d\u91cc\u6700\u96be\u6392\u67e5\u7684\u90e8\u5206,\u56e0\u4e3a\u5b83\u4eec\u7684\u62a5\u9519\u4f4d\u7f6e\u666e\u904d\u5177\u6709\u8ff7\u60d1\u6027:<\/p>\n<table>\n<tr>\u7c7b\u522b\u62a5\u9519\u8868\u8c61\u771f\u6b63\u6839\u56e0<\/tr>\n<tbody>\n<tr>\n<td>\u5e38\u91cf\u6c42\u503c(numeric_limits)<\/td>\n<td>\u201c\u8868\u8fbe\u5f0f\u5fc5\u987b\u662f\u5e38\u91cf\u503c\u201d,\u6307\u5411\u5404\u79cd\u4f4d\u7f6e<\/td>\n<td>\u53f3\u8fb9\u7684 numeric_limits::max() \u672c\u8eab\u4e0d\u53ef constexpr \u6c42\u503c<\/td>\n<\/tr>\n<tr>\n<td>\u5e38\u91cf\u6c42\u503c(const\/lambda)<\/td>\n<td>\u201c\u8bfb\u53d6\u8d85\u8fc7\u751f\u547d\u5468\u671f\u7684\u53d8\u91cf\u201d\u201cthis\u201d,\u6307\u5411\u5b8f\u5916\u5c42<\/td>\n<td>const \u975e constexpr &#043; \u5d4c\u5957 lambda \u5f15\u7528\u6355\u83b7<\/td>\n<\/tr>\n<tr>\n<td>\u91cd\u8f7d\u51b3\u8bae<\/td>\n<td>\u6784\u9020\u51fd\u6570\u6b67\u4e49<\/td>\n<td>\u591a\u4f59\u7684\u4e2d\u95f4\u7c7b\u578b\u8f6c\u6362\u5f15\u5165\u4e86\u591a\u6761\u9690\u5f0f\u8f6c\u6362\u8def\u5f84<\/td>\n<\/tr>\n<tr>\n<td>\u5b8f\u6c61\u67d3<\/td>\n<td>\u6b63\u5e38\u53d8\u91cf\u540d\u5904\u83ab\u540d\u8bed\u6cd5\u9519\u8bef<\/td>\n<td>Windows SDK #define small char \u66ff\u6362<\/td>\n<\/tr>\n<tr>\n<td>C1001<\/td>\n<td>\u7f16\u8bd1\u5668\u5185\u90e8\u5d29\u6e83<\/td>\n<td>\u7b2c\u4e09\u65b9\u67b6\u6784\u4e13\u5c5e\u6a21\u677f,\u672c\u5c31\u4e0d\u8be5\u7f16<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u5b83\u4eec\u5171\u4eab\u4e00\u4e2a\u6392\u67e5\u5fc3\u6cd5:\u62a5\u9519\u6307\u5411\u7684\u90a3\u4e00\u884c,\u5e38\u5e38\u662f\u65e0\u8f9c\u7684;\u771f\u51f6\u8981\u987a\u7740&#034;\u8fd9\u4e2a\u503c\/\u8fd9\u6bb5\u4ee3\u7801\u5230\u5e95\u4ece\u54ea\u6765\u3001\u80fd\u4e0d\u80fd\u6ee1\u8db3\u7f16\u8bd1\u5668\u7684\u4e25\u683c\u8981\u6c42&#034;\u5f80\u6df1\u5904\u8ffd\u3002 \u800c\u9762\u5bf9\u5176\u4e2d\u4ee3\u4ef7\u6700\u9ad8\u7684\u4e24\u7c7b(\u7f16\u8bd1\u5668\u5d29\u6e83\u3001\u67b6\u6784\u4e13\u5c5e\u4ee3\u7801),\u6700\u4f18\u89e3\u5f80\u5f80\u4e0d\u662f&#034;\u4fee&#034;,\u800c\u662f&#034;\u5224\u65ad\u5b83\u8be5\u4e0d\u8be5\u5b58\u5728&#034;\u2014\u2014\u8fd9\u6b63\u597d\u5f15\u51fa\u4e0b\u4e00\u7bc7\u7684\u4e3b\u7ebf\u3002<\/p>\n<p>\u7b2c 6 \u7bc7:\u67b6\u6784\u88c1\u526a\u4e0e\u94fe\u63a5\u6536\u5c3e\u3002\u6211\u4eec\u4f1a\u628a\u8d2f\u7a7f\u5168\u7a0b\u7684\u90a3\u6761\u4e3b\u7ebf\u51b3\u7b56\u8bb2\u900f\u2014\u2014FlashMLA\u3001SM90 FA3\u3001SM100 Blackwell \u8fd9\u4e9b\u6570\u636e\u4e2d\u5fc3\u7ea7\u67b6\u6784\u7684\u4ee3\u7801,\u5728\u6d88\u8d39\u7ea7 RTX 3090 \u4e0a\u4e3a\u4ec0\u4e48\u4e00\u5f8b\u4e0d\u7f16\u3001\u600e\u4e48\u88c1\u5e72\u51c0;\u4ee5\u53ca\u88c1\u526a\u4e4b\u540e\u5192\u51fa\u7684\u6700\u540e\u4e00\u9053\u574e\u2014\u2014\u94fe\u63a5\u671f\u7684&#034;\u672a\u89e3\u6790\u5916\u90e8\u7b26\u53f7&#034;(LNK2019),\u548c\u5b83\u80cc\u540e&#034;\u7b97\u5b50\u6ce8\u518c\u4e0e\u5b9e\u73b0\u6ca1\u540c\u6b65&#034;\u7684\u6210\u56e0\u3002\u7136\u540e,\u5c31\u662f wheel \u4ea7\u51fa\u4e0e\u5b89\u88c5\u9a8c\u8bc1\u7684\u6536\u5b98\u3002<\/p>\n<hr \/>\n<hr \/>\n<p>\u7cfb\u5217\u5bfc\u822a&#xff08;\u5168 14 \u7bc7&#xff09;<\/p>\n<p>\u7f16\u8bd1\u79fb\u690d\u7bc7&#xff08;\u600e\u4e48\u628a sglang \u4ece\u6e90\u7801\u7f16\u51fa\u6765&#xff09;<\/p>\n<ul>\n<li>00 \u00b7 \u7cfb\u5217\u603b\u89c8<\/li>\n<li>01 \u00b7 EPGF \u73af\u5883\u5730\u57fa\u4e0e\u5c94\u8def\u53e3<\/li>\n<li>02 \u00b7 \u7ed3\u8bba\u4e0e\u53ef\u884c\u6027&#xff1a;\u4e09\u94c1\u8bc1 &#043; &#8211;no-deps<\/li>\n<li>03 \u00b7 \u7f16\u8bd1\u7bc7\u00b7\u524d\u7f6e&#xff1a;FlashInfer Windows \u6e90\u7801\u7f16\u8bd1<\/li>\n<li>04 \u00b7 \u7f16\u8bd1\u7bc7\u00b7\u73af\u5883\u5173&#xff1a;VS \u7248\u672c\u3001venv \u987a\u5e8f\u3001CUDA \u591a\u7248\u672c\u3001\u751f\u6210\u5668\u7f13\u5b58<\/li>\n<li>05 \u00b7 \u79fb\u690d\u7bc7(\u4e0a)&#xff1a;GCC \u65b9\u8a00\u4e0e MSVC \u9884\u5904\u7406\u5668\u4e25\u683c\u6027<\/li>\n<li>06 \u00b7 \u79fb\u690d\u7bc7(\u4e0b)&#xff1a;\u5e38\u91cf\u6c42\u503c\u3001\u91cd\u8f7d\u51b3\u8bae\u4e0e\u7f16\u8bd1\u5668\u5d29\u6e83<\/li>\n<li>07 \u00b7 \u7f16\u8bd1\u7bc7\u00b7\u6536\u5c3e&#xff1a;\u67b6\u6784\u88c1\u526a\u4e0e LNK2019 \u94fe\u63a5\u6536\u5c3e<\/li>\n<li>08 \u00b7 \u65b9\u6cd5\u8bba&#xff1a;\u53f0\u8d26\u3001\u5e42\u7b49\u8865\u4e01\u811a\u672c\u4e0e\u591a AI \u534f\u4f5c<\/li>\n<\/ul>\n<p>\u90e8\u7f72\u8fd0\u884c\u7bc7&#xff08;\u600e\u4e48\u8dd1\u8d77\u6765\u5e76\u6392\u969c&#xff09;<\/p>\n<ul>\n<li>09 \u00b7 \u6b63\u786e\u542f\u52a8 SGLang &#043; Unlimited-OCR<\/li>\n<li>10 \u00b7 \u6392\u969c\u2460&#xff1a;\u63a8\u7406\u8f93\u51fa\u4e71\u7801\/\u6570\u503c\u9519\u8bef\u6839\u56e0\u5b9a\u4f4d<\/li>\n<li>11 \u00b7 \u6392\u969c\u2461&#xff1a;\u73af\u5883\u53d8\u91cf\u5757\u8d85\u9650\u5bfc\u81f4 spawn \u5b50\u8fdb\u7a0b\u5d29\u6e83<\/li>\n<li>12 \u00b7 \u6027\u80fd\u8c03\u4f18&#xff1a;RTX 3090 MoE triton autotune config<\/li>\n<li>13 \u00b7 \u957f\u6587\u6863\u9a8c\u8bc1 &#043; \u4ee3\u7406\/\u7aef\u53e3\u51b2\u7a81\u5751 &#043; \u4f7f\u7528\u6307\u5357<\/li>\n<\/ul>\n<p>\u7f16\u8bd1\u79fb\u690d\u7bc7\u8bb2&#034;\u80fd\u4e0d\u80fd\u7f16\u51fa\u6765\u3001\u600e\u4e48\u7f16&#034;&#xff1b;\u90e8\u7f72\u8fd0\u884c\u7bc7\u8bb2&#034;\u7f16\u51fa\u6765\u4e4b\u540e\u600e\u4e48\u8dd1\u901a\u3001\u600e\u4e48\u6392\u969c\u3001\u600e\u4e48\u8c03\u4f18&#034;\u3002 \u4e24\u7bc7\u4e4b\u95f4\u6700\u5173\u952e\u7684\u4ea4\u53c9\u70b9&#xff1a;\u672c\u673a\u5b9e\u9645\u7f16\u8bd1\u7528\u7684\u662f \u7b2c 07 \u7bc7 \u4ea7\u7269 sglang_kernel-0.4.3-cp310-abi3-win_amd64.whl&#xff0c; \u800c \u7b2c 09 \u7bc7 \u7684\u542f\u52a8\u547d\u4ee4\u6b63\u662f\u52a0\u8f7d\u5b83 &#043; Unlimited-OCR \u6a21\u578b\u3002<\/p>\n<hr \/>\n<h3>\u53c2\u8003\u8d44\u6599\u4e0e\u5ef6\u4f38\u9605\u8bfb<\/h3>\n<p>\u4ee5\u4e0b\u4e3a\u672c\u6587\u6d89\u53ca\u7684\u5b98\u65b9\u4ed3\u5e93\u3001\u6587\u6863\u4e0e\u89c4\u683c\u7ad9&#xff0c;\u5efa\u8bae\u53d1\u5e03\u524d\u70b9\u4e00\u904d\u786e\u8ba4\u53ef\u8fbe&#xff1a;<\/p>\n<ul>\n<li>Unlimited-OCR \u5b98\u65b9\u4ed3\u5e93&#xff08;\u6a21\u578b\u4e0e\u9879\u76ee\u6e90\u7801&#xff09;<\/li>\n<li>SGLang \u5b98\u65b9\u4ed3\u5e93<\/li>\n<li>SGLang \u5b98\u65b9\u6587\u6863&#xff08;\u542f\u52a8\u53c2\u6570 \/ OpenAI \u517c\u5bb9 API&#xff09;<\/li>\n<li>flashinfer-windows&#xff08;Windows \u517c\u5bb9 fork&#xff0c;\u7f16\u8bd1\u524d\u7f6e&#xff09;<\/li>\n<li>vllm-windows&#xff08;\u540c\u4f5c\u8005&#xff0c;\u53ef\u5bf9\u7167\u7684 Windows \u79fb\u690d\u601d\u8def&#xff09;<\/li>\n<li>PyTorch Windows CUDA \u9884\u7f16\u8bd1\u7d22\u5f15&#xff08;cu130&#xff09;<\/li>\n<li>NVIDIA CUDA Toolkit \u4e0b\u8f7d<\/li>\n<li>uv \u5b98\u65b9\u6587\u6863&#xff08;Python \u73af\u5883\u6cbb\u7406&#xff09;<\/li>\n<li>MSVC \/Zc:preprocessor \u6807\u51c6\u9884\u5904\u7406\u5668<\/li>\n<li>MSVC \u81f4\u547d\u9519\u8bef C1001&#xff08;\u7f16\u8bd1\u5668\u5185\u90e8\u9519\u8bef&#xff09;<\/li>\n<li>nvcc -Xcompiler \u8f6c\u53d1 host \u7f16\u8bd1\u5668\u9009\u9879<\/li>\n<li>CMake \u751f\u6210\u5668&#xff08;Visual Studio \/ Ninja&#xff09;<\/li>\n<li>RTX 3090 \u89c4\u683c&#xff08;GA102 \/ sm_86&#xff0c;\u5171\u4eab\u5185\u5b58 100KB&#xff09;<\/li>\n<li>CUDA \u5171\u4eab\u5185\u5b58\u4e0a\u9650\u4e0e dynamic_shared_memory \u9650\u5236<\/li>\n<li>Windows \u5b50\u8fdb\u7a0b\u73af\u5883\u53d8\u91cf\u5757\u9650\u5236&#xff08;CreateProcess \/ ~32KB&#xff09;<\/li>\n<li>OpenAI \u517c\u5bb9 API \u53c2\u8003&#xff08;\u63a8\u7406\u8c03\u7528&#xff09;<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Windows \u539f\u751f\u7f16\u8bd1 SGLang&#xff08;6\/8\u00b7\u4e0b&#xff09;&#xff1a;\u5e38\u91cf\u6c42\u503c\u3001\u91cd\u8f7d\u51b3\u8bae\u4e0e\u7f16\u8bd1\u5668\u5d29\u6e83 C1001 \u4e0a\u4e00\u7bc7\u7684\u4e03\u4e2a\u75c5\u79cd,\u5927\u591a\u662f\\&#8221;\u7f3a\u4ec0\u4e48\u8865\u4ec0\u4e48\\&#8221;\u7684\u65b9\u8a00\u66ff\u6362\u2014\u2014\u770b\u5f97\u89c1\u3001\u6539\u5f97\u52a8\u3002\u672c\u7bc7\u8fd9\u4e00\u7c7b\u4e0d\u4e00\u6837:\u5b83\u4eec\u662f MSVC \u5728\u8bed\u4e49\u5c42\u9762\u6bd4 GCC \u4e25\u683c\u5e26\u6765\u7684\u95ee\u9898,\u5171\u540c\u7279\u70b9\u662f\u62a5\u9519\u4f4d\u7f6e\u5f80\u5f80\u4e0d\u662f\u771f\u51f6,\u6839\u56e0\u85cf\u5728\u597d\u51e0\u5c42\u4e4b\u4e0b\u3002 \u6240\u4ee5\u672c\u7bc7\u4e0d\u53ea\u7ed9\u4fee\u6cd5,\u66f4\u7740\u91cd\u8fd8\u539f\u6392\u67e5\u8fc7\u7a0b\u2014\u2014\u4e3a\u4ec0\u4e48\u62a5\u9519\u6307\u5411\u7684\u90a3\u4e00\u884c\u5176\u5b9e\u662f\u65e0\u8f9c\u7684\u3001\u600e\u4e48\u4e00\u6b65\u6b65\u903c\u8fd1\u771f\u6b63\u7684\u6839\u56e0\u3002\u8fd9\u90e8\u5206\u601d\u8def,\u6bd4\u6700\u7ec8\u7684\u8865\u4e01\u66f4\u6709\u8fc1\u79fb\u4ef7\u503c\u3002<\/p>\n","protected":false},"author":2,"featured_media":89168,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[6994,149],"topic":[],"class_list":["post-89172","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-sglang","tag-windows"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Windows \u539f\u751f\u7f16\u8bd1 SGLang\uff086\/8\u00b7\u4e0b\uff09\uff1a\u5e38\u91cf\u6c42\u503c\u3001\u91cd\u8f7d\u51b3\u8bae\u4e0e\u7f16\u8bd1\u5668\u5d29\u6e83 C1001 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/89172.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Windows \u539f\u751f\u7f16\u8bd1 SGLang\uff086\/8\u00b7\u4e0b\uff09\uff1a\u5e38\u91cf\u6c42\u503c\u3001\u91cd\u8f7d\u51b3\u8bae\u4e0e\u7f16\u8bd1\u5668\u5d29\u6e83 C1001 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"Windows \u539f\u751f\u7f16\u8bd1 SGLang&#xff08;6\/8\u00b7\u4e0b&#xff09;&#xff1a;\u5e38\u91cf\u6c42\u503c\u3001\u91cd\u8f7d\u51b3\u8bae\u4e0e\u7f16\u8bd1\u5668\u5d29\u6e83 C1001 \u4e0a\u4e00\u7bc7\u7684\u4e03\u4e2a\u75c5\u79cd,\u5927\u591a\u662f&quot;\u7f3a\u4ec0\u4e48\u8865\u4ec0\u4e48&quot;\u7684\u65b9\u8a00\u66ff\u6362\u2014\u2014\u770b\u5f97\u89c1\u3001\u6539\u5f97\u52a8\u3002\u672c\u7bc7\u8fd9\u4e00\u7c7b\u4e0d\u4e00\u6837:\u5b83\u4eec\u662f MSVC \u5728\u8bed\u4e49\u5c42\u9762\u6bd4 GCC \u4e25\u683c\u5e26\u6765\u7684\u95ee\u9898,\u5171\u540c\u7279\u70b9\u662f\u62a5\u9519\u4f4d\u7f6e\u5f80\u5f80\u4e0d\u662f\u771f\u51f6,\u6839\u56e0\u85cf\u5728\u597d\u51e0\u5c42\u4e4b\u4e0b\u3002 \u6240\u4ee5\u672c\u7bc7\u4e0d\u53ea\u7ed9\u4fee\u6cd5,\u66f4\u7740\u91cd\u8fd8\u539f\u6392\u67e5\u8fc7\u7a0b\u2014\u2014\u4e3a\u4ec0\u4e48\u62a5\u9519\u6307\u5411\u7684\u90a3\u4e00\u884c\u5176\u5b9e\u662f\u65e0\u8f9c\u7684\u3001\u600e\u4e48\u4e00\u6b65\u6b65\u903c\u8fd1\u771f\u6b63\u7684\u6839\u56e0\u3002\u8fd9\u90e8\u5206\u601d\u8def,\u6bd4\u6700\u7ec8\u7684\u8865\u4e01\u66f4\u6709\u8fc1\u79fb\u4ef7\u503c\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/89172.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-08-02T07:40:52+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/08\/20260802074050-6a6ef482007cb.png\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/89172.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/89172.html\",\"name\":\"Windows \u539f\u751f\u7f16\u8bd1 SGLang\uff086\/8\u00b7\u4e0b\uff09\uff1a\u5e38\u91cf\u6c42\u503c\u3001\u91cd\u8f7d\u51b3\u8bae\u4e0e\u7f16\u8bd1\u5668\u5d29\u6e83 C1001 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-08-02T07:40:52+00:00\",\"dateModified\":\"2026-08-02T07:40:52+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/89172.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/89172.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/89172.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Windows \u539f\u751f\u7f16\u8bd1 SGLang\uff086\/8\u00b7\u4e0b\uff09\uff1a\u5e38\u91cf\u6c42\u503c\u3001\u91cd\u8f7d\u51b3\u8bae\u4e0e\u7f16\u8bd1\u5668\u5d29\u6e83 C1001\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Windows \u539f\u751f\u7f16\u8bd1 SGLang\uff086\/8\u00b7\u4e0b\uff09\uff1a\u5e38\u91cf\u6c42\u503c\u3001\u91cd\u8f7d\u51b3\u8bae\u4e0e\u7f16\u8bd1\u5668\u5d29\u6e83 C1001 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/89172.html","og_locale":"zh_CN","og_type":"article","og_title":"Windows \u539f\u751f\u7f16\u8bd1 SGLang\uff086\/8\u00b7\u4e0b\uff09\uff1a\u5e38\u91cf\u6c42\u503c\u3001\u91cd\u8f7d\u51b3\u8bae\u4e0e\u7f16\u8bd1\u5668\u5d29\u6e83 C1001 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"Windows \u539f\u751f\u7f16\u8bd1 SGLang&#xff08;6\/8\u00b7\u4e0b&#xff09;&#xff1a;\u5e38\u91cf\u6c42\u503c\u3001\u91cd\u8f7d\u51b3\u8bae\u4e0e\u7f16\u8bd1\u5668\u5d29\u6e83 C1001 \u4e0a\u4e00\u7bc7\u7684\u4e03\u4e2a\u75c5\u79cd,\u5927\u591a\u662f\"\u7f3a\u4ec0\u4e48\u8865\u4ec0\u4e48\"\u7684\u65b9\u8a00\u66ff\u6362\u2014\u2014\u770b\u5f97\u89c1\u3001\u6539\u5f97\u52a8\u3002\u672c\u7bc7\u8fd9\u4e00\u7c7b\u4e0d\u4e00\u6837:\u5b83\u4eec\u662f MSVC \u5728\u8bed\u4e49\u5c42\u9762\u6bd4 GCC \u4e25\u683c\u5e26\u6765\u7684\u95ee\u9898,\u5171\u540c\u7279\u70b9\u662f\u62a5\u9519\u4f4d\u7f6e\u5f80\u5f80\u4e0d\u662f\u771f\u51f6,\u6839\u56e0\u85cf\u5728\u597d\u51e0\u5c42\u4e4b\u4e0b\u3002 \u6240\u4ee5\u672c\u7bc7\u4e0d\u53ea\u7ed9\u4fee\u6cd5,\u66f4\u7740\u91cd\u8fd8\u539f\u6392\u67e5\u8fc7\u7a0b\u2014\u2014\u4e3a\u4ec0\u4e48\u62a5\u9519\u6307\u5411\u7684\u90a3\u4e00\u884c\u5176\u5b9e\u662f\u65e0\u8f9c\u7684\u3001\u600e\u4e48\u4e00\u6b65\u6b65\u903c\u8fd1\u771f\u6b63\u7684\u6839\u56e0\u3002\u8fd9\u90e8\u5206\u601d\u8def,\u6bd4\u6700\u7ec8\u7684\u8865\u4e01\u66f4\u6709\u8fc1\u79fb\u4ef7\u503c\u3002","og_url":"https:\/\/www.wsisp.com\/helps\/89172.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-08-02T07:40:52+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/08\/20260802074050-6a6ef482007cb.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"3 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/89172.html","url":"https:\/\/www.wsisp.com\/helps\/89172.html","name":"Windows \u539f\u751f\u7f16\u8bd1 SGLang\uff086\/8\u00b7\u4e0b\uff09\uff1a\u5e38\u91cf\u6c42\u503c\u3001\u91cd\u8f7d\u51b3\u8bae\u4e0e\u7f16\u8bd1\u5668\u5d29\u6e83 C1001 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-08-02T07:40:52+00:00","dateModified":"2026-08-02T07:40:52+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/89172.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/89172.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/89172.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"Windows \u539f\u751f\u7f16\u8bd1 SGLang\uff086\/8\u00b7\u4e0b\uff09\uff1a\u5e38\u91cf\u6c42\u503c\u3001\u91cd\u8f7d\u51b3\u8bae\u4e0e\u7f16\u8bd1\u5668\u5d29\u6e83 C1001"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/89172","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=89172"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/89172\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/89168"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=89172"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=89172"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=89172"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=89172"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}