Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 650804

Summary: ROC - Radeon Open Compute
Product: Gentoo Linux Reporter: justXi <gentoo>
Component: New packagesAssignee: Gentoo Science Related Packages <sci>
Status: RESOLVED FIXED    
Severity: normal CC: ansla80, candrews, cwidmer, gentoo, gienah, lucas.yamanishi, mlen, m_gentoobug, nethershaw, nrndda, sam, tsmksubc
Priority: Normal Keywords: EBUILD, PullRequest
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://github.com/gentoo/gentoo/pull/19143
https://github.com/gentoo/gentoo/pull/19145
https://github.com/gentoo/gentoo/pull/19146
https://github.com/gentoo/gentoo/pull/19147
https://github.com/gentoo/gentoo/pull/19148
https://github.com/gentoo/gentoo/pull/28706
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on: 668864    
Bug Blocks:    
Attachments: ROC Thunk Interface
ROCT-Thunk-Interface-1.7.1.ebuild
ROCR-Runtime-1.7.0.ebuild
ROCm-OpenCL-Runtime-1.7.0.ebuild
hcc-9999.ebuild
ROCm-OpenCL-Runtime-1.7.0-r1.ebuild
rocminfo-9999.ebuild
rocm-smi-9999.ebuild
ROCm-OpenCL-Runtime-9999.ebuild
ROCT-Thunk-Interface-1.7.1-r1.ebuild
ROCm-OpenCL-Runtime-1.7.0-r2.ebuild
hcc-9999.ebuild
ROCm-OpenCL-Runtime-9999.ebuild
ROCm-OpenCL-Runtime-1.7.0-r3.ebuild
hcc-1.7.ebuild
hcc-9999.ebuild
ROCT-Thunk-Interface-1.7.1-r2.ebuild
hcc-9999.ebuild
hcc-1.8.ebuild
ROCT-Thunk-Interface-9999.ebuild

Description justXi 2018-03-18 15:59:36 UTC
Created attachment 524274 [details]
ROC Thunk Interface

