{"id":429221,"date":"2021-04-18T06:11:01","date_gmt":"2021-04-17T22:11:01","guid":{"rendered":"http:\/\/4563.org\/?p=429221"},"modified":"2021-04-18T06:11:01","modified_gmt":"2021-04-17T22:11:01","slug":"%e4%bb%8e-avx2-%e6%9c%ba%e5%99%a8%e7%bc%96%e8%af%91-avx-512-%e4%bb%a3%e7%a0%81%e5%a4%b1%e8%b4%a5","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=429221","title":{"rendered":"\u4ece AVX2 \u673a\u5668\u7f16\u8bd1 AVX-512 \u4ee3\u7801\u5931\u8d25"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  \u4ece AVX2 \u673a\u5668\u7f16\u8bd1 AVX-512 \u4ee3\u7801\u5931\u8d25               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : xuegy <\/span>  <span><i><\/i> 8<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\"> <\/p>\n<p>\u5934\u8282\u70b9\u662f Haswell (AVX2)\uff0c\u8ba1\u7b97\u8282\u70b9\u662f Skylake (AVX-512)\uff0c\u60f3\u628a C++\u4ee3\u7801\u4f18\u5316\u4e3a AVX-512 \u6307\u4ee4\u96c6\u3002<\/p>\n<p>\u5c1d\u8bd5\u4e86 gcc9\uff0c\u52a0\u4e86<code>-march=skylake-avx512<\/code>\u76f4\u63a5\u7f16\u4e0d\u8fc7\u53bb\u3002<\/p>\n<p>\u53c8\u8bd5\u4e86 icc\uff0c\u52a0\u4e86&#8217;-axCORE-AVX512&#8217;\u80fd\u7f16\u8bd1\u901a\u8fc7\uff0c\u4e00\u8fd0\u884c\u79d2\u5d29\u6e83\u3002<\/p>\n<p>\u8ddf\u7ba1\u7406\u5458\u4e00\u5757\u8c03\u8bd5\u4e86\u4e00\u6574\u5929\uff0c\u8c01\u4e5f\u4e0d\u77e5\u9053\u600e\u4e48\u56de\u4e8b\u3002\u6700\u540e\u7ba1\u7406\u5458\u544a\u8bc9\u6211\u8bf4\uff0c\u67d0\u4e9b\u60c5\u51b5\u4e0b AVX \u6307\u4ee4\u5982\u679c\u4e0d\u5728\u672c\u673a\u7f16\u8bd1<strong>\u53ef\u80fd<\/strong>\u4f1a\u51fa\u9519\uff0c\u8ba9\u6211\u8bd5\u8bd5\u53bb\u8ba1\u7b97\u8282\u70b9\u4ece\u672c\u673a\u7f16\u8bd1\u3002<\/p>\n<p>\u8fd9\u4e2a\u4e1c\u897f\u611f\u89c9\u5df2\u7ecf\u662f\u7384\u5b66\u8303\u7574\u4e86\u3002\u5982\u679c\u4ece AVX2 \u7f16\u8bd1\u5230 AVX-512 \u90fd\u80fd\u51fa\u9519\uff0c\u90a3\u4ea4\u53c9\u7f16\u8bd1 ARM \u7684\u8fd8\u6d3b\u4e0d\u6d3b\u4e86\uff1f<\/p>\n<p>\u987a\u4fbf\u8bf4\u4e00\u53e5\uff0cAMD \u7684<code>-march=znver2<\/code>\u6bd4\u67d0\u4e9b\u666e\u901a\u4e14\u81ea\u4fe1\u7684\u73a9\u610f\u8981 YES \u591a\u4e86&#8230;<\/p>\n<\/p><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>7<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"5665985\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : matolv <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u201c\u53c8\u8bd5\u4e86 icc\uff0c\u52a0\u4e86&#8217;-axCORE-AVX512&#8217;\u80fd\u7f16\u8bd1\u901a\u8fc7\uff0c\u4e00\u8fd0\u884c\u79d2\u5d29\u6e83\u3002\u201d<br \/>Haswell \u6ca1\u6709 avx512\uff0c\u4f60\u600e\u4e48\u8fd0\u884c\u5f97\u8d77\u6765\uff1f\u9664\u975e\u4f60\u4ee3\u7801\u91cc\u9762 fall back \u5230 avx2 \u6216\u8005 sse<\/p>\n<p>\u8dd1\u5206\u8f6f\u4ef6 cinebench r23 \u629b\u5f03\u4e86 avx512\uff0c\u603b\u4f53\u800c\u8a00\u5f00\u542f avx512 \u4ee5\u540e\u5bfc\u81f4\u7684 cpu \u964d\u9891+\u9ad8\u80fd\u8017\u603b\u4f53\u6bd4 avx2 \u5e76\u4e0d\u5360\u4f18\uff0cskylake \u6784\u67b6\u843d\u540e\u4e0d\u80fd\u5149\u9760\u4e00\u4e2a simd \u6307\u4ee4\u96c6\u7ffb\u8eab<\/p>\n<p>\u53e6\u5916 amd \u5df2\u7ecf\u6709 Znver3 \u4e86\uff0c\u53ea\u662f\u7f16\u8bd1\u5668\u8fd8\u6ca1\u5b8c\u5168\u9002\u914d\u5b8c<br \/>\u53c2\u8003\uff1a https:\/\/www.phoronix.com\/scan.php?page=news_item&amp;px=Znver3-GCC-10-Backport                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5665986\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : xuegy <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @matolv \u201c\u8ba1\u7b97\u8282\u70b9\u662f Skylake (AVX-512)\u201d                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5665987\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : vk42 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @matolv lz \u5e94\u8be5\u662f\u8bf4\u5728\u670d\u52a1\u5668\u4e0a\u5d29\u6e83<\/p>\n<p>\u4e0d\u8fc7\u8bdd\u8bf4\u8fd9\u95ee\u9898\u95ee\u7684\uff0c\u7f16\u8bd1\u9519\u8bef\u4fe1\u606f\u6ca1\u6709\uff0c\u5d29\u6e83\u8f93\u51fa\u4e5f\u6ca1\u6709\u2026\u2026                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5665988\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : xuegy <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @vk42 gcc \u538b\u6839\u5c31\u6ca1\u62a5\u9519\u8bef\u4fe1\u606f\uff0c\u76f4\u63a5\u4e0d\u751f\u6210.o \u7136\u540e\u9000\u51fa\u4e86\u3002<\/p>\n<p>icc \u7f16\u8bd1\u51fa\u6765\u7684\u62a5\u4e2a SIGFPE\uff0c\u80af\u5b9a\u662f\u7f16\u8bd1\u5668\u7684\u9505\u4e86\u3002                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5665989\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : whee1 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @matolv #1 \u53ef\u80fd\u9700\u8981 libc \u7b49\u4f9d\u8cf4\u5eab\u90fd\u662f-march=skylake-avx512 \u624d\u884c\u3002 <br \/>\u9023 funtoo \u90fd\u6c92\u6709\u652f\u6301 avx512 \u7684 subarch\uff0c\u4e0d\u904e\u53ef\u4ee5\u4f7f\u7528 https:\/\/www.funtoo.org\/Intel64-skylake \u9019\u500b stage3 \u7de8\u8b6f\u4e00\u500b\u51fa\u4f86\u8a66\u8a66\u3002\u5be6\u5728\u4e0d\u884c\u5c31\u52a0-march=skylake-avx512 \u91cd\u65b0\u7de8\u8b6f\u4e00\u4e0b gcc glibc\uff0c\u7e3d\u6bd4\u81ea\u5df1 bootstrap \u4e00\u5957\u5de5\u5177\u93c8\u7c21\u55ae\u9ede\u3002<\/p>\n<p>\u63db\u500b\u7de8\u8b6f\u9078\u9805\u5c31\u5d29\u6f70\u7684\u554f\u984c\uff0c\u6211\u4e5f\u9047\u5230\u904e\u3002\u751a\u81f3\u6709\u4e9b\u7a0b\u5e8f\u5373\u4f7f\u662f-s -g0 \u751f\u6210\u7684\uff0c\u4f60\u628a\u4ed6 strip \u4e00\u4e0b\u5c31\u4e0d\u884c\u4e86\u3002                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5665990\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : coolmenu <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u7528 intel \u81ea\u5df1\u7684\u7f16\u8bd1\u5668\u6d4b\u8bd5\u4e00\u4e0b?                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5665991\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : henices <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             -march=native \u8bd5\u8bd5                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>\u4ece AVX2 \u673a\u5668\u7f16\u8bd1 AVX-5&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/429221"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=429221"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/429221\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=429221"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=429221"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=429221"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}