{"id":406,"date":"2024-01-11T03:54:02","date_gmt":"2024-01-11T03:54:02","guid":{"rendered":"https:\/\/mvermeulen.org\/perf\/?page_id=406"},"modified":"2024-01-11T12:24:18","modified_gmt":"2024-01-11T12:24:18","slug":"onednn","status":"publish","type":"page","link":"https:\/\/mvermeulen.org\/perf\/workloads\/phoronix\/onednn\/","title":{"rendered":"onednn"},"content":{"rendered":"\n<p>onednn is a neural network library, in this test convolution. Except for Stream, this is the most memory-bound application I observe. There are a few data points of front-end misses but overall frontend is low.<\/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\/01\/amdtopdown-36.png\" alt=\"\" class=\"wp-image-411\" srcset=\"https:\/\/mvermeulen.org\/perf\/wp-content\/uploads\/sites\/7\/2024\/01\/amdtopdown-36.png 1280w, https:\/\/mvermeulen.org\/perf\/wp-content\/uploads\/sites\/7\/2024\/01\/amdtopdown-36-1024x768.png 1024w, https:\/\/mvermeulen.org\/perf\/wp-content\/uploads\/sites\/7\/2024\/01\/amdtopdown-36-768x576.png 768w\" sizes=\"auto, (max-width: 1280px) 100vw, 1280px\" \/><\/figure>\n\n\n\n<p>AMD metrics show only 50% on cpu. Not much floating point (despite this being listed as f32 and u8\/i8 test. Very low IPC and high L2 misses.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>elapsed              71.340\non_cpu               0.508          # 8.13 \/ 16 cores\nutime                577.606\nstime                2.283\nnvcsw                2933           # 21.82%\nnivcsw               10507          # 78.18%\ninblock              7824           # 109.67\/sec\nonblock              1808           # 25.34\/sec\ncpu-clock            580267448241   # 580.267 seconds\ntask-clock           580293281735   # 580.293 seconds\npage faults          917435         # 1580.985\/sec\ncontext switches     13603          # 23.442\/sec\ncpu migrations       355            # 0.612\/sec\nmajor page faults    101            # 0.174\/sec\nminor page faults    917334         # 1580.811\/sec\nalignment faults     0              # 0.000\/sec\nemulation faults     0              # 0.000\/sec\nbranches             14973262484    # 27.616 branches per 1000 inst\nbranch misses        247963050      # 1.66% branch miss\nconditional          12771157805    # 23.555 conditional branches per 1000 inst\nindirect             148342180      # 0.274 indirect branches per 1000 inst\ncpu-cycles           2780469655011  # 2.44 GHz\ninstructions         543789492995   # 0.20 IPC\nslots                5553310978572  #\nretiring             189704440465   #  3.4% ( 3.6%)\n-- ucode             965399781      #     0.0%\n-- fastpath          188739040684   #     3.4%\nfrontend             200601330078   #  3.6% ( 3.8%)\n-- latency           172522010298   #     3.1%\n-- bandwidth         28079319780    #     0.5%\nbackend              4904067730753  # 88.3% (92.6%)\n-- cpu               843972890978   #    15.2%\n-- memory            4060094839775  #    73.1%\nspeculation          1460554868     #  0.0% ( 0.0%)\n-- branch mispredict 1317644471     #     0.0%\n-- pipeline restart  142910397      #     0.0%\nsmt-contention       257472348837   #  4.6% ( 0.0%)\ncpu-cycles           2780748578640  # 2.29 GHz\ninstructions         542814219642   # 0.20 IPC\ninstructions         181076126057   # 50.266 l2 access per 1000 inst\nl2 hit from l1       6471351931     # 44.79% l2 miss\nl2 miss from l1      2012992425     #\nl2 hit from l2 pf    566893824      #\nl3 hit from l2 pf    538088144      #\nl3 miss from l2 pf   1525658477     #\ninstructions         181285666295   # 4.541 float per 1000 inst\nfloat 512            62             # 0.000 AVX-512 per 1000 inst\nfloat 256            314            # 0.000 AVX-256 per 1000 inst\nfloat 128            823292867      # 4.541 AVX-128 per 1000 inst\nfloat MMX            0              # 0.000 MMX per 1000 inst\nfloat scalar         0              # 0.000 scalar per 1000 inst\n<\/code><\/pre>\n\n\n\n<p>Intel metrics also confirm this is a short-running workload.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>elapsed              70.776\non_cpu               0.515          # 8.24 \/ 16 cores\nutime                581.506\nstime                1.509\nnvcsw                2728           # 29.18%\nnivcsw               6621           # 70.82%\ninblock              35816          # 506.05\/sec\nonblock              1888           # 26.68\/sec\ncpu-clock            583151242836   # 583.151 seconds\ntask-clock           583163697663   # 583.164 seconds\npage faults          913034         # 1565.656\/sec\ncontext switches     9520           # 16.325\/sec\ncpu migrations       476            # 0.816\/sec\nmajor page faults    197            # 0.338\/sec\nminor page faults    912837         # 1565.319\/sec\nalignment faults     0              # 0.000\/sec\nemulation faults     0              # 0.000\/sec\nbranches             24742585163    # 27.518 branches per 1000 inst\nbranch misses        55106113       # 0.22% branch miss\nconditional          24742600267    # 27.518 conditional branches per 1000 inst\nindirect             8415132396     # 9.359 indirect branches per 1000 inst\nslots                3324114012128  #\nretiring             466162249004   # 14.0% (14.0%)\n-- ucode             10119389453    #     0.3%\n-- fastpath          456042859551   #    13.7%\nfrontend             180764613017   #  5.4% ( 5.4%)\n-- latency           156300290055   #     4.7%\n-- bandwidth         24464322962    #     0.7%\nbackend              2669530026167  # 80.3% (80.3%)\n-- cpu               436293792636   #    13.1%\n-- memory            2233236233531  #    67.2%\nspeculation          5291484831     #  0.2% ( 0.2%)\n-- branch mispredict 3942250602     #     0.1%\n-- pipeline restart  1349234229     #     0.0%\nsmt-contention       0              #  0.0% ( 0.0%)\ncpu-cycles           1100899965042  # 0.97 GHz\ninstructions         454783623331   # 0.41 IPC\nl2 access            10699740373    # 23.529 l2 access per 1000 inst\nl2 miss              6241519885     # 58.33% l2 miss\n<\/code><\/pre>\n\n\n\n<p>Process shows time spent in benchdnn<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>454 processes\n\t 96 benchdnn              9231.20    22.88\n\t 64 clinfo                  10.88     3.96\n\t 38 vulkaninfo               0.76     1.14\n\t  6 glxinfo:gdrv0            0.11     0.09\n\t  4 vulkani:disk$0           0.08     0.12\n\t  6 php                      0.06     0.09\n\t  6 clang                    0.05     0.03\n\t  2 glxinfo                  0.05     0.03\n\t  2 glxinfo:cs0              0.05     0.03\n\t  2 glxinfo:disk$0           0.05     0.03\n\t  2 glxinfo:sh0              0.05     0.03\n\t  2 glxinfo:shlo0            0.05     0.03\n\t  2 llvmpipe-0               0.04     0.06\n\t  2 llvmpipe-1               0.04     0.06\n\t  2 llvmpipe-10              0.04     0.06\n\t  2 llvmpipe-11              0.04     0.06\n\t  2 llvmpipe-12              0.04     0.06\n\t  2 llvmpipe-13              0.04     0.06\n\t  2 llvmpipe-14              0.04     0.06\n\t  2 llvmpipe-15              0.04     0.06\n\t  2 llvmpipe-2               0.04     0.06\n\t  2 llvmpipe-3               0.04     0.06\n\t  2 llvmpipe-4               0.04     0.06\n\t  2 llvmpipe-5               0.04     0.06\n\t  2 llvmpipe-6               0.04     0.06\n\t  2 llvmpipe-7               0.04     0.06\n\t  2 llvmpipe-8               0.04     0.06\n\t  2 llvmpipe-9               0.04     0.06\n\t  1 lspci                    0.01     0.03\n\t 90 sh                       0.00     0.00\n\t 13 gcc                      0.00     0.00\n\t 10 gsettings                0.00     0.00\n\t  9 stty                     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  6 onednn                   0.00     0.00\n\t  5 phoronix-test-s          0.00     0.00\n\t  4 gmain                    0.00     0.00\n\t  2 cc                       0.00     0.00\n\t  2 dconf worker             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 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 ps                       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 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\n1 processes running\n48 maximum processes\n<\/code><\/pre>\n\n\n\n<p>Computation core starts benchmark threads on all cpus.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>      454702) onednn           cpu=0 start=15.52 finish=21.76\n        454703) benchdnn         cpu=8 start=15.53 finish=21.75\n          454704) benchdnn         cpu=0 start=15.56 finish=21.75\n          454705) benchdnn         cpu=9 start=15.56 finish=21.75\n          454706) benchdnn         cpu=1 start=15.56 finish=21.75\n          454707) benchdnn         cpu=10 start=15.56 finish=21.75\n          454708) benchdnn         cpu=2 start=15.56 finish=21.75\n          454709) benchdnn         cpu=11 start=15.56 finish=21.75\n          454710) benchdnn         cpu=3 start=15.56 finish=21.75\n          454711) benchdnn         cpu=12 start=15.56 finish=21.75\n          454712) benchdnn         cpu=4 start=15.56 finish=21.75\n          454713) benchdnn         cpu=13 start=15.56 finish=21.75\n          454714) benchdnn         cpu=5 start=15.56 finish=21.75\n          454715) benchdnn         cpu=14 start=15.56 finish=21.75\n          454716) benchdnn         cpu=6 start=15.56 finish=21.75\n          454717) benchdnn         cpu=15 start=15.56 finish=21.75\n          454718) benchdnn         cpu=7 start=15.56 finish=21.75<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>onednn is a neural network library, in this test convolution. Except for Stream, this is the most memory-bound application I observe. There are a few data points of front-end misses but overall frontend is low. AMD metrics show only 50% <span class=\"excerpt-dots\">&hellip;<\/span> <a class=\"more-link\" href=\"https:\/\/mvermeulen.org\/perf\/workloads\/phoronix\/onednn\/\"><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-406","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/mvermeulen.org\/perf\/wp-json\/wp\/v2\/pages\/406","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=406"}],"version-history":[{"count":2,"href":"https:\/\/mvermeulen.org\/perf\/wp-json\/wp\/v2\/pages\/406\/revisions"}],"predecessor-version":[{"id":412,"href":"https:\/\/mvermeulen.org\/perf\/wp-json\/wp\/v2\/pages\/406\/revisions\/412"}],"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=406"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}