Would be nice to have ebuilds for https://github.com/RadeonOpenCompute/ROCm.
Comment 1 justXi 2018-03-18 16:00:47 UTC
Created attachment 524276 [details]
ROCT-Thunk-Interface-1.7.1.ebuild
Comment 2 justXi 2018-03-18 16:01:17 UTC
Created attachment 524278 [details]
ROCR-Runtime-1.7.0.ebuild
Comment 3 justXi 2018-03-18 16:01:43 UTC
Created attachment 524280 [details]
ROCm-OpenCL-Runtime-1.7.0.ebuild
Comment 4 justXi 2018-03-18 16:18:37 UTC
Created attachment 524282 [details]
hcc-9999.ebuild
Comment 5 justXi 2018-03-18 16:22:16 UTC
Thunk-Interface, Runtime and OpenCL seems to be fine for me.
HCC compiles and installs, but there are problem with missing files after installation, while trying to compile an example (https://gist.github.com/scchan/540d410456e3e2682dbf018d3c179008).
Comment 6 Ilja ”Zucca” Sara 2018-03-18 20:58:19 UTC
I'd "vote" for adding these into the portage tree as the current choices for OpenCL implementation requires of using closed source amdgpu-pro parts or mesa clover (which is laggeng badly behind current specifications).
Comment 7 justXi 2018-03-20 17:47:56 UTC
Some issue with the OpenCL-Runtime ebuild:

- it complains about a security problem with DT_RUNPATH:
is it possible to remove the DT_RUNPATH with chrpath or should the cmake scripts be changed?

- running clinfo after installation with ocl-icd selected works

- compiling the "HelloWorld" example from "OpenCL programming guide" and executing it with path pointing to /usr/lib64/OpenCL/vendors/ocl-icd does not work

 - running > "LD_LIBRARY_PATH=/usr/src/amd/opencl/build/lib ./HelloWorld" works (path points to a build directory of ROCm-OpenCL-Runtime, there is also a libOpenCL.so from AMD)
Comment 8 justXi 2018-03-20 19:28:15 UTC
Created attachment 524598 [details]
ROCm-OpenCL-Runtime-1.7.0-r1.ebuild

Installs libOpenCL.so.1.2 shipped with package from AMD.

HelloWorld example works as root when selecting "roc" OpenCL profile.
Comment 9 justXi 2018-03-20 19:34:35 UTC
> HelloWorld example works as root when selecting "roc" OpenCL profile.

User must be in the "video" group, then clinfo and HelloWorld example are working as user also.
Comment 10 justXi 2018-03-22 19:08:22 UTC
My current state regarding...

ROCm-OpenCL-Runtime-1.7.0:
- building it complete from source (without git) would be possible if:
   - ocl-icd is taken from https://bugs.gentoo.org/650804
   - sources contain name of the package in path 
     "ROCm-OpenCL-Runtime-roc-1.7.0/[needed files]"
      - This must be removed or the sources must be moved while src_unpack(?)

- DT_RUNPATH security issue is still there


HCC:
- building HCC from source installs to /opt/rocm/hcc
  - cmake from portage seems to change the install path
    - I have to understand how to revert this or 
      where Gentoo wants to install which files...

- HCC needs the "rocm_agent_enumerator" and "rocminfo" from 
  "https://github.com/RadeonOpenCompute/rocminfo"
  currently installs to "/opt/rocm/bin"

- so HCC compiles, installs and ist able to compile an example (saxpy) 
  as a user, but is completely  installed without an ebuild.
Comment 11 justXi 2018-03-24 18:29:19 UTC
Created attachment 525274 [details]
rocminfo-9999.ebuild

Needed for HCC.
Comment 12 justXi 2018-03-24 18:30:47 UTC
Created attachment 525276 [details]
rocm-smi-9999.ebuild

ROC System Management Interface - python3 script for SMI.
Comment 13 justXi 2018-03-24 19:36:06 UTC
Created attachment 525280 [details]
ROCm-OpenCL-Runtime-9999.ebuild

Ebuild uses git, which seems to checkout HEAD therefore renamed version to 9999. 

Currently using "chrpath" to remove "DT_RUNPATH" from libs.
AFAIK this is normaly done by the cmake install procedure.
Comment 14 justXi 2018-03-24 19:49:50 UTC
Created attachment 525282 [details]
ROCT-Thunk-Interface-1.7.1-r1.ebuild

added some informations (elog) to "pkg_postinst".
Comment 15 justXi 2018-03-24 20:46:01 UTC
(In reply to justXi from comment #10)
> ROCm-OpenCL-Runtime-1.7.0:
> - building it complete from source (without git) would be possible if:
>    - ocl-icd is taken from https://bugs.gentoo.org/650804

Sources from https://github.com/KhronosGroup/OpenCL-ICD-Loader are used,
which contain cmake build scripts. The sources used in dev-libs/ocl-icd does not contain cmake build scripts.

>    - sources contain name of the package in path 
>      "ROCm-OpenCL-Runtime-roc-1.7.0/[needed files]"
>       - This must be removed or the sources must be moved while src_unpack(?)

I solved this with symlinks.
But without a downloadable files for ocl-icd I can not create an ebuild for the 1.7.0 of the OpenCL-Runtime.
Comment 16 justXi 2018-03-25 09:03:41 UTC
Created attachment 525380 [details]
ROCm-OpenCL-Runtime-1.7.0-r2.ebuild

An ebuild that builds the ROCm OpenCL Runtime based on source packages.
Comment 17 justXi 2018-03-25 10:28:10 UTC
Created attachment 525386 [details]
hcc-9999.ebuild

Ebuild for HCC, installs to "/usr/lib64/hcc/${SLOT}/".
First test with example "saxpy" was successful.

Currently working on "hcc-1.7.0.ebuild"...
Comment 18 justXi 2018-03-26 12:00:27 UTC
Created attachment 525464 [details]
ROCm-OpenCL-Runtime-9999.ebuild

Added a hint to set env variable "OCL_ICD_VENDORS".
Comment 19 justXi 2018-03-26 12:01:48 UTC
Created attachment 525466 [details]
ROCm-OpenCL-Runtime-1.7.0-r3.ebuild

Added a hint to set env variable "OCL_ICD_VENDORS".
Comment 20 justXi 2018-03-26 16:47:37 UTC
Created attachment 525484 [details]
hcc-1.7.ebuild

Downloads the sources for HCC 1.7.x with git. 

There is still a "QA Notice: The following files contain writable and executable sections".
Comment 21 justXi 2018-03-26 16:48:27 UTC
Created attachment 525486 [details]
hcc-9999.ebuild

Builds HEAD of HCC, checkout with git.
Comment 22 justXi 2018-03-26 16:51:06 UTC
Currently I choosed the following categories:

media-libs/ROCT-Thunk-Interface
media-libs/ROCR-Runtime
media-libs/ROCm-OpenCL-Runtime
dev-util/rocminfo
dev-util/rocm-smi
sys-devel/hcc

"mesa" which gives OpenCL support is in "media-libs", but "amdgpu-pro-opencl" is in "dev-libs". What would be the best choice?

The result of my research is, that the mainline kernels 4.16 or 4.17 could have support for dGPU (which currently seems to be only in ROC kernel 4.13). Then the ROCT-Thunk-Interface could depend on this kernel (sys-kernel/gentoo-sources). I will keep track of this.
Comment 23 Matthew "Archer" Vaughn 2018-04-22 19:49:10 UTC
I'd like to test these ebuilds.

Is there any chance you might be able to arrange them all into an overlay on GitHub so they can easily be synchronized? Thanks for all your effort so far.
Comment 24 Matthew "Archer" Vaughn 2018-04-22 20:15:09 UTC
media-libs/ROCT-Thunk-Interface should contain:

DEPEND="sys-process/numactl"

It requires headers from this package in order to build.
Comment 25 justXi 2018-04-23 16:11:04 UTC
Created attachment 528272 [details]
ROCT-Thunk-Interface-1.7.1-r2.ebuild
Comment 26 justXi 2018-04-23 16:12:14 UTC
(In reply to Matthew Vaughn from comment #23)
> I'd like to test these ebuilds.
> 
> Is there any chance you might be able to arrange them all into an overlay on
> GitHub so they can easily be synchronized? Thanks for all your effort so far.

I have to check how to do that.
If there is any howto available, I could upload the files.
Comment 27 justXi 2018-04-23 16:23:34 UTC
Before uploading the ebuilds, the categories should be defined to make the right dependencies.
Comment 28 justXi 2018-05-04 18:57:36 UTC
Created attachment 529798 [details]
hcc-9999.ebuild

Changed slot to "9999".
Comment 29 justXi 2018-05-04 19:17:12 UTC
Created attachment 529800 [details]
hcc-1.8.ebuild

Builds branch 1.8 of HCC.
Comment 30 justXi 2018-05-05 14:04:53 UTC
(In reply to Matthew Vaughn from comment #23)
> I'd like to test these ebuilds.
> 
> Is there any chance you might be able to arrange them all into an overlay on
> GitHub so they can easily be synchronized? Thanks for all your effort so far.

I created a repository on github, please try it.

-> https://github.com/justxi/rocm
Comment 31 justXi 2018-05-05 18:09:52 UTC
Created attachment 530032 [details]
ROCT-Thunk-Interface-9999.ebuild

Build latest "fxkamd/drm-next-wip" branch.
Comment 32 justXi 2018-05-05 18:18:49 UTC
With the latest ROCT-Thunk-Interface, it seems that OpenCL is working with git-sources-4.17.0-rc3. "rocm_agent_enumerator" finds the GPU and OpenCL is reporting the expected information. Compiling and running a simple OpenCL example seems to work also.
Comment 33 justXi 2018-05-10 16:22:25 UTC
I added ebuilds for ROCT-Thunk-Interface and ROCR-Runtime 1.8.x.
They are in the repository on github. 

Version 1.8.x of ROCm furthermore depends on kernel 4.13.0+.
Comment 34 justXi 2018-05-10 16:24:28 UTC
... and I renamed the ebuild for hcc to 1.{7,8}.9999, to make clear it builds the current branch of the git repository.
Comment 35 justXi 2018-05-10 20:31:22 UTC
Added an ebuild for "hsa-ext-rocr-dev", needed by the example "vector_copy" shipped with ROCR-Runtime.
Comment 36 justXi 2018-05-11 08:21:00 UTC
For convenience I added ebuilds to install the ROCm kernel sources (sys-kernel/rocm-sources).
Comment 37 justXi 2018-05-11 17:51:55 UTC
Added "media-libs/ROCm-OpenCL-Runtime-1.8.9999" ebuild.
Comment 38 justXi 2018-05-11 17:53:31 UTC
(In reply to justXi from comment #33)

> Version 1.8.x of ROCm furthermore depends on kernel 4.13.0+.

The mainline kernel, e.g. 4.17, will be supported by a future release of ROCm.
Comment 39 Matthew "Archer" Vaughn 2018-05-29 18:05:35 UTC
Tested justXi's portage overlay; installed rocm-sources, ROCm-OpenCL-Runtime, and dependencies. After configuring, building, and booting into the rocm-sources kernel, running `eselect opencl set roc` and `clinfo` shows me an OpenCL 2.0 platform available on my Radeon RX Vega. Running OpenCL applications (e.g., BOINC science apps) works a charm.

Worth noting that I can't get OCL 2.0 to work using only AMD's closed source stack, making this the only viable implementation with my card so far.

Definitely vote-worthy. Great work.
Comment 40 justXi 2018-06-02 06:43:15 UTC
Thanks for testing and the reply.
Comment 41 justXi 2018-06-02 06:45:48 UTC
Currently there is a problem when emerging hcc-1.8.x. When the sources are checked out with git manually it compiles without problems, when it is checked out with an ebuild using git-r3 there is a problem... -> https://github.com/RadeonOpenCompute/hcc/issues/730. The problem does not occure with hcc-1.7.x and hcc-9999.
Comment 42 justXi 2018-06-19 13:40:57 UTC
The problem while building hcc seems to be related to the checkout of the submodules. I spent some days on this but I could not figure out the problem. It seems that the submodules are not the same compared to using "git clone --recursive -b roc-1.8.x https://github.com/RadeonOpenCompute/hcc.git". So I uploaded for each version (1.7.x, 1.8.x, 9999) a second release (r2), which builds and installs fine on my system. Currently I keep the tried git-r3 and cmake commands as comments.
Comment 43 justXi 2018-06-19 19:51:48 UTC
Added two ebuilds to build media-libs/ROCm-OpenCL-Runtime (1.8.9999-r1, 9999-r1).
Comment 44 justXi 2018-06-19 19:58:20 UTC
Preliminary results:

- all latest versions are working (for me), so while waiting for a release of ROCm whichs depends on a mainline kernel, I will try to test the installed libraries

- after fixing the problems with "hcc" installation, the dependencies must be used again (remove the comments)

- there is still a "QA Notice: The following files contain writable and executable sections" in the install process of a few ebuilds.

- some ebuilds are not using eclasses for cmake and git-r3 (I have currently no time to check why this fails)

So further testing of the new ebuilds would be appreciated.
Comment 45 justXi 2018-06-22 13:56:01 UTC
I want to mention that using git-r3 would not lead to a complete checkout of the sources everytime the package is build. Furthermore some clean ups in the ebuilds are necessary.
Comment 46 justXi 2018-06-24 12:02:22 UTC
Changed EGIT_BRANCH of ROCKT-Thunk-Interface-9999.ebuild to ""fxkamd/drm-next-wip""
Comment 47 justXi 2018-06-24 12:03:41 UTC
With the previous change using WIP Thunk branch ("fxkamd/drm-next-wip") and 1.8.x branches of ROCR-Runtime and ROCm-OpenCL-Runtime "rocm_agent_enumerator" (gfx000, gfx003) and "clinfo" (OpenCL 2.0 AMD-APP.internal (2574.0)) seems to work with gentoo-sources 4.17.2.

Could someone test this?
Comment 48 justXi 2018-06-24 13:01:21 UTC
The "vector_copy" example works also, but the "saxpy" example works on my system only with ROC 1.8.x and kernel 4.13.0+.
Comment 49 justXi 2018-07-01 09:38:20 UTC
Compared to previous post, I installed the current git-sources 4.18.0-rc2 and I it seems there is a further step done: 
- rocm_agent_enumerator reports my Radeon 560 (gfx803)
- clinfo reports expected information about this card

Examples:
- "HelloWorld" from "OpenCL Programming Guide" reports "Executed succesfully"
- "vector_copy" reports "... succeeded"
- "saxpy" reports "0 errors"
Comment 50 justXi 2018-07-31 15:36:46 UTC
Added an ebuild to build and install HCC-1.9.x.
Comment 51 yardbird 2018-08-22 07:14:56 UTC
justXi, thanks a lot for these ebuilds!

I installed the OpenCL runtime and the hcc compiler, and they both seem to work fine with my rx 570 on a vanilla 4.18 kernel.

As a minor observation, when I tried to emerge hcc-9999 I noticed that the ebuild does not depend on any other rocm ebuild, and, as a consequence, the build failed initially. After I installed some more rocm components, I could install hcc without issues.

Thanks again!
Comment 52 justXi 2018-08-22 16:54:57 UTC
(In reply to yardbird from comment #51)

> As a minor observation, when I tried to emerge hcc-9999 I noticed that the
> ebuild does not depend on any other rocm ebuild, and, as a consequence, the
> build failed initially. After I installed some more rocm components, I could
> install hcc without issues.

Yes, I know, that was currently intended. But for the next release I can change that.
Comment 53 Mark Wright gentoo-dev 2018-09-11 06:32:44 UTC
Thanks a lot for ebuilds.  I'm buying bits for a new machine so I can test them.  So far I have the GPUs but nothing to plug them into.  I'll be able to add the ebuilds in a few months after I've finished building the machine.
Comment 54 justXi 2018-09-15 12:13:15 UTC
Hello,

ROCm-1.9 is out now. You will find the updated ebuilds in the repository.
The current release can work with mainstream kernels 4.17 and 4.18, depending on the used hardware, see https://github.com/RadeonOpenCompute/ROCm#rocm-19-is-abi-compatible-with-kfd-in-upstream-linux-kernels.

OpenCL is out for conformance testing (see: https://github.com/RadeonOpenCompute/ROCm#cloning-the-code). I will add the ebuild, as soon as it is released.

I tested the ebuilds, on my system; all installs fine, next step is to test the examples. 

If there are any problems, please report... if not, please report also =).
Comment 55 justXi 2018-09-15 19:14:44 UTC
(In reply to Mark Wright from comment #53)
> Thanks a lot for ebuilds.  I'm buying bits for a new machine so I can test
> them.  So far I have the GPUs but nothing to plug them into.  I'll be able
> to add the ebuilds in a few months after I've finished building the machine.

Sounds good. Would be nice to check if the categories are ok. If you any improvements please let me know, then I can integrate them already.
Comment 56 justXi 2018-09-16 12:49:18 UTC
I tested the installed ROCm-1.9 packages with gentoo-sources-4.18.8 - "saxpy" and "vector_copy" as in previous tests, both seem to work fine.
Comment 57 justXi 2018-09-16 17:50:44 UTC
You can find an ebuild for HIP "C++ Heterogeneous-Compute Interface for Portability" also.
Comment 58 justXi 2018-09-20 17:02:25 UTC
And finaly... the ebuild to build ROCm-OpenCL-Runtime 1.9.x.

It took around 2h on a Ryzen7 1800x, most of the time is used around 81%... so if you think building stops, wait a bit.
Comment 59 justXi 2018-09-20 17:08:31 UTC
... and I tested "clinfo" and the "HelloWorld" OpenCL example, both worked.
Comment 60 justXi 2018-09-22 06:12:33 UTC
Added an ebuild to install "rocBLAS".
Comment 61 Bigos 2018-09-29 10:45:38 UTC
I have found that ROCm-OpenCL-Runtime ebuild requires at least 32GB of disk space. Please, consider adding a test for free disk space, similar to the one in the llvm ebuild.

Other than that, it works like a charm.
Comment 62 justXi 2018-09-30 20:10:15 UTC
Thanks for hint and feedback.
I will add that test in the coming days.
Comment 63 justXi 2018-10-06 13:38:31 UTC
(In reply to Bigos from comment #61)
> I have found that ROCm-OpenCL-Runtime ebuild requires at least 32GB of disk
> space. Please, consider adding a test for free disk space, similar to the
> one in the llvm ebuild.

Done =).
Comment 64 justXi 2018-10-14 17:47:46 UTC
Updated: 
 - media-libs/hsa-ext-rocr

Added:
 - media-libs/hsa-amd-aqlprofile
 - dev-util/rocprofiler
Comment 65 Hajo 2018-10-17 10:24:53 UTC
I'm trying to install rocm and get this error:


tux ~ # emerge media-libs/ROCm-OpenCL-Runtime -av

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild  N     ] app-admin/chrpath-0.13-r2::gentoo  USE="-static-libs" 0 KiB
[ebuild  N    ~] dev-util/repo-1.12.37::gentoo  PYTHON_TARGETS="python2_7" 0 KiB
[ebuild  N    ~] media-libs/ROCT-Thunk-Interface-9999::rocm  0 KiB
[ebuild  N     ] dev-lang/ocaml-4.04.2-r1:0/4.04.2::gentoo  USE="X ncurses ocamlopt -emacs -flambda -latex -xemacs" 0 KiB
[ebuild  N    ~] media-libs/ROCR-Runtime-1.9.9999::rocm  0 KiB
[ebuild  N     ] dev-ml/findlib-1.7.1::gentoo  USE="ocamlopt -doc -tk" 0 KiB
[ebuild  N    ~] media-libs/ROCm-OpenCL-Runtime-1.9.9999::rocm  0 KiB

Total: 7 packages (7 new), Size of downloads: 0 KiB

Would you like to merge these packages? [Yes/No] y

>>> Verifying ebuild manifests

!!! Digest verification failed:
!!! /var/lib/layman/rocm/media-libs/ROCR-Runtime/ROCR-Runtime-1.8.9999.ebuild
!!! Reason: Failed on BLAKE2B verification
!!! Got: bd23c98c6a3773b1d4ba4963c6b0f182ec3b2e7f94e67d34965c05eb6be7cd51f07b5a6fbc3751a5c2b9de50cb79b4c0ee733bc48c746d698b84ddce8f592052
!!! Expected: ede0964a006937db24a8f1d64b8c6b6c236d19a5f188857506c5c70800a5dacac9f5a99c913355f49e6caa56ca7e38d01bf652cec6c7d2f69b0aec34dfa1fd99
tux ~ #
Comment 66 Hajo 2018-10-17 12:06:42 UTC
(In reply to Marlo from comment #65)
> I'm trying to install rocm and get this error:
> 
> 
> tux ~ # emerge media-libs/ROCm-OpenCL-Runtime -av
> 
> These are the packages that would be merged, in order:
> 
> Calculating dependencies... done!
> [ebuild  N     ] app-admin/chrpath-0.13-r2::gentoo  USE="-static-libs" 0 KiB
> [ebuild  N    ~] dev-util/repo-1.12.37::gentoo  PYTHON_TARGETS="python2_7" 0
> KiB
> [ebuild  N    ~] media-libs/ROCT-Thunk-Interface-9999::rocm  0 KiB
> [ebuild  N     ] dev-lang/ocaml-4.04.2-r1:0/4.04.2::gentoo  USE="X ncurses
> ocamlopt -emacs -flambda -latex -xemacs" 0 KiB
> [ebuild  N    ~] media-libs/ROCR-Runtime-1.9.9999::rocm  0 KiB
> [ebuild  N     ] dev-ml/findlib-1.7.1::gentoo  USE="ocamlopt -doc -tk" 0 KiB
> [ebuild  N    ~] media-libs/ROCm-OpenCL-Runtime-1.9.9999::rocm  0 KiB
> 
> Total: 7 packages (7 new), Size of downloads: 0 KiB
> 
> Would you like to merge these packages? [Yes/No] y
> 
> >>> Verifying ebuild manifests
> 
> !!! Digest verification failed:
> !!! /var/lib/layman/rocm/media-libs/ROCR-Runtime/ROCR-Runtime-1.8.9999.ebuild
> !!! Reason: Failed on BLAKE2B verification
> !!! Got:
> bd23c98c6a3773b1d4ba4963c6b0f182ec3b2e7f94e67d34965c05eb6be7cd51f07b5a6fbc375
> 1a5c2b9de50cb79b4c0ee733bc48c746d698b84ddce8f592052
> !!! Expected:
> ede0964a006937db24a8f1d64b8c6b6c236d19a5f188857506c5c70800a5dacac9f5a99c91335
> 5f49e6caa56ca7e38d01bf652cec6c7d2f69b0aec34dfa1fd99
> tux ~ #

######
In order not to burden this thread I documented the emerging installation errors here. BUG 668864
Comment 67 justXi 2018-10-17 17:06:07 UTC
I updated the manifest. Please try again and I think you should report it here.
Comment 68 justXi 2018-10-20 17:48:42 UTC
I removed the manifest and created a new one. Please check if the error still persist.
Comment 69 justXi 2018-10-21 09:02:30 UTC
I added a few dependencies to a few ebuilds.
Comment 70 justXi 2018-10-21 13:10:11 UTC
I added new ebuilds for "rocBLAS", which seem to work now.
Comment 71 justXi 2018-10-28 07:10:25 UTC
Added an ebuild to install the header only "rocPRIM".
Comment 72 Mark Wright gentoo-dev 2018-11-14 06:45:34 UTC
FedEx lost my order for the CPU, GPU water blocks and pumps.  I'm really keen to work on this as soon as I can get the parts, it is being delayed by the lost shipment.
Comment 73 xdarma 2018-12-15 22:57:53 UTC
Hi,
I'm trying to install only the OpenCL libs but fails with a 'repo init' problem:

aquilante ~ # emerge -v ROCm-OpenCL-Runtime

These are the packages that would be merged, in order:

Calculating dependencies ... done!             
[ebuild  N    ~] media-libs/ROCm-OpenCL-Runtime-1.9.9999::custom  0 KiB

Total: 1 package (1 new), Size of downloads: 0 KiB


>>> Verifying ebuild manifests
>>> Running pre-merge checks for media-libs/ROCm-OpenCL-Runtime-1.9.9999
 * Checking for at least 32 GiB disk space at "/var/tmp/portage/portage/media-libs/ROCm-OpenCL-Runtime-1.9.9999/temp" . [ ok ]

>>> Emerging (1 of 1) media-libs/ROCm-OpenCL-Runtime-1.9.9999::custom
 * Checking for at least 32 GiB disk space at "/var/tmp/portage/portage/media-libs/ROCm-OpenCL-Runtime-1.9.9999/temp" . [ ok ]
>>> Unpacking source...
gpg: keybox '/var/tmp/portage/portage/media-libs/ROCm-OpenCL-Runtime-1.9.9999/homedir/.repoconfig/gnupg/pubring.kbx' created
gpg: /var/tmp/portage/portage/media-libs/ROCm-OpenCL-Runtime-1.9.9999/homedir/.repoconfig/gnupg/trustdb.gpg: trustdb created
gpg: key 16530D5E920F5C65: public key "Repo Maintainer <repo@android.kernel.org>" imported
gpg: can't connect to the agent: IPC connect call failed
gpg: key 67B7E448692B382C: public key "Conley Owens <cco3@android.com>" imported
gpg: can't connect to the agent: IPC connect call failed
gpg: Total number processed: 2
gpg:               imported: 2
fatal: registering repo maintainer keys failed
error: command 'sync' requires repo to be installed first.
         Use "repo init" to install it here.
>>> Source unpacked in /var/tmp/portage/portage/media-libs/ROCm-OpenCL-Runtime-1.9.9999/work
>>> Preparing source in /var/tmp/portage/portage/media-libs/ROCm-OpenCL-Runtime-1.9.9999/work/ROCm-OpenCL-Runtime-1.9.9999 ...
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/portage/media-libs/ROCm-OpenCL-Runtime-1.9.9999/work/ROCm-OpenCL-Runtime-1.9.9999 . .
CMake Error: The source directory "/var/tmp/portage/portage/media-libs/ROCm-OpenCL-Runtime-1.9.9999/work/ROCm-OpenCL-Runtime-1 9.9999/opencl" does not exist.
Specify --help for usage, or press the help button on the CMake GUI.
>>> Source configured.
>>> Compiling source in /var/tmp/portage/portage/media-libs/ROCm-OpenCL-Runtime-1.9.9999/work/ROCm-OpenCL-Runtime-1.9.9999 ...
make: *** No targets specified and no makefile found.  Stop.
>>> Source compiled.
>>> Test phase [not enabled]: media-libs/ROCm-OpenCL-Runtime-1.9.9999

>>> Install ROCm-OpenCL-Runtime-1.9.9999 into /var/tmp/portage/portage/media-libs/ROCm-OpenCL-Runtime-1.9.9999/image/ category media-libs
!!! dolib: /var/tmp/portage/portage/media-libs/ROCm-OpenCL-Runtime-1.9.9999/work/build/lib/libamdocl64.so does not exist
 * ERROR: media-libs/ROCm-OpenCL-Runtime-1.9.9999::custom failed (install phase):
 *   dolib failed
 * 
 * If you need support, post the output of `emerge --info '=media-libs/ROCm-OpenCL-Runtime-1.9.9999::custom'`,
 * the complete build log and the output of `emerge -pqv '=media-libs/ROCm-OpenCL-Runtime-1.9.9999::custom'`.
 * The complete build log is located at '/var/tmp/portage/portage/media-libs/ROCm-OpenCL-Runtime-1.9.9999/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/portage/media-libs/ROCm-OpenCL-Runtime-1.9.9999/temp/environmen '.
 * Working directory: '/var/tmp/portage/portage/media-libs/ROCm-OpenCL-Runtime-1.9.9999/work/ROCm-OpenCL-Runtime-1.9.9999'
 * S: '/var/tmp/portage/portage/media-libs/ROCm-OpenCL-Runtime-1.9.9999/work/ROCm-OpenCL-Runtime-1.9.9999'
 * QA Notice: file does not exist:
 * 
 *      dolib: /var/tmp/portage/portage/media-libs/ROCm-OpenCL-Runtime-1.9.9999/work/build/lib/libamdocl64.so does not exist

>>> Failed to emerge media-libs/ROCm-OpenCL-Runtime-1.9.9999
 * 
 * The following package has failed to build, install, or execute postinst:
 * 
 *  (media-libs/ROCm-OpenCL-Runtime-1.9.9999:0/0::custom, ebuild scheduled for merge)
 * 
aquilante ~ #


Thanks for the ebuilds.
Comment 74 justXi 2018-12-16 10:59:28 UTC
Can you try the checkout "repo"-commands without the ebuild to check if the command works proplery?
Comment 75 xdarma 2018-12-16 13:37:13 UTC
Thanks for reply. This is the output:

aquilante ~ # repo
error: repo is not installed.  Use "repo init" to install it here.

But where I have to install?
Comment 76 justXi 2018-12-16 17:14:45 UTC
The repo-command is in the "dev-util/repo" package, which should be installed as a dependency. Please check if the package is installed. After that try: 

"repo init -u https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime.git -b roc-1.9.x -m opencl.xml"

and 

"repo sync"

and report the result.
Comment 77 xdarma 2018-12-16 18:25:35 UTC
Yes, "repo" is installed.
The second time I launch the command, the output is:

aquilante ~ # repo init -u https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime.git -b roc-1.9.x -m opencl.xml

Traceback (most recent call last):
  File "/root/.repo/repo/main.py", line 531, in <module>
    _Main(sys.argv[1:])
  File "/root/.repo/repo/main.py", line 507, in _Main
    result = repo._Run(argv) or 0
  File "/root/.repo/repo/main.py", line 180, in _Run
    result = cmd.Execute(copts, cargs)
  File "/root/.repo/repo/subcmds/init.py", line 404, in Execute
    self._ConfigureUser()
  File "/root/.repo/repo/subcmds/init.py", line 298, in _ConfigureUser
    name  = self._Prompt('Your Name', mp.UserName)
  File "/root/.repo/repo/project.py", line 784, in UserName
    self._LoadUserIdentity()
  File "/root/.repo/repo/project.py", line 797, in _LoadUserIdentity
    u = self.bare_git.var('GIT_COMMITTER_IDENT')
  File "/root/.repo/repo/project.py", line 2747, in runner
    (self._project.name, name, p.stderr))
error.GitError: manifests var: 
*** Please tell me who you are.

Run

  git config --global user.email "you@example.com"
  git config --global user.name "Your Name"

to set your account's default identity.
Omit --global to set the identity only in this repository.

fatal: unable to auto-detect email address (got 'root@aquilante.(none)')

aquilante ~ # repo sync
Fetching project OpenCL-ICD-Loader
Fetching project lld
Fetching project ROCm-Device-Libs
Fetching project llvm
Fetching projects:  14% (1/7)  Fetching project clang
Fetching projects:  28% (2/7)  Fetching project ROCm-OpenCL-Runtime
Fetching projects:  42% (3/7)  Fetching project ROCm-OpenCL-Driver
Fetching projects: 100% (7/7), done.

I've launched as root from "/root", then there are two new directories: "opencl" and ".repo".
If I try to install ROCm-OpenCL-Runtime-1.9.9999, it fails with same yesterday error.
Maybe I should move new directories "opencl" and ".repo" under "/usr/portage/distfiles/git3-src"?

TIA
Comment 78 Larry the Git Cow gentoo-dev 2019-01-14 20:25:46 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d93b1da0473409053475d30a3d15bd659a479bd4

commit d93b1da0473409053475d30a3d15bd659a479bd4
Author:     Craig Andrews <candrews@gentoo.org>
AuthorDate: 2018-12-14 04:05:22 +0000
Commit:     Craig Andrews <candrews@gentoo.org>
CommitDate: 2019-01-14 20:25:38 +0000

    dev-libs/rocr-runtime: Radeon Open Compute Runtime
    
    Bug: https://bugs.gentoo.org/650804
    Package-Manager: Portage-2.3.52, Repoman-2.3.12
    Signed-off-by: Craig Andrews <candrews@gentoo.org>

 dev-libs/rocr-runtime/Manifest                     |  1 +
 .../rocr-runtime-2.0.0-cmake-install-paths.patch   | 42 ++++++++++++++++++++++
 dev-libs/rocr-runtime/metadata.xml                 | 18 ++++++++++
 dev-libs/rocr-runtime/rocr-runtime-2.0.0.ebuild    | 34 ++++++++++++++++++
 4 files changed, 95 insertions(+)

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=950f935be6030e5ea62f0b922927b0013b120c90

commit 950f935be6030e5ea62f0b922927b0013b120c90
Author:     Craig Andrews <candrews@gentoo.org>
AuthorDate: 2018-12-14 03:54:40 +0000
Commit:     Craig Andrews <candrews@gentoo.org>
CommitDate: 2019-01-14 20:25:32 +0000

    dev-libs/roct-thunk-interface: Radeon Open Compute Thunk Interface
    
    Bug: https://bugs.gentoo.org/650804
    Package-Manager: Portage-2.3.52, Repoman-2.3.12
    Signed-off-by: Craig Andrews <candrews@gentoo.org>

 dev-libs/roct-thunk-interface/Manifest             |   1 +
 ...t-thunk-interface-2.0.0-correctly-install.patch | 288 +++++++++++++++++++++
 dev-libs/roct-thunk-interface/metadata.xml         |  22 ++
 .../roct-thunk-interface-2.0.0.ebuild              |  32 +++
 4 files changed, 343 insertions(+)
Comment 79 Dan Kasak 2019-01-20 23:05:04 UTC
Building ROCm-OpenCL-Runtime-9999 fails for me at a 'git clone' step, in a bundled test. This happens part-way through a build:

---

CMake Error at googletest-stamp/googletest-download-RelWithDebInfo.cmake:16 (message):
  Command failed: 1

   '/usr/bin/cmake' '-P' '/var/tmp/portage/media-libs/ROCm-OpenCL-Runtime-9999/work/ROCm-OpenCL-Runtime-9999_build/compiler/driver/src/unittest/googletest-prefix/tmp/googletest-gitclone.cmake'

  See also

    /var/tmp/portage/media-libs/ROCm-OpenCL-Runtime-9999/work/ROCm-OpenCL-Runtime-9999_build/compiler/driver/src/unittest/googletest-prefix/src/googletest-stamp/googletest-download-*.log


make[2]: *** [compiler/driver/src/unittest/CMakeFiles/googletest.dir/build.make:90: compiler/driver/src/unittest/googletest-prefix/src/googletest-stamp/googletest-download] Error 1

---

And looking in those googletest-download-*.log logs, I have:

---

Cloning into 'googletest'...
fatal: unable to access 'https://github.com/google/googletest/': Couldn't resolve host 'github.com'
Cloning into 'googletest'...
fatal: unable to access 'https://github.com/google/googletest/': Couldn't resolve host 'github.com'
Cloning into 'googletest'...
fatal: unable to access 'https://github.com/google/googletest/': Couldn't resolve host 'github.com'
CMake Error at /var/tmp/portage/media-libs/ROCm-OpenCL-Runtime-9999/work/ROCm-OpenCL-Runtime-9999_build/compiler/driver/src/unittest/googletest-prefix/tmp/googletest-gitclone.cmake:66 (message):
  Failed to clone repository: 'https://github.com/google/googletest'

---

Strangely, I can manually clone this repo. I'm not overly familiar with the portage build process. Do build scripts have network access?
Comment 80 justXi 2019-02-10 09:43:15 UTC
If you still have problems please problems here https://github.com/justxi/rocm, as long the ebuilds are not in official Gentoo portage.
Comment 81 justXi 2019-03-17 07:39:06 UTC
(In reply to Dan Kasak from comment #79)
...
> And looking in those googletest-download-*.log logs, I have:
> 
> ---
> 
> Cloning into 'googletest'...
> fatal: unable to access 'https://github.com/google/googletest/': Couldn't
> resolve host 'github.com'
> Cloning into 'googletest'...
> fatal: unable to access 'https://github.com/google/googletest/': Couldn't
> resolve host 'github.com'
> Cloning into 'googletest'...
> fatal: unable to access 'https://github.com/google/googletest/': Couldn't
> resolve host 'github.com'
> CMake Error at
> /var/tmp/portage/media-libs/ROCm-OpenCL-Runtime-9999/work/ROCm-OpenCL-
> Runtime-9999_build/compiler/driver/src/unittest/googletest-prefix/tmp/
> googletest-gitclone.cmake:66 (message):
>   Failed to clone repository: 'https://github.com/google/googletest'
> 
> ---
> 
> Strangely, I can manually clone this repo. I'm not overly familiar with the
> portage build process. Do build scripts have network access?

I now have the same problem. The used ROCm-OpenCL-Driver load additional sources. In the media-libs/ROCm-OpenCL-Runtime-2.2.9999 ebuild this is resolved.
Comment 82 Mark Wright gentoo-dev 2019-04-07 10:58:29 UTC
(In reply to justXi from comment #81)
> (In reply to Dan Kasak from comment #79)
> ...
> > And looking in those googletest-download-*.log logs, I have:
> > 
> > ---
> > 
> > Cloning into 'googletest'...
> > fatal: unable to access 'https://github.com/google/googletest/': Couldn't
> > resolve host 'github.com'
> > Cloning into 'googletest'...
> > fatal: unable to access 'https://github.com/google/googletest/': Couldn't
> > resolve host 'github.com'
> > Cloning into 'googletest'...
> > fatal: unable to access 'https://github.com/google/googletest/': Couldn't
> > resolve host 'github.com'
> > CMake Error at
> > /var/tmp/portage/media-libs/ROCm-OpenCL-Runtime-9999/work/ROCm-OpenCL-
> > Runtime-9999_build/compiler/driver/src/unittest/googletest-prefix/tmp/
> > googletest-gitclone.cmake:66 (message):
> >   Failed to clone repository: 'https://github.com/google/googletest'
> > 
> > ---
> > 
> > Strangely, I can manually clone this repo. I'm not overly familiar with the
> > portage build process. Do build scripts have network access?
> 
> I now have the same problem. The used ROCm-OpenCL-Driver load additional
> sources. In the media-libs/ROCm-OpenCL-Runtime-2.2.9999 ebuild this is
> resolved.

You could try:

FEATURES=-network-sandbox emerge ...

I'm working on building a machine with AMD cards so I can work on this.

I notice AMD have deprecated hcc:

https://github.com/RadeonOpenCompute/ROCm#deprecation-notice---hcc
Comment 83 Craig Andrews gentoo-dev 2019-08-15 14:40:55 UTC
These packages are now in Gentoo:
dev-libs/rocm-comgr
dev-libs/rocm-device-libs
dev-libs/rocm-hostcall
dev-libs/rocm-opencl-driver
dev-libs/rocm-opencl-runtime (which is the OpenCL implementation)
dev-libs/rocr-runtime
dev-libs/roct-thunk-interface
dev-util/rocminfo
dev-util/rocm-cmake
Comment 84 Reva Denis 2020-12-23 11:53:01 UTC
Well, may we close that bug? Radeon open compute seems to be supported in Gentoo fully now.
Comment 85 justXi 2020-12-23 16:07:26 UTC
I think we don´t have a full suppport of ROCm in Gentoo portage. What we have is full support for OpenCL from ROCm. All other ebuilds can be still found here -> https://github.com/justxi/rocm.
Comment 86 Larry the Git Cow gentoo-dev 2021-01-20 16:11:39 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/sci.git/commit/?id=82fbfe4f5baa29d1bde681574d7c54e3cc6709ca

commit 82fbfe4f5baa29d1bde681574d7c54e3cc6709ca
Author:     Benda Xu <heroxbd@gentoo.org>
AuthorDate: 2021-01-20 15:57:33 +0000
Commit:     Benda Xu <heroxbd@gentoo.org>
CommitDate: 2021-01-20 16:11:25 +0000

    sci-libs/miopen: high performance machine learning primitives.
    
    Bug: https://bugs.gentoo.org/650804
    Bug: https://github.com/gentoo/gentoo/pull/10724
    Suggested-by: Yiyang Wu <xgreenlandforwyy@gmail.com>
    Suggested-by: Wilfried Holzke <gentoo@holzke.net>
    Package-Manager: Portage-3.0.12, Repoman-3.0.1
    Signed-off-by: Benda Xu <heroxbd@gentoo.org>

 sci-libs/miopen/Manifest               |  1 +
 sci-libs/miopen/metadata.xml           | 11 +++++++
 sci-libs/miopen/miopen-4.0.0-r1.ebuild | 60 ++++++++++++++++++++++++++++++++++
 3 files changed, 72 insertions(+)

https://gitweb.gentoo.org/proj/sci.git/commit/?id=b9e211344f40538b9a641bae5b188c732afa2f21

commit b9e211344f40538b9a641bae5b188c732afa2f21
Author:     Benda Xu <heroxbd@gentoo.org>
AuthorDate: 2021-01-20 15:52:50 +0000
Commit:     Benda Xu <heroxbd@gentoo.org>
CommitDate: 2021-01-20 16:11:24 +0000

    dev-util/rocm-clang-ocl: Clang OpenCL compilation wrapper.
    
    This is but a shell script wrapper.  To be merged with
    dev-libs/rocm-opencl-runtime::gentoo.
    
    Bug: https://bugs.gentoo.org/650804
    Bug: https://github.com/gentoo/gentoo/pull/10724
    Suggested-by: Yiyang Wu <xgreenlandforwyy@gmail.com>
    Suggested-by: Wilfried Holzke <gentoo@holzke.net>
    Package-Manager: Portage-3.0.12, Repoman-3.0.1
    Signed-off-by: Benda Xu <heroxbd@gentoo.org>

 dev-util/rocm-clang-ocl/Manifest                   |  1 +
 dev-util/rocm-clang-ocl/metadata.xml               | 11 ++++++++
 .../rocm-clang-ocl/rocm-clang-ocl-4.0.0-r1.ebuild  | 31 ++++++++++++++++++++++
 3 files changed, 43 insertions(+)

https://gitweb.gentoo.org/proj/sci.git/commit/?id=fe314585b4fc98364d477309b4648927fcf63cf3

commit fe314585b4fc98364d477309b4648927fcf63cf3
Author:     Benda Xu <heroxbd@gentoo.org>
AuthorDate: 2021-01-20 10:35:31 +0000
Commit:     Benda Xu <heroxbd@gentoo.org>
CommitDate: 2021-01-20 16:11:24 +0000

    dev-libs/half: half precision library.
    
    This is a dependency of MIOpen.
    
    Bug: https://github.com/gentoo/gentoo/pull/10724
    Bug: https://bugs.gentoo.org/650804
    Suggested-by: Yiyang Wu <xgreenlandforwyy@gmail.com>
    Suggested-by: Wilfried Holzke <gentoo@holzke.net>
    Package-Manager: Portage-3.0.12, Repoman-3.0.1
    Signed-off-by: Benda Xu <heroxbd@gentoo.org>

 dev-libs/half/Manifest          |  1 +
 dev-libs/half/half-2.1.0.ebuild | 24 ++++++++++++++++++++++++
 dev-libs/half/metadata.xml      | 11 +++++++++++
 3 files changed, 36 insertions(+)

https://gitweb.gentoo.org/proj/sci.git/commit/?id=5a6ca7469f59dd61a837ad34b60a9bb33b9f105b

commit 5a6ca7469f59dd61a837ad34b60a9bb33b9f105b
Author:     Benda Xu <heroxbd@gentoo.org>
AuthorDate: 2021-01-20 09:00:35 +0000
Commit:     Benda Xu <heroxbd@gentoo.org>
CommitDate: 2021-01-20 16:11:24 +0000

    sci-libs/rocBLAS: AMD library for BLAS on the ROCm platform.
    
    To be considered landing on ::gentoo when dev-util/Tensile is
    available.
    
    Bug: https://bugs.gentoo.org/650804
    Bug: https://github.com/gentoo/gentoo/pull/10724
    Suggested-by: Yiyang Wu <xgreenlandforwyy@gmail.com>
    Suggested-by: Wilfried Holzke <gentoo@holzke.net>
    Bug: https://github.com/justxi/rocm/issues/133
    Package-Manager: Portage-3.0.12, Repoman-3.0.1
    Signed-off-by: Benda Xu <heroxbd@gentoo.org>

 sci-libs/rocBLAS/Manifest                          |  1 +
 .../files/rocBLAS-4.0.0-use-system-tensile.patch   | 30 ++++++++
 sci-libs/rocBLAS/metadata.xml                      | 11 +++
 sci-libs/rocBLAS/rocBLAS-4.0.0-r1.ebuild           | 88 ++++++++++++++++++++++
 4 files changed, 130 insertions(+)

https://gitweb.gentoo.org/proj/sci.git/commit/?id=a834c16140aac66b84563c808c6315d43e6b0df3

commit a834c16140aac66b84563c808c6315d43e6b0df3
Author:     Benda Xu <heroxbd@gentoo.org>
AuthorDate: 2021-01-20 08:33:05 +0000
Commit:     Benda Xu <heroxbd@gentoo.org>
CommitDate: 2021-01-20 16:11:24 +0000

    dev-util/Tensile: creating benchmark-driven backend library for GEMMs
    
    This ebuild is a working-in-progress that works, but having QA issues,
    such as installing a lot of data into python site directories.
    
    Bug: https://github.com/gentoo/gentoo/pull/10724
    Bug: https://bugs.gentoo.org/650804
    Suggested-by: Yiyang Wu <xgreenlandforwyy@gmail.com>
    Suggested-by: Wilfried Holzke <gentoo@holzke.net>
    Package-Manager: Portage-3.0.12, Repoman-3.0.1
    Signed-off-by: Benda Xu <heroxbd@gentoo.org>

 dev-util/Tensile/Manifest             |  1 +
 dev-util/Tensile/Tensile-4.0.0.ebuild | 31 +++++++++++++++++++++++++++++++
 dev-util/Tensile/metadata.xml         | 11 +++++++++++
 3 files changed, 43 insertions(+)
Comment 87 Larry the Git Cow gentoo-dev 2021-01-24 07:43:37 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d1e25273456a9f38b842f65e9c5bc1ac63c5c13d

commit d1e25273456a9f38b842f65e9c5bc1ac63c5c13d
Author:     Benda Xu <heroxbd@gentoo.org>
AuthorDate: 2021-01-21 14:37:07 +0000
Commit:     Benda Xu <heroxbd@gentoo.org>
CommitDate: 2021-01-24 07:43:03 +0000

    dev-util/roctracer: performance tracing for AMD GPUs.
    
    Closes: https://github.com/gentoo/gentoo/pull/19148
    Suggested-by: Yiyang Wu <xgreenlandforwyy@gmail.com>
    Suggested-by: Wilfried Holzke <gentoo@holzke.net>
    Bug: https://bugs.gentoo.org/650804
    Bug: https://github.com/gentoo/gentoo/pull/10724
    Package-Manager: Portage-3.0.12, Repoman-3.0.1
    Signed-off-by: Benda Xu <heroxbd@gentoo.org>

 dev-util/roctracer/Manifest                        |  1 +
 ...roctracer-3.8.0-gen_ostream_ops-toPython3.patch | 28 +++++++++++
 dev-util/roctracer/metadata.xml                    | 19 +++++++
 dev-util/roctracer/roctracer-4.0.0-r1.ebuild       | 58 ++++++++++++++++++++++
 4 files changed, 106 insertions(+)

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0f360e0c20f1583548be57928a5388a38cdbb9fb

commit 0f360e0c20f1583548be57928a5388a38cdbb9fb
Author:     Benda Xu <heroxbd@gentoo.org>
AuthorDate: 2021-01-21 14:33:07 +0000
Commit:     Benda Xu <heroxbd@gentoo.org>
CommitDate: 2021-01-24 07:43:02 +0000

    dev-python/CppHeaderParser: Parse C++ header files
    
    generate a data structure
    
    Suggested-by: Yiyang Wu <xgreenlandforwyy@gmail.com>
    Suggested-by: Wilfried Holzke <gentoo@holzke.net>
    Bug: https://bugs.gentoo.org/650804
    Bug: https://github.com/gentoo/gentoo/pull/10724
    Package-Manager: Portage-3.0.12, Repoman-3.0.1
    Signed-off-by: Benda Xu <heroxbd@gentoo.org>

 .../CppHeaderParser/CppHeaderParser-2.7.4.ebuild      | 19 +++++++++++++++++++
 dev-python/CppHeaderParser/Manifest                   |  1 +
 dev-python/CppHeaderParser/metadata.xml               | 16 ++++++++++++++++
 3 files changed, 36 insertions(+)
Comment 88 Larry the Git Cow gentoo-dev 2021-01-24 07:49:48 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=48544762ef753e69fc2a4c1e7b3adf9ead209683

commit 48544762ef753e69fc2a4c1e7b3adf9ead209683
Author:     Benda Xu <heroxbd@gentoo.org>
AuthorDate: 2021-01-21 09:12:48 +0000
Commit:     Benda Xu <heroxbd@gentoo.org>
CommitDate: 2021-01-24 07:48:27 +0000

    dev-libs/rccl: ROCm Communication Collectives Library
    
    Closes: https://github.com/gentoo/gentoo/pull/19143
    Bug: https://bugs.gentoo.org/650804
    Bug: https://github.com/gentoo/gentoo/pull/10724
    Suggested-by: Yiyang Wu <xgreenlandforwyy@gmail.com>
    Suggested-by: Wilfried Holzke <gentoo@holzke.net>
    Package-Manager: Portage-3.0.12, Repoman-3.0.1
    Signed-off-by: Benda Xu <heroxbd@gentoo.org>

 dev-libs/rccl/Manifest                             |  1 +
 .../files/rccl-2.7.0-change_install_location.patch | 33 ++++++++++++++++++
 dev-libs/rccl/metadata.xml                         | 19 +++++++++++
 dev-libs/rccl/rccl-4.0.0-r1.ebuild                 | 39 ++++++++++++++++++++++
 4 files changed, 92 insertions(+)

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b7887f20464f5712259ca57a618fea681f01d42b

commit b7887f20464f5712259ca57a618fea681f01d42b
Author:     Benda Xu <heroxbd@gentoo.org>
AuthorDate: 2021-01-21 12:46:34 +0000
Commit:     Benda Xu <heroxbd@gentoo.org>
CommitDate: 2021-01-24 07:45:44 +0000

    sci-libs/hipSPARSE: SPARSE marshalling library.
    
    Closes: https://github.com/gentoo/gentoo/pull/19145
    Bug: https://bugs.gentoo.org/650804
    Bug: https://github.com/gentoo/gentoo/pull/10724
    Suggested-by: Yiyang Wu <xgreenlandforwyy@gmail.com>
    Suggested-by: Wilfried Holzke <gentoo@holzke.net>
    Package-Manager: Portage-3.0.12, Repoman-3.0.1
    Signed-off-by: Benda Xu <heroxbd@gentoo.org>

 sci-libs/hipSPARSE/Manifest                  |  1 +
 sci-libs/hipSPARSE/hipSPARSE-4.0.0-r1.ebuild | 49 ++++++++++++++++++++++++++++
 sci-libs/hipSPARSE/metadata.xml              | 19 +++++++++++
 3 files changed, 69 insertions(+)

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0a666c2a83b012e5a414a1593cbf10c9199a904e

commit 0a666c2a83b012e5a414a1593cbf10c9199a904e
Author:     Benda Xu <heroxbd@gentoo.org>
AuthorDate: 2021-01-21 12:43:31 +0000
Commit:     Benda Xu <heroxbd@gentoo.org>
CommitDate: 2021-01-24 07:45:43 +0000

    sci-libs/rocSPARSE: BLAS for sparse computation.
    
    Bug: https://bugs.gentoo.org/650804
    Bug: https://github.com/gentoo/gentoo/pull/10724
    Suggested-by: Yiyang Wu <xgreenlandforwyy@gmail.com>
    Suggested-by: Wilfried Holzke <gentoo@holzke.net>
    Package-Manager: Portage-3.0.12, Repoman-3.0.1
    Signed-off-by: Benda Xu <heroxbd@gentoo.org>

 sci-libs/rocSPARSE/Manifest                  |  1 +
 sci-libs/rocSPARSE/metadata.xml              | 19 +++++++++++
 sci-libs/rocSPARSE/rocSPARSE-4.0.0-r1.ebuild | 51 ++++++++++++++++++++++++++++
 3 files changed, 71 insertions(+)

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=48672742eb366fef64bc71f896e618d31bc3bfa4

commit 48672742eb366fef64bc71f896e618d31bc3bfa4
Author:     Benda Xu <heroxbd@gentoo.org>
AuthorDate: 2021-01-21 11:42:19 +0000
Commit:     Benda Xu <heroxbd@gentoo.org>
CommitDate: 2021-01-24 07:45:42 +0000

    sci-libs/hipCUB: wrapper library of rocPRIM or CUB.
    
    Bug: https://bugs.gentoo.org/650804
    Bug: https://github.com/gentoo/gentoo/pull/10724
    Suggested-by: Yiyang Wu <xgreenlandforwyy@gmail.com>
    Suggested-by: Wilfried Holzke <gentoo@holzke.net>
    Package-Manager: Portage-3.0.12, Repoman-3.0.1
    Signed-off-by: Benda Xu <heroxbd@gentoo.org>

 sci-libs/hipCUB/Manifest               |  1 +
 sci-libs/hipCUB/hipCUB-4.0.0-r1.ebuild | 47 ++++++++++++++++++++++++++++++++++
 sci-libs/hipCUB/metadata.xml           | 18 +++++++++++++
 3 files changed, 66 insertions(+)

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=21458c9061094f1fa0a47c93c1416c31bc6dc7de

commit 21458c9061094f1fa0a47c93c1416c31bc6dc7de
Author:     Benda Xu <heroxbd@gentoo.org>
AuthorDate: 2021-01-21 11:36:45 +0000
Commit:     Benda Xu <heroxbd@gentoo.org>
CommitDate: 2021-01-24 07:45:41 +0000

    sci-libs/rocThrust: ROCm backend for Thrust.
    
    Bug: https://bugs.gentoo.org/650804
    Bug: https://github.com/gentoo/gentoo/pull/10724
    Suggested-by: Yiyang Wu <xgreenlandforwyy@gmail.com>
    Suggested-by: Wilfried Holzke <gentoo@holzke.net>
    Package-Manager: Portage-3.0.12, Repoman-3.0.1
    Signed-off-by: Benda Xu <heroxbd@gentoo.org>

 sci-libs/rocThrust/Manifest                        |  1 +
 .../files/rocThrust-4.0-operator_new.patch         | 29 +++++++++++++
 sci-libs/rocThrust/metadata.xml                    | 18 ++++++++
 sci-libs/rocThrust/rocThrust-4.0.0-r1.ebuild       | 49 ++++++++++++++++++++++
 4 files changed, 97 insertions(+)

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=04554a7ee461d00e9103f81290b2d980a121941a

commit 04554a7ee461d00e9103f81290b2d980a121941a
Author:     Benda Xu <heroxbd@gentoo.org>
AuthorDate: 2021-01-21 11:27:53 +0000
Commit:     Benda Xu <heroxbd@gentoo.org>
CommitDate: 2021-01-24 07:45:41 +0000

    sci-libs/rocPRIM: HIP parallel primitives for ROCm GPU.
    
    Bug: https://bugs.gentoo.org/650804
    Bug: https://github.com/gentoo/gentoo/pull/10724
    Suggested-by: Yiyang Wu <xgreenlandforwyy@gmail.com>
    Suggested-by: Wilfried Holzke <gentoo@holzke.net>
    Package-Manager: Portage-3.0.12, Repoman-3.0.1
    Signed-off-by: Benda Xu <heroxbd@gentoo.org>

 sci-libs/rocPRIM/Manifest                |  1 +
 sci-libs/rocPRIM/metadata.xml            | 19 ++++++++++++
 sci-libs/rocPRIM/rocPRIM-4.0.0-r1.ebuild | 53 ++++++++++++++++++++++++++++++++
 3 files changed, 73 insertions(+)

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bbdc938b68c82208fccc7b95ee31e5247b16b1ba

commit bbdc938b68c82208fccc7b95ee31e5247b16b1ba
Author:     Benda Xu <heroxbd@gentoo.org>
AuthorDate: 2021-01-21 13:13:59 +0000
Commit:     Benda Xu <heroxbd@gentoo.org>
CommitDate: 2021-01-24 07:44:24 +0000

    sci-libs/rocFFT: FFT implementation for ROCm.
    
    Closes: https://github.com/gentoo/gentoo/pull/19146
    Bug: https://bugs.gentoo.org/650804
    Bug: https://github.com/gentoo/gentoo/pull/10724
    Suggested-by: Yiyang Wu <xgreenlandforwyy@gmail.com>
    Suggested-by: Wilfried Holzke <gentoo@holzke.net>
    Package-Manager: Portage-3.0.12, Repoman-3.0.1
    Signed-off-by: Benda Xu <heroxbd@gentoo.org>

 sci-libs/rocFFT/Manifest               |  1 +
 sci-libs/rocFFT/metadata.xml           | 19 +++++++++++++
 sci-libs/rocFFT/rocFFT-4.0.0-r1.ebuild | 51 ++++++++++++++++++++++++++++++++++
 3 files changed, 71 insertions(+)
Comment 89 Larry the Git Cow gentoo-dev 2021-01-24 07:53:45 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=eb75dfab9e7af24c606278dce28101b51f47f043

commit eb75dfab9e7af24c606278dce28101b51f47f043
Author:     Benda Xu <heroxbd@gentoo.org>
AuthorDate: 2021-01-21 13:58:06 +0000
Commit:     Benda Xu <heroxbd@gentoo.org>
CommitDate: 2021-01-24 07:51:01 +0000

    sci-libs/rocRAND: pseudo-random number generator.
    
    Closes: https://github.com/gentoo/gentoo/pull/19147
    Suggested-by: Yiyang Wu <xgreenlandforwyy@gmail.com>
    Suggested-by: Wilfried Holzke <gentoo@holzke.net>
    Bug: https://bugs.gentoo.org/650804
    Bug: https://github.com/gentoo/gentoo/pull/10724
    Package-Manager: Portage-3.0.12, Repoman-3.0.1
    Signed-off-by: Benda Xu <heroxbd@gentoo.org>

 sci-libs/rocRAND/Manifest                |  1 +
 sci-libs/rocRAND/metadata.xml            | 19 +++++++++++++
 sci-libs/rocRAND/rocRAND-4.0.0-r1.ebuild | 46 ++++++++++++++++++++++++++++++++
 3 files changed, 66 insertions(+)
Comment 90 Larry the Git Cow gentoo-dev 2021-01-24 13:38:19 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/sci.git/commit/?id=f4f6740dd370885258be7c6f97f08e37143489dd

commit f4f6740dd370885258be7c6f97f08e37143489dd
Author:     Benda Xu <heroxbd@gentoo.org>
AuthorDate: 2021-01-24 13:27:51 +0000
Commit:     Benda Xu <heroxbd@gentoo.org>
CommitDate: 2021-01-24 13:38:00 +0000

    sci-libs/pytorch: bump to 1.7.1.
    
    Add ROCm support for AMD GPUs.
    
    Remove fine-grained BLAS flags, use a general USE=blas and rely on
    eselect-ldso for runtime switch of blas libraries.
    
    merge USE=numpy into USE=python.
    
    Suggested-by: Yiyang Wu <xgreenlandforwyy@gmail.com>
    Bug: https://bugs.gentoo.org/650804
    Bug: https://github.com/gentoo/gentoo/pull/10724
    Closes: https://github.com/justxi/rocm/issues/133
    Closes: https://github.com/gentoo/sci/issues/1039
    Closes: https://github.com/gentoo/sci/issues/1011
    Package-Manager: Portage-3.0.12, Repoman-3.0.1
    RepoMan-Options: --force
    Signed-off-by: Benda Xu <heroxbd@gentoo.org>

 sci-libs/pytorch/Manifest                          |  33 +++
 ...-t-build-libtorch-again-for-PyTorch-1.7.1.patch |  18 ++
 sci-libs/pytorch/files/get_third_parties           |  20 ++
 .../pytorch/files/pytorch-1.7.1-no-rpath.patch     |  12 +
 sci-libs/pytorch/files/pytorch-1.7.1-setup.patch   |  12 +
 .../pytorch-1.7.1-tensorpipe-unbundle-libuv.patch  |  12 +
 .../files/pytorch-1.7.1-torch_shm_manager.patch    |  13 +
 sci-libs/pytorch/metadata.xml                      |   1 +
 sci-libs/pytorch/pytorch-1.7.1-r2.ebuild           | 292 +++++++++++++++++++++
 9 files changed, 413 insertions(+)
Comment 91 Bogdan 2021-02-11 04:16:23 UTC
Some trouble with missing libhsa-amd-aqlprofile64.so file.:
https://github.com/RadeonOpenCompute/ROCm/issues/1374

Resolution of my researches:
- new iGPU in newly Ryzen CPU's not supported in AMD OpenCL drivers
Comment 92 perestoronin 2021-03-27 07:08:58 UTC
I tried compile self-bumped from science overlay ebuild, and it's failed:

ninja: error: '/var/tmp/portage/sci-libs/rocBLAS-4.1.0/work/rocBLAS-rocm-4.1.0/library/src/blas3/Tensile/*.hpp', needed by 'include/internal/rocblas-exported-proto.hpp', missing and no known rule to make it

but execute /var/tmp/portage/sci-libs/rocBLAS-4.1.0/work/rocBLAS-rocm-4.1.0/library/src/blas3/Tensile/*.hpp

/var/tmp/portage/sci-libs/rocBLAS-4.1.0/work/rocBLAS-rocm-4.1.0/library/src/blas3/Tensile/gemm_batched.hpp
/var/tmp/portage/sci-libs/rocBLAS-4.1.0/work/rocBLAS-rocm-4.1.0/library/src/blas3/Tensile/gemm.hpp

Please fix rocBLAS
Comment 93 justXi 2021-03-28 09:17:34 UTC
I will first update all other ebuilds in Gentoo portage, then I will update the ebuilds in Science overlay.
Comment 94 Andreas Sturmlechner gentoo-dev 2022-12-19 09:12:17 UTC
I want to cleanup cmake.eclass EAPI-7 revdeps and ROC ebuilds are accumulating a fair bit of old versions. Please ACK: https://github.com/gentoo/gentoo/pull/28706
Comment 95 Andreas Sturmlechner gentoo-dev 2022-12-19 14:16:29 UTC
Thanks; any future version bumps would be appreciated as EAPI-8 bumps, if not already ported.
Comment 96 Benda Xu gentoo-dev 2022-12-20 04:32:10 UTC
Sure EAPI 8 will be our default.  Special thanks to @justXi for build the foundation to the Gentoo ROCm package.  Considering we now have a working ROCm software stack, let's close this bug.