{"id":696,"date":"2024-06-13T23:59:33","date_gmt":"2024-06-13T14:59:33","guid":{"rendered":"https:\/\/blog.gurees.net\/?p=696"},"modified":"2024-06-15T20:57:19","modified_gmt":"2024-06-15T11:57:19","slug":"rocky-linux%e3%81%a8radeon-instinct-mi25%e3%81%a7rocm%e3%82%92%e4%bd%bf%e3%81%86%e2%91%a0%e7%92%b0%e5%a2%83%e6%ba%96%e5%82%99%e7%b7%a8","status":"publish","type":"post","link":"https:\/\/blog.gurees.net\/?p=696","title":{"rendered":"Rocky Linux\u3068Radeon Instinct MI25\u3067ROCm\u3092\u4f7f\u3046\u2460\u74b0\u5883\u6e96\u5099\u7de8"},"content":{"rendered":"\n<p>RX480\u3067\u306eROCm\u304c\u9762\u767d\u304b\u3063\u305f\u306e\u3067\u3001Radeon Instinct MI25\u5165\u624b\u3057\u3066\u307f\u305f\u306e\u3067\u3001\u74b0\u5883\u6e96\u5099\u3092\u884c\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u74b0\u5883\u306f\u4ee5\u4e0b\u306e\u81ea\u4f5cPC\u306bRocky Linux9.4\u3092Minimum\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3057\u305f\u3002<br>CPU\uff1aRyzen 7 2700X<br>MB\uff1aX470 GAMING PLUS<br>RAM\uff1a16GB\u00d72\u679a 2400 MHz<br>SSD\uff1aBIOSTAR S120-256<br>GPU#1:MI25<br>GPU#2:MI25<br>GPU#3:V3900<\/p>\n\n\n\n<!--more-->\n\n\n\n<p>\u3068\u308a\u3042\u3048\u305a\u306fWindows\u74b0\u5883\u3067MI25\u306bWX9100\u306eBIOS\u3092\u66f8\u304d\u8fbc\u307f\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u3082\u3068\u3082\u3068\u306f1\u679a\u76ee\u3001\uff12\u679a\u76ee\u306bMI25\u30013\u679a\u76ee\u306bV3900\u3092\u3064\u306a\u3044\u3067\u3001\u753b\u9762\u306fV3900\u306b\u3064\u306a\u3050\u7b97\u6bb5\u3067\u3057\u305f\u304c\u3001\u8d77\u52d5\u6642\u306b There is no GOP support detected in this card.\u3068\u8868\u793a\u3055\u308c\u3001CSM\u306b\u8a2d\u5b9a\u3092\u5909\u66f4\u3059\u308b\u65e8\u306e\u30e1\u30c3\u30bb\u30fc\u30b8\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p>MI25\u3092\u4f7f\u7528\u3059\u308b\u969b\u306fResizable Bar\u3068Above 4G Decoding\u306e\u6709\u52b9\u5316\u304c\u5fc5\u8981\u3067\u3001\u305d\u306e\u305f\u3081\u306b\u306fCSM\u306f\u7121\u52b9\u306b\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u305f\u3081\u3001MI25\u304c\u8a8d\u8b58\u3067\u304d\u306a\u304f\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u305d\u306e\u72b6\u614b\u3067\u306fATI FLUSH\u3067\u8a8d\u8b58\u3067\u304d\u306a\u304b\u3063\u305f\u306e\u3067\u3001\u8abf\u3079\u305f\u3068\u3053\u308dV3900\u306eBIOS\u304cUEFI\u672a\u5bfe\u5fdc\u306e\u3082\u306e\u3060\u3063\u305f\u3088\u3046\u3067\u3057\u305f\u3002\u3068\u308a\u3042\u3048\u305a\u9069\u5f53\u306aGT730\u3092\u3064\u306a\u3044\u3067MI25\u3092ATI FLUSH\u304b\u3089\u8a8d\u8b58\u3067\u304d\u305f\u306e\u3067\u3001WX9100\u306eBIOS\u3092\u66f8\u304d\u8fbc\u307f\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">C:\\atiflash_293>.\\amdvbflash.exe -i\n\nadapter bn dn fn dID       asic           flash      romsize test    bios p\/n\n======= == == == ==== =============== ============== ======= ==== ==============\n   0    2A 00 00 6860 Vega10          M25P80          100000 pass 113-D0513700-001\n\nC:\\atiflash_293>.\\amdvbflash.exe -p 0 AMD.WX9100.16384.171219.rom -fs\nOld SSID: 0C35\nNew SSID: 0B0F\nThe result of RSA signature verify is PASS.\nOld DeviceID: 6860\nNew DeviceID: 6861\nOld Product Name: Vega10 D05137 64Mx128 852e\/945m\nNew Product Name: Vega10 D05103 64Mx128 16GB 852e\/945m 1.00V\nOld BIOS Version: 016.001.001.000.009999\nNew BIOS Version: 016.001.001.000.009259\nFlash type: M25P80\n100000\/100000h bytes programmed\n100000\/100000h bytes verified\n\nRestart System To Complete VBIOS Update.<\/pre>\n\n\n\n<p>\u3064\u3044\u3067\u306bV3900\u306bUEFI\u5bfe\u5fdc\u7248\u306eBIOS\u3092\u66f8\u304d\u8fbc\u3093\u3060\u3089 \u300cThere is no GOP support detected in this card.\u300d\u306f\u51fa\u306a\u304f\u306a\u3063\u305f\u306e\u3067\u3001\u3053\u308c\u3067\u884c\u3051\u305d\u3046\u3067\u3059\u3002<\/p>\n\n\n\n<p>\u6b21\u306bOS\u3092Rocky Linux9.4\u306b\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>Radeon\u306e\u30c9\u30e9\u30a4\u30d0\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u30c4\u30fc\u30eb\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\"># dnf install https:\/\/repo.radeon.com\/amdgpu-install\/5.7.3\/rhel\/9.2\/amdgpu-install-5.7.50703-1.el9.noarch.rpm -y<\/pre>\n\n\n\n<p>EPEL\u30ea\u30dd\u30b8\u30c8\u30ea\u3068CodeReady Linux Builder\u30ea\u30dd\u30b8\u30c8\u30ea\u304c\u5fc5\u8981\u306a\u306e\u3067\u6709\u52b9\u306b\u3057\u3066\u304b\u3089\u3001amdgpu-install\u3092\u5b9f\u884c\u3057\u307e\u3059\u30025\u7cfb\u306e\u5bfe\u5fdc\u30d0\u30fc\u30b8\u30e7\u30f3\u304c9.2\u307e\u3067\u307f\u305f\u3044\u306a\u306e\u3067\u3001amdgpudistro\u3092\u30bb\u30c3\u30c8\u3057\u3066\u304a\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\"># echo \"9.2\" > \/etc\/yum\/vars\/amdgpudistro\n# dnf install epel-release -y\n# crb enable\n# amdgpu-install --usecase=rocm<\/pre>\n\n\n\n<p>\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u306b2.4G\u7a0b\u5ea6\u3001\u30c7\u30a3\u30b9\u30af\u308217G\u7a0b\u5ea6\u8981\u6c42\u3055\u308c\u305f\u306e\u3067\u3001\u3057\u3070\u3089\u304f\u5f85\u3061\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u5f8c\u306bsmi\u3067\u898b\u308b\u3068\u6e29\u5ea6\u306a\u3093\u304b\u3082\u53d6\u5f97\u3067\u304d\u305f\u3088\u3046\u3067\u3059\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\"># rocm-smi\n========================= ROCm System Management Interface =========================\n=================================== Concise Info ===================================\nGPU[0]          : get_power_avg, Not supported on the given system\nGPU[1]          : get_power_avg, Not supported on the given system\nGPU  Temp (DieEdge)  AvgPwr  SCLK    MCLK    Fan    Perf  PwrCap  VRAM%  GPU%\n0    59.0c           N\/A     852Mhz  167Mhz  9.41%  auto  170.0W    0%   0%\n1    36.0c           N\/A     852Mhz  167Mhz  9.41%  auto  170.0W    0%   0%\n====================================================================================\n=============================== End of ROCm SMI Log ================================<\/pre>\n\n\n\n<p>\u6b21\u306bLLM\u3092\u52d5\u304b\u3059\u305f\u3081\u306b\u3001llama.cpp\u3092\u30b3\u30f3\u30d1\u30a4\u30eb\u3057\u307e\u3059\u3002LLAMA_HIPBLAS=1\u3092\u6307\u5b9a\u3057\u3066ROCm\u3092\u6709\u52b9\u306b\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\"># sudo dnf install git make wget -y\n# cd \/work\n# git clone https:\/\/github.com\/ggerganov\/llama.cpp\n# cd \/work\/llama.cpp\n# export CC=\/opt\/rocm\/llvm\/bin\/clang\n# export CXX=\/opt\/rocm\/llvm\/bin\/clang++\n# make LLAMA_HIPBLAS=1 -j<\/pre>\n\n\n\n<p>\u5b9f\u884c\u3057\u3066\u307f\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\"># export HIP_VISIBLE_DEVICES=\"0,1\"\n# \/work\/llama.cpp\/llama-cli -ngl 50 -m \/work\/model\/ELYZA-japanese-Llama-2-13b-fast-instruct-q4_K_M.gguf -p '[INST] &lt;&lt;SYS>>\u3042\u306a\u305f\u306f\u8aa0\u5b9f\u3067\u512a\u79c0\u306a\u65e5\u672c\u4eba\u306e\u30a2\u30b7\u30b9\u30bf\u30f3\u30c8\u3067\u3059\u3002&lt;&lt;\/SYS>>Python\u3067mysql\u304b\u3089select\u3059\u308b\u30b5\u30f3\u30d7\u30eb\u3092\u5b9f\u88c5\u3057\u3066[\/INST]'\n~~~~~~~~~~~~\u7701\u7565~~~~~~~~~~~~\nggml_cuda_init: GGML_CUDA_FORCE_MMQ:   no\nggml_cuda_init: CUDA_USE_TENSOR_CORES: yes\nggml_cuda_init: found 2 ROCm devices:\n  Device 0: Radeon Pro WX 9100, compute capability 9.0, VMM: no\n  Device 1: Radeon Pro WX 9100, compute capability 9.0, VMM: no\nllm_load_tensors: ggml ctx size =    0.55 MiB\nllm_load_tensors: offloading 40 repeating layers to GPU\nllm_load_tensors: offloading non-repeating layers to GPU\nllm_load_tensors: offloaded 41\/41 layers to GPU\nllm_load_tensors:      ROCm0 buffer size =  3812.58 MiB\nllm_load_tensors:      ROCm1 buffer size =  3650.77 MiB\nllm_load_tensors:        CPU buffer size =   122.45 MiB\n~~~~~~~~~~~~\u7701\u7565~~~~~~~~~~~~\n [INST] &lt;&lt;SYS>>\u3042\u306a\u305f\u306f\u8aa0\u5b9f\u3067\u512a\u79c0\u306a\u65e5\u672c\u4eba\u306e\u30a2\u30b7\u30b9\u30bf\u30f3\u30c8\u3067\u3059\u3002&lt;&lt;\/SYS>>Python\u3067mysql\u304b\u3089select\u3059\u308b\u30b5\u30f3\u30d7\u30eb\u3092\u5b9f\u88c5\u3057\u3066[\/INST] mysql-connector-python\u3092\u4f7f\u3063\u3066select\u3057\u307e\u3059\u3002\n```\nimport mysql.connector\n\nconnector = mysql.connector.connect(\n    host=\"\u30db\u30b9\u30c8\u540d\",\n    user=\"\u30e6\u30fc\u30b6\u30fc\u540d\",\n    passwd=\"\u30d1\u30b9\u30ef\u30fc\u30c9\",\n    db=\"\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u540d\"\n)\ncursor = connector.cursor()\n\nquery = \"SELECT * FROM \u30c6\u30fc\u30d6\u30eb\u540d\"\nresult = cursor.execute(query)\n\nif result.fetchall():\n    data = result.fetchall()\n    print(data)\n    for row in data:\n        print(row)\nconnector.close()\n``` [end of text]\n\nllama_print_timings:        load time =   23799.79 ms\nllama_print_timings:      sample time =       4.29 ms \/   137 runs   (    0.03 ms per token, 31934.73 tokens per second)\nllama_print_timings: prompt eval time =    1223.14 ms \/    37 tokens (   33.06 ms per token,    30.25 tokens per second)\nllama_print_timings:        eval time =    5814.39 ms \/   136 runs   (   42.75 ms per token,    23.39 tokens per second)\nllama_print_timings:       total time =    7059.94 ms \/   173 tokens\nLog end<\/pre>\n\n\n\n<p>\u4eca\u56de\u306fprompt eval time\u304c30.25 tokens per second\u3067\u3057\u305f\u3002\u524d\u56deRX480\u3067\u306f1.17 tokens per\u3060\u3063\u305f\u306e\u3067\u300130\u500d\u901f\u304f\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p>1GPU\u306b\u7d5e\u3063\u3066\u307f\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\"># export HIP_VISIBLE_DEVICES=\"0,1\"\n# \/work\/llama.cpp\/llama-cli -ngl 50 -m \/work\/model\/ELYZA-japanese-Llama-2-13b-fast-instruct-q4_K_M.gguf -p '[INST] &lt;&lt;SYS>>\u3042\u306a\u305f\u306f\u8aa0\u5b9f\u3067\u512a\u79c0\u306a\u65e5\u672c\u4eba\u306e\u30a2\u30b7\u30b9\u30bf\u30f3\u30c8\u3067\u3059\u3002&lt;&lt;\/SYS>>Python\u3067mysql\u304b\u3089select\u3059\u308b\u30b5\u30f3\u30d7\u30eb\u3092\u5b9f\u88c5\u3057\u3066[\/INST]'\n~~~~~~~~~~~~\u7701\u7565~~~~~~~~~~~~\nllama_print_timings:        load time =    3153.63 ms\nllama_print_timings:      sample time =       8.35 ms \/   260 runs   (    0.03 ms per token, 31148.92 tokens per second)\nllama_print_timings: prompt eval time =    1219.20 ms \/    37 tokens (   32.95 ms per token,    30.35 tokens per second)\nllama_print_timings:        eval time =   12990.60 ms \/   259 runs   (   50.16 ms per token,    19.94 tokens per second)\nllama_print_timings:       total time =   14252.08 ms \/   296 tokens\nLog end<\/pre>\n\n\n\n<p>1GPU\u304c\u7d50\u69cb\u901f\u3044\u3067\u3059\u3002\u3068\u3044\u3046\u304b2GPU\u304c\u9045\u3044\u3067\u3059\u2026\u2026\u3002<\/p>\n\n\n\n<p>\u6bd4\u8f03\u3057\u3066\u307f\u308b\u3068\u4ee5\u4e0b\u306e\u901f\u5ea6\u3067\u3057\u305f\u3002eval time\u306f\u3061\u3087\u3063\u3068\u65e9\u304f\u306a\u3063\u3066\u3044\u308b\u306e\u3067\u52b9\u679c\u306f\u3042\u308b\u307f\u305f\u3044\u3067\u3059\u304c\u3001prompt eval time\u306f\u307b\u307c\u5909\u5316\u306a\u3044\u72b6\u614b\u3067\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>GPU<\/td><td>prompt eval time<\/td><td>eval time<\/td><\/tr><tr><td>RX480<\/td><td>1.17 tokens per second<\/td><td>12.23 tokens per second<\/td><\/tr><tr><td>MI25<\/td><td>30.35 tokens per second<\/td><td>19.94 tokens per second<\/td><\/tr><tr><td>MI25\u00d72<\/td><td>30.25 tokens per second<\/td><td>23.39 tokens per second<\/td><\/tr><\/tbody><\/table><figcaption class=\"wp-element-caption\">ELYZA-japanese-Llama-2-13b-fast-instruct-q4_K_M\u3067\u306e\u6bd4\u8f03<\/figcaption><\/figure>\n\n\n\n<p>\u30de\u30eb\u30c1GPU\u306e\u72b6\u614b\u3067\u306eGPU\u4f7f\u7528\u7387\u3092rocm-smi\u3067\u898b\u3066\u3044\u308b\u30681GPU\u306e\u6642\u306f\u5e38\u306b100%\u3067\u56de\u3063\u3066\u3044\u308b\u3068\u3053\u308d\u304c\u3001100%\u3067\u306f\u306a\u3044\u306e\u3067\u8a08\u7b97\u4ee5\u5916\u306e\u3068\u3053\u308d\u304c\u30dc\u30c8\u30eb\u30cd\u30c3\u30af\u306b\u306a\u3063\u3066\u3044\u308b\u3068\u8003\u3048\u3089\u308c\u307e\u3059\u3002<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Ryzen Radeon LLM Rocky Linux ChatGPT ROCm RHEL<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[19,25],"tags":[],"class_list":["post-696","post","type-post","status-publish","format-standard","hentry","category-linux","category-programming"],"_links":{"self":[{"href":"https:\/\/blog.gurees.net\/index.php?rest_route=\/wp\/v2\/posts\/696","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.gurees.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.gurees.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.gurees.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.gurees.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=696"}],"version-history":[{"count":3,"href":"https:\/\/blog.gurees.net\/index.php?rest_route=\/wp\/v2\/posts\/696\/revisions"}],"predecessor-version":[{"id":707,"href":"https:\/\/blog.gurees.net\/index.php?rest_route=\/wp\/v2\/posts\/696\/revisions\/707"}],"wp:attachment":[{"href":"https:\/\/blog.gurees.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=696"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.gurees.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=696"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.gurees.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=696"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}