{"id":1659,"date":"2024-02-10T08:09:44","date_gmt":"2024-02-10T08:09:44","guid":{"rendered":"https:\/\/mvermeulen.org\/perf\/?page_id=1659"},"modified":"2024-02-10T21:46:34","modified_gmt":"2024-02-10T21:46:34","slug":"mt-dgemm","status":"publish","type":"page","link":"https:\/\/mvermeulen.org\/perf\/workloads\/phoronix\/mt-dgemm\/","title":{"rendered":"mt-dgemm"},"content":{"rendered":"\n<p>A multi-threaded DGEMM benchmark. This reports one score with a GLOP\/s rate. As the name implies this runs on all the core. There are many separate runs underneath but not sure what size GEMMs are being tested though the process is invoked with &#8220;.\/mtdgemm 3072 4&#8221;<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1280\" height=\"960\" src=\"https:\/\/mvermeulen.org\/perf\/wp-content\/uploads\/sites\/7\/2024\/02\/systemtime-51.png\" alt=\"\" class=\"wp-image-1683\" srcset=\"https:\/\/mvermeulen.org\/perf\/wp-content\/uploads\/sites\/7\/2024\/02\/systemtime-51.png 1280w, https:\/\/mvermeulen.org\/perf\/wp-content\/uploads\/sites\/7\/2024\/02\/systemtime-51-1024x768.png 1024w, https:\/\/mvermeulen.org\/perf\/wp-content\/uploads\/sites\/7\/2024\/02\/systemtime-51-768x576.png 768w\" sizes=\"auto, (max-width: 1280px) 100vw, 1280px\" \/><\/figure>\n\n\n\n<p>Topdown profile shows almost entirely memory bound program.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1280\" height=\"960\" src=\"https:\/\/mvermeulen.org\/perf\/wp-content\/uploads\/sites\/7\/2024\/02\/amdtopdown-53.png\" alt=\"\" class=\"wp-image-1685\" srcset=\"https:\/\/mvermeulen.org\/perf\/wp-content\/uploads\/sites\/7\/2024\/02\/amdtopdown-53.png 1280w, https:\/\/mvermeulen.org\/perf\/wp-content\/uploads\/sites\/7\/2024\/02\/amdtopdown-53-1024x768.png 1024w, https:\/\/mvermeulen.org\/perf\/wp-content\/uploads\/sites\/7\/2024\/02\/amdtopdown-53-768x576.png 768w\" sizes=\"auto, (max-width: 1280px) 100vw, 1280px\" \/><\/figure>\n\n\n\n<p>AMD metrics confirm floating point, very low retirement rate and high backend memory stalls.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>elapsed              236.762\non_cpu               0.814          # 13.02 \/ 16 cores\nutime                3082.168\nstime                1.545\nnvcsw                2176           # 6.99%\nnivcsw               28943          # 93.01%\ninblock              0              # 0.00\/sec\nonblock              12568          # 53.08\/sec\ncpu-clock            3084227120940  # 3084.227 seconds\ntask-clock           3084245086573  # 3084.245 seconds\npage faults          313289         # 101.577\/sec\ncontext switches     32134          # 10.419\/sec\ncpu migrations       344            # 0.112\/sec\nmajor page faults    2              # 0.001\/sec\nminor page faults    313287         # 101.577\/sec\nalignment faults     0              # 0.000\/sec\nemulation faults     0              # 0.000\/sec\nbranches             351139025627   # 143.215 branches per 1000 inst\nbranch misses        320886189      # 0.09% branch miss\nconditional          349858597521   # 142.692 conditional branches per 1000 inst\nindirect             53554288       # 0.022 indirect branches per 1000 inst\ncpu-cycles           13433029028472 # 3.62 GHz\ninstructions         2454061328682  # 0.18 IPC low\nslots                26852113381386 #\nretiring             702637987249   #  2.6% ( 2.8%) low\n-- ucode             48563383       #     0.0%\n-- fastpath          702589423866   #     2.6%\nfrontend             164843205984   #  0.6% ( 0.6%) low\n-- latency           130868974098   #     0.5%\n-- bandwidth         33974231886    #     0.1%\nbackend              24525712173385 # 91.3% (96.2%) high\n-- cpu               1884899227506  #     7.0%\n-- memory            22640812945879 #    84.3%\nspeculation          91876384132    #  0.3% ( 0.4%) low\n-- branch mispredict 12856371210    #     0.0%\n-- pipeline restart  79020012922    #     0.3%\nsmt-contention       1367029251075  #  5.1% ( 0.0%)\ncpu-cycles           13306883314532 # 3.60 GHz\ninstructions         2453753385490  # 0.18 IPC low\ninstructions         817406031890   # 448.524 l2 access per 1000 inst\nl2 hit from l1       231006146862   # 36.78% l2 miss\nl2 miss from l1      79974047304    #\nl2 hit from l2 pf    80741481294    #\nl3 hit from l2 pf    43129765140    #\nl3 miss from l2 pf   11748482860    #\ninstructions         816967728215   # 141.991 float per 1000 inst\nfloat 512            68             # 0.000 AVX-512 per 1000 inst\nfloat 256            660            # 0.000 AVX-256 per 1000 inst\nfloat 128            116002191550   # 141.991 AVX-128 per 1000 inst\nfloat MMX            0              # 0.000 MMX per 1000 inst\nfloat scalar         0              # 0.000 scalar per 1000 inst\ninstructions         2667710        #\nopcache              992627         # 372.090 opcache per 1000 inst\nopcache miss         530181         # 53.4% opcache miss rate\nl1 dTLB miss         5737           # 2.151 L1 dTLB per 1000 inst\nl2 dTLB miss         1200           # 0.450 L2 dTLB per 1000 inst\ninstructions         2679046        #\nicache               1285981        # 480.015 icache per 1000 inst\nicache miss          108585         #  8.4% icache miss rate\nl1 iTLB miss         17             # 0.006 L1 iTLB per 1000 inst\nl2 iTLB miss         0              # 0.000 L2 iTLB per 1000 inst\ntlb flush            20             # 0.007 TLB flush per 1000 inst\n<\/code><\/pre>\n\n\n\n<p>Intel metrics show the memory stalls as being mostly dram with L3 also contributing.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>elapsed              492.592\non_cpu               0.833          # 13.33 \/ 16 cores\nutime                6565.321\nstime                1.594\nnvcsw                2251           # 4.08%\nnivcsw               52966          # 95.92%\ninblock              952            # 1.93\/sec\nonblock              1376           # 2.79\/sec\ncpu-clock            6567284228049  # 6567.284 seconds\ntask-clock           6567309903417  # 6567.310 seconds\npage faults          414015         # 63.042\/sec\ncontext switches     57503          # 8.756\/sec\ncpu migrations       454            # 0.069\/sec\nmajor page faults    6              # 0.001\/sec\nminor page faults    414009         # 63.041\/sec\nalignment faults     0              # 0.000\/sec\nemulation faults     0              # 0.000\/sec\nbranches             583567246701   # 166.739 branches per 1000 inst\nbranch misses        213359226      # 0.04% branch miss\nconditional          583567261165   # 166.739 conditional branches per 1000 inst\nindirect             290449592779   # 82.988 indirect branches per 1000 inst\nslots                17661678302474 #\nretiring             932467763006   #  5.3% ( 5.3%) low\n-- ucode             22575755190    #     0.1%\n-- fastpath          909892007816   #     5.2%\nfrontend             814357561668   #  4.6% ( 4.6%) low\n-- latency           751489672407   #     4.3%\n-- bandwidth         62867889261    #     0.4%\nbackend              15954992298439 # 90.3% (90.3%) high\n-- cpu               1423967208298  #     8.1%\n-- memory            14531025090141 #    82.3%\nspeculation          22870782998    #  0.1% ( 0.1%) low\n-- branch mispredict 9848240863     #     0.1%\n-- pipeline restart  13022542135    #     0.1%\nsmt-contention       0              #  0.0% ( 0.0%)\ncpu-cycles           30406891078350 # 1.27 GHz\ninstructions         5395127285156  # 0.18 IPC low\nl2 access            1894511816359  # 361.071 l2 access per 1000 inst\nl2 miss              1005343361487  # 53.07% l2 miss\ncpu-cycles           5951947247518  # 91.0% memory latency\nload stalls          5414382577033  #  2.8% l1 bound\nl1 miss              5248001289215  # 10.8% l2 bound\nl2 miss              4606656595480  # 35.0% l3 bound\nl3 miss              2523570196776  # 42.4% dram bound\nstore_stalls         449624468      #  0.0% store bound\n<\/code><\/pre>\n\n\n\n<p>Process overview shows not too many mtdgemm calls<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>416 processes\n\t 64 mtdgemm              66452.80    15.04\n\t 68 clinfo                  16.86     5.99\n\t 38 vulkaninfo               1.14     1.15\n\t  4 vulkani:disk$0           0.12     0.13\n\t  6 php                      0.09     0.10\n\t  6 glxinfo:gdrv0            0.08     0.10\n\t  6 glxinfo:gl0              0.08     0.10\n\t  6 clang                    0.07     0.05\n\t  2 llvmpipe-0               0.06     0.07\n\t  2 llvmpipe-1               0.06     0.07\n\t  2 llvmpipe-10              0.06     0.07\n\t  2 llvmpipe-11              0.06     0.07\n\t  2 llvmpipe-12              0.06     0.07\n\t  2 llvmpipe-13              0.06     0.07\n\t  2 llvmpipe-14              0.06     0.07\n\t  2 llvmpipe-15              0.06     0.07\n\t  2 llvmpipe-2               0.06     0.07\n\t  2 llvmpipe-3               0.06     0.07\n\t  2 llvmpipe-4               0.06     0.07\n\t  2 llvmpipe-5               0.06     0.07\n\t  2 llvmpipe-6               0.06     0.07\n\t  2 llvmpipe-7               0.06     0.07\n\t  2 llvmpipe-8               0.06     0.07\n\t  2 llvmpipe-9               0.06     0.06\n\t  2 glxinfo                  0.04     0.04\n\t  2 glxinfo:cs0              0.04     0.04\n\t  2 glxinfo:disk$0           0.04     0.04\n\t  2 glxinfo:sh0              0.04     0.04\n\t  2 glxinfo:shlo0            0.04     0.04\n\t  1 lspci                    0.01     0.01\n\t  3 rocminfo                 0.00     0.01\n\t  1 ps                       0.00     0.01\n\t 82 sh                       0.00     0.00\n\t 13 gcc                      0.00     0.00\n\t 12 gsettings                0.00     0.00\n\t  8 stat                     0.00     0.00\n\t  8 systemd-detect-          0.00     0.00\n\t  6 llvm-link                0.00     0.00\n\t  5 phoronix-test-s          0.00     0.00\n\t  4 mt-dgemm                 0.00     0.00\n\t  3 gmain                    0.00     0.00\n\t  2 cc                       0.00     0.00\n\t  2 lscpu                    0.00     0.00\n\t  2 uname                    0.00     0.00\n\t  2 which                    0.00     0.00\n\t  2 xset                     0.00     0.00\n\t  1 date                     0.00     0.00\n\t  1 dconf worker             0.00     0.00\n\t  1 dirname                  0.00     0.00\n\t  1 dmesg                    0.00     0.00\n\t  1 dmidecode                0.00     0.00\n\t  1 grep                     0.00     0.00\n\t  1 ifconfig                 0.00     0.00\n\t  1 ip                       0.00     0.00\n\t  1 lsmod                    0.00     0.00\n\t  1 mktemp                   0.00     0.00\n\t  1 qdbus                    0.00     0.00\n\t  1 readlink                 0.00     0.00\n\t  1 realpath                 0.00     0.00\n\t  1 sed                      0.00     0.00\n\t  1 sort                     0.00     0.00\n\t  1 stty                     0.00     0.00\n\t  1 systemctl                0.00     0.00\n\t  1 template.sh              0.00     0.00\n\t  1 wc                       0.00     0.00\n\t  1 xrandr                   0.00     0.00\n0 processes running\n47 maximum processes\n<\/code><\/pre>\n\n\n\n<p>Computation blocks<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>      408399) mt-dgemm         cpu=3 start=5.61  finish=77.72\n        408400) mtdgemm          cpu=0 start=5.61  finish=77.72\n          408401) mtdgemm          cpu=8 start=5.61  finish=77.72\n          408402) mtdgemm          cpu=9 start=5.61  finish=77.72\n          408403) mtdgemm          cpu=1 start=5.61  finish=77.72\n          408404) mtdgemm          cpu=2 start=5.61  finish=77.72\n          408405) mtdgemm          cpu=10 start=5.61  finish=77.72\n          408406) mtdgemm          cpu=11 start=5.61  finish=77.72\n          408407) mtdgemm          cpu=3 start=5.61  finish=77.72\n          408408) mtdgemm          cpu=4 start=5.61  finish=77.72\n          408409) mtdgemm          cpu=12 start=5.61  finish=77.72\n          408410) mtdgemm          cpu=13 start=5.61  finish=77.72\n          408411) mtdgemm          cpu=5 start=5.61  finish=77.72\n          408412) mtdgemm          cpu=6 start=5.61  finish=77.72\n          408413) mtdgemm          cpu=14 start=5.61  finish=77.72\n          408414) mtdgemm          cpu=7 start=5.61  finish=77.72\n          408415) mtdgemm          cpu=15 start=5.61  finish=77.72\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>A multi-threaded DGEMM benchmark. This reports one score with a GLOP\/s rate. As the name implies this runs on all the core. There are many separate runs underneath but not sure what size GEMMs are being tested though the process <span class=\"excerpt-dots\">&hellip;<\/span> <a class=\"more-link\" href=\"https:\/\/mvermeulen.org\/perf\/workloads\/phoronix\/mt-dgemm\/\"><span class=\"more-msg\">Continue reading &rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":58,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-1659","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/mvermeulen.org\/perf\/wp-json\/wp\/v2\/pages\/1659","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mvermeulen.org\/perf\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/mvermeulen.org\/perf\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/mvermeulen.org\/perf\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mvermeulen.org\/perf\/wp-json\/wp\/v2\/comments?post=1659"}],"version-history":[{"count":2,"href":"https:\/\/mvermeulen.org\/perf\/wp-json\/wp\/v2\/pages\/1659\/revisions"}],"predecessor-version":[{"id":1686,"href":"https:\/\/mvermeulen.org\/perf\/wp-json\/wp\/v2\/pages\/1659\/revisions\/1686"}],"up":[{"embeddable":true,"href":"https:\/\/mvermeulen.org\/perf\/wp-json\/wp\/v2\/pages\/58"}],"wp:attachment":[{"href":"https:\/\/mvermeulen.org\/perf\/wp-json\/wp\/v2\/media?parent=1659"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}