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 A01AF158094 for ; Mon, 15 Aug 2022 15:32:34 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B2A5BE0FF9; Mon, 15 Aug 2022 15:32:33 +0000 (UTC) Received: from mail-pj1-x102d.google.com (mail-pj1-x102d.google.com [IPv6:2607:f8b0:4864:20::102d]) (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 48EDDE0FF9 for ; Mon, 15 Aug 2022 15:32:33 +0000 (UTC) Received: by mail-pj1-x102d.google.com with SMTP id gj1so7245336pjb.0 for ; Mon, 15 Aug 2022 08:32:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-disposition:mime-version:message-id:subject:to:from:date :from:to:cc; bh=3CpMtcl+5TiDscGEO912qLiu4+SkWymtuGISrzwGysY=; b=W5exfuO44OU5feTlt1Von6Qk+Zk0NpE9AfrriGpwoL+8B+YCm84l27N1raqCJDY6ql RQIZHV+ppKqJSy6ypennl+GfjQECKN+qnJ17cbdJKsj737n2hEV2smspqWcaTc7vuGvZ 1b9nfn325etdPEvdcQ+A3vqZi60akP+MprVa5pPR1zBWjJdNu3cZivmV1oVUWpe+6aS/ hUB2vBaThuRZZCtN8SFrP0qYDpskTIyxdbG24eE63PSIb9B6ZgFqAmDEvO2KQ3Om4DH3 hl7IowDfnN+bL9T3AxK/38IxXhPv74vd1FoVpq3BQVjLwcrW5kVwe9BuHV7+Zd5XNR3J dgHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-disposition:mime-version:message-id:subject:to:from:date :x-gm-message-state:from:to:cc; bh=3CpMtcl+5TiDscGEO912qLiu4+SkWymtuGISrzwGysY=; b=sKeaHa6TeIqEgmDRYEQSmvn0lfrc1zyAq24YaQ2fozvadGv4Y9+Ov5Nv/9tG0Rirxc CPFdENrS8R9YlmlA3DGNFmqLktsy9n19Z38z7++2T3JyGxIqf7Qvpr8Wf/HaFjDZrH2x +hop+GVbTwG6EEfEshnBuwJx4IYjDJOfm4GWTH2uLkXyULBPYTBSGwIzlW0a53hTWl8O 5qMiQce1RyhYDRLyhnE/y9E1rhZOyUFBEt7ExEja26FfsElNiJbig5ANcbYRLPg8udre /BMCLZnP/Xv/ihk4HV08072l3Ow9VZGWCBdChnYX+m/0PMLoXyE1oAjy2jmayzAih0w3 bJ3Q== X-Gm-Message-State: ACgBeo3ozyvvam6eC+3+6gyzAkb2OMxcln9QbqzqhS9yFIHa743HR/CR nLgWOdPXbwKvG7lD7tRQY/yNAGFwDPM/sw== X-Google-Smtp-Source: AA6agR4+iU0oNsjarsKl1fnxglrYQ/aMSotDp29Pkk5cEF8g1LH4gWuTqGRkFOPm+I/ZhJTSLVp5iw== X-Received: by 2002:a17:903:2281:b0:171:5ae4:50e4 with SMTP id b1-20020a170903228100b001715ae450e4mr15166178plh.5.1660577552363; Mon, 15 Aug 2022 08:32:32 -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 q16-20020a656850000000b0041d322b3bf6sm6023162pgt.77.2022.08.15.08.32.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Aug 2022 08:32:31 -0700 (PDT) Date: Mon, 15 Aug 2022 23:32:28 +0800 From: wuyy To: gentoo-soc Subject: [gentoo-soc] Week 9 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: 7f7f56c9-272e-453c-be75-fec85b331115 X-Archives-Hash: 35b2eeaabcfd7c54f6b22fd128c75bd1 Hello all, This week I mainly focused on dev-libs/rocm-opencl-runtime. I bumped dev-libs/rocm-opencl-runtime to 5.1.3. That's relatively easy. The difficult part is enabling its tests. I came across a major problem, which is oclgl test requiring X server. I compiled using debug options and use gdb to dive into the code, but found there is no simple solution. Currently the test needs a X server where OpenGL vender is AMD. Xvfb only provides llvmpipe, not meeting the requirements. I consulted some friends, they said NVIDIA recommends using EGL when there is no X [1], but apparently ROCm can only get OpenGL from X [2]. So my workaround is to let user passing an X display into the ebuild, by reading the environment variable OCLGL_DISPLAY (DISPLAY variable will be wiped when calling emerge, while this can survive). If no display is detected, or glxinfo shows the OpenGL vendor is not AMD, then src_test dies, throwing indications about running an X server using amdgpu driver. I was also trapped by CRLF problem in src_test of dev-libs/rocm-opencl-runtime. Tests in oclperf.exclude should be skipped for oclperf test, but it did not. After numerous trials, I finally found that this file is using CRLF, not LF, which causes the exclusion failed :-( Nevertheless, rocm-opencl-runtime tests passed on Radeon RX 6700XT! A good thing, because I know many user in Gentoo rely on this package to provide opencl in their computation, and the correctness is vital. Before we does not have src_test enabled. The PR is now in [6]. Other works including starting wiki writing [3,4], refine rocm.eclass according to feedback (not much, see gentoo-dev mailing list), and found a bug of dev-util/hip -- FindHIP.cmake module is not in the correct place. Fix can be found in [5] but I need to further polish the patch before PR. If no further suggestions on rocm.eclass, I'll land rocm.eclass in ::gentoo next week, and start bumping the sci-libs version already done locally. [1] https://developer.nvidia.com/blog/egl-eye-opengl-visualization-without-x-server/ [2] https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime/blob/bbdc87e08b322d349f82bdd7575c8ce94d31d276/tests/ocltst/module/common/OCLGLCommonLinux.cpp [3] https://wiki.gentoo.org/wiki/ROCm [4] https://wiki.gentoo.org/wiki/HIP [5] https://github.com/littlewu2508/gentoo/tree/hip-correct-cmake [6] https://github.com/gentoo/gentoo/pull/26870 Best wishes, -- Yiyang Wu