justxi / rocm

Ebuilds to install ROCM on Gentoo Linux
38 stars 23 forks source link

video group for portage #196

Closed littlewu2508 closed 2 years ago

littlewu2508 commented 3 years ago

I tried enabling sandbox and tested building packages. It seems that during src_configure, commands are executed as portage user, and portage does not belongs to video and render group, therefore it does not have permissions to /dev/kfd and /dev/dri/render*, causing troubles (although non-fatal: rocminfo and rocm_agent_enumerator fails to query device info) during build. I have to put portage into video and render group manually.

Since I'm mainly a prefix user and aren't experienced with sandbox and permissions, is there any existing workarounds that let portage access /dev/kfd without manually modifying group or permissions?

justxi commented 3 years ago

Interessting... I did not notice these problems. Are all ebuilds effected or only a few?

littlewu2508 commented 3 years ago

Interessting... I did not notice these problems. Are all ebuilds effected or only a few?

Currently I only noticed rocBLAS is affected, since TensileCreateLibrary uses rocm_agent_enumerator.

My current solution for rocBLAS-4.3 (will be PR to gentoo very soon) is to check permissions on /dev/kfd and so on at pkg_setup. If portage has no permissions, tell user to check permissions and exit.