public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] [PATCH v7 0/2] rocm.eclass: new eclass
@ 2022-09-05 13:31 Yiyang Wu
  2022-09-05 13:31 ` [gentoo-dev] [PATCH v7 1/2] " Yiyang Wu
  2022-09-05 13:31 ` [gentoo-dev] [PATCH v7 2/2] profiles/desc: add amdgpu_targets.desc for USE_EXPAND Yiyang Wu
  0 siblings, 2 replies; 3+ messages in thread
From: Yiyang Wu @ 2022-09-05 13:31 UTC (permalink / raw
  To: gentoo-dev; +Cc: Benda Xu

Comparing to v6, rocn.eclass refactorized a lot in v7, thanks to
MichaƂ's critical comments on
https://github.com/gentoo/gentoo/pull/26784.

Now the eclass code base is much cleaner, mostly because specific codes
in phase functions are removed.

Changelog against v6:

1. Remove phase functions rocm_src_configure and rocm_src_test. The code
duplication among ROCm ebuilds are not so large that a common phase
function is necessary. Writing a all-in-one phase function would cause
the eclass hard to maintain.

2. check_rw_permission -> check_amdgpu. Limit the function to check
amdgpu device, and move `addwrite /dev/kfd` from rocm_src_test into it.
So ebuilds can simply call check_amdgpu in src_test and do the reset of
testing.

3. Standardize and simplify codes including bash array handling.

4. ROCM_VERSION is required for all packages, not assumed to be ${PV}.

5. Reshaped the examples according to the changes.

6. Update reference of AMDGPU device map, pointing to codes in an
official repo rather than a summarize hosted on a third-party web page.

I would also like to ask a question. In check_amdgpu, if GPU access
denied, the eclass suggest the user to check whether the portage user is
in render group or not. I would like to print the username, so I tried
use ${USER} but it is not set during src_test.  Previously, I used
${PORTAGE_USERNAME} but its a potage internal variable. Is there an
approach to print the portage username? Would $(whoami) suitable for
this job?

Yiyang Wu (2):
  rocm.eclass: new eclass
  profiles/desc: add amdgpu_targets.desc for USE_EXPAND

 eclass/rocm.eclass                | 223 ++++++++++++++++++++++++++++++
 profiles/base/make.defaults       |   2 +-
 profiles/desc/amdgpu_targets.desc |  17 +++
 3 files changed, 241 insertions(+), 1 deletion(-)
 create mode 100644 eclass/rocm.eclass
 create mode 100644 profiles/desc/amdgpu_targets.desc

-- 
2.34.1



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-09-05 13:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-05 13:31 [gentoo-dev] [PATCH v7 0/2] rocm.eclass: new eclass Yiyang Wu
2022-09-05 13:31 ` [gentoo-dev] [PATCH v7 1/2] " Yiyang Wu
2022-09-05 13:31 ` [gentoo-dev] [PATCH v7 2/2] profiles/desc: add amdgpu_targets.desc for USE_EXPAND Yiyang Wu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox