From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 99695158093 for ; Mon, 4 Jul 2022 14:28:20 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B6E98E0AD5; Mon, 4 Jul 2022 14:28:19 +0000 (UTC) Received: from mail-pj1-x1029.google.com (mail-pj1-x1029.google.com [IPv6:2607:f8b0:4864:20::1029]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 6F40AE0AD4 for ; Mon, 4 Jul 2022 14:28:17 +0000 (UTC) Received: by mail-pj1-x1029.google.com with SMTP id o15so5038029pjh.1 for ; Mon, 04 Jul 2022 07:28:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:subject:message-id:mime-version:content-disposition; bh=bWDgHl4EDNEonGe8VlChmHxgGjunDGTD/aOHqI3iRw4=; b=ADgeAujLykyMIk41zaj919XFLQTsAWjssKcfC/RoOYhkm7HtVHVb4kzjnOFlvX4iuM h4bo6a5LTfmP0pDIjIe1NFMCIL11Ej9bDp+nLEK2pQLzMVVzYRwrfiIwFL++juTkj9cy LpTxv0RHCX8urQxVHs4LaoXj1Uf2+DPyn/7TBAdD7X0GhfbWOhgWX7pZwZ3thRghZ8o3 sXhkM0DfFPo36dBi6276pSlu9rp/dDYFuhlmCHBaYj8Fqk7nkmWDnMVeB4yfoqSFSFvI bc9USJuSzddF6Xv+vQpAAKMIGOnoiK2wO/XC17TQOrTzY2rF2zNktLQYKu46KpU5yuSf QYWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:subject:message-id:mime-version :content-disposition; bh=bWDgHl4EDNEonGe8VlChmHxgGjunDGTD/aOHqI3iRw4=; b=jm8uTrWWNWua4/SfsZ0bXj9jA4osIP1Alpv44s/CKOauGsUM2HMuMDcKEL9Sh0RYYr /EM/SP9Qs/IJkhn9INa6jg0GhjhHAVrapgzY4V3H82/c+pYdnRdQjXvBI5aCtnPW3v/h JWNnXI0iEwEmVuHAG4A1EPa2SJ1WpZhKgMcJz3hfbGavZOlqVmrK274neWVT6ra6crwG s5xHlSjl4oCcWYA7NYIPe/ykoIj0mIOWL7BwO0D6zk+6rBdDhU5ajzZmhtUIV3Bxr/9x eLV/yFRo2j76QELBo5Ohnwhq4KuHLPyemMO8g9nQGqtBU//kkSIqKCMs14a60PtvnYls StOQ== X-Gm-Message-State: AJIora9qpyjBRRd6wrbkYIz3YcW3dpEpv1GFZ0CBtV3omcdQUlFb69Nk yEEHoZU2ivKw4W+rDe7QV4QCrp143jycdg== X-Google-Smtp-Source: AGRyM1siHTy27nWHMihh13oz6PuT5RpMSHbAwHnwsgMV00BH49BC2bGsQrGzvBgGwUsUZWz/pI1sEw== X-Received: by 2002:a17:90b:4c4d:b0:1ec:bb28:9819 with SMTP id np13-20020a17090b4c4d00b001ecbb289819mr35007845pjb.140.1656944896356; Mon, 04 Jul 2022 07:28:16 -0700 (PDT) Received: from localhost (49.212.183.201.v6.sakura.ne.jp. [2403:3a00:202:1120:49:212:183:201]) by smtp.gmail.com with ESMTPSA id b11-20020a170902d50b00b0016bd58b5eddsm4897067plg.242.2022.07.04.07.28.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Jul 2022 07:28:15 -0700 (PDT) Date: Mon, 4 Jul 2022 22:28:33 +0800 From: wuyy To: gentoo-soc Subject: [gentoo-soc] Week 3 Report for Refining ROCm Packages in Gentoo Message-ID: Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-soc@lists.gentoo.org Reply-to: gentoo-soc@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline X-Archives-Salt: 8748daf0-2d35-4abd-8667-f797aa4d0a05 X-Archives-Hash: f468deeefa6f5a52cfa6bbd2b3fb4920 Hello all, This week I'm quite busy on other work (school related, I'm at the end of the semester and the official summer vacation starts next week), so there is not much progress on finishing the plan mentioned in week 2's report. Another reason is I'm focusing on investigating and leaning things such as ebuild writing. AMD released ROCm-5.2 earlier this week, so I give it a try at https://github.com/littlewu2508/gentoo/tree/rocm-5.2 using llvm-14 backend (same as 5.1.3). I observed two bugs: 1. dev-libs/rocm-comgr-5.2.0 calls clang to compile for gfx1036 and use `-mcode-object-version=5`, which is unsupported by clang-14. This can be patched out, and the tests all passed except for the existing issue [1]. 2. dev-util/rocm-device-libs-5.2.0 causes lld throw linking error when compiling HIP programs: `lld: error: undefined symbol: __oclc_ABI_version`. Due to limited time I did not dig in and found the cause. I suspect it's caused by incompatibilities between the newest rocm-device-libs and llvm/clang-14. Currently rocm-device-libs-5.1.3 serves well for hip-5.2, so I decide to look at this carefully and consult upstream later. Nevertheless, I installed hip-5.2 and it worked, but that did not make blender-3.2 HIP cycles work on Radeon VII. After reading blender developer forum and investigating the versioning of HIP, I find the answer in [2] -- HIP cycles work on vega devices needs future releases of HIP. There is also a gentoo user interested in installing the newest version of ROCm. I've been answering his/her questions about resolving errors and warnings when they bump to ROCm 5.1.3 and 5.2.0 [4][5], which provides valuable information. But in my plan, I won't quickly bump to ROCm-5.2.0 because there are two incompatibilities mentioned above, so I suggest to wait for the next version of clang (probably clang-15). Also, I have not seen any urgent need of ROCm-5.2.x. Another interesting thing is ROCm on APU. I have a Ryzen 4800u Laptop, and 2 years ago in the age of ROCm-3.5, the iGPU is marked as gfx902, but the hip program compiled to gfx902 caused weird behaviours such as dead screen. Now rocminfo shows that it is gfx90c, and hip program can run smoothly. So I wonder if the full ROCm stack can be installed and run on this APU. Sadly rocBLAS fails to compile -- clang throws internal error when compiling the gigantic Tensile kernel to gfx90c. The important job this week is learning eclass syntax. I went through the eclass writing guide, and read some eclass examples (mainly llvm.org.eclass because it has similar USE_EXPAND case). I started writing rocm.eclass, currently working on handling the USE_EXPAND of AMDGPU_TARGETS, and determine compilation architectures depend on AMDGPU_TARGETS. I'm developing it at [3], and I hope by the end of week 4 the core functionalities can be finished, and I'll launch a PR to get comments, then mail it to Gentoo-dev mailing list for more suggestions. [1] https://github.com/RadeonOpenCompute/ROCm-CompilerSupport/issues/45 [2] https://bugs.gentoo.org/693200#c32 [3] https://github.com/littlewu2508/gentoo/blob/rocm-5.1.3/eclass/rocm.eclass [4] https://bugs.gentoo.org/851702#c9 [5] https://bugs.gentoo.org/693200#c35 -- Best wishes, Yiyang Wu