Bug 1539920 - Review Request: rocm-runtime - ROCm runtime driver for AMD compute
Summary: Review Request: rocm-runtime - ROCm runtime driver for AMD compute
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Robert-André Mauchin 🐧
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-01-29 20:48 UTC by Tom Stellard
Modified: 2018-07-30 22:27 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-03-05 14:48:46 UTC
Type: ---
zebob.m: fedora-review+


Attachments (Terms of Use)

Comment 2 Robert-André Mauchin 🐧 2018-02-01 15:17:31 UTC
 - Latest version seems to be roc-1.7.0 https://github.com/RadeonOpenCompute/ROCR-Runtime/releases

 - I can't build it in Mock:

[ 17%] Building CXX object CMakeFiles/hsa-runtime64.dir/core/runtime/amd_cpu_agent.cpp.o
/usr/lib64/ccache/c++  -DHAVE_MEMFD_CREATE -DHSA_EXPORT=1 -DHSA_EXPORT_FINALIZER=1 -DHSA_EXPORT_IMAGES=1 -DLITTLEENDIAN_CPU=1 -DROCR_BUILD_ID=1.0.0- -D__linux__ -Dhsa_runtime64_EXPORTS -I/builddir/build/BUILD/ROCR-Runtime-roc-1.6.1/src -I/builddir/build/BUILD/ROCR-Runtime-roc-1.6.1/src/inc -I/builddir/build/BUILD/ROCR-Runtime-roc-1.6.1/src/core/inc -I/builddir/build/BUILD/ROCR-Runtime-roc-1.6.1/src/libamdhsacode  -Wall -std=c++11  -fpic -Wl,--unresolved-symbols=ignore-in-shared-libs -fno-strict-aliasing -m64  -msse -msse2 -Werror -fexceptions -fno-rtti -fvisibility=hidden -Wno-error=sign-compare -Wno-sign-compare -Wno-write-strings -Wno-conversion-null -fno-math-errno -fno-threadsafe-statics -fmerge-all-constants -fms-extensions -Wno-error=comment -Wno-comment -Wno-error=pointer-arith -Wno-pointer-arith -Wno-error=unused-variable -Wno-error=unused-but-set-variable -Wno-error=unused-function -O2 -g -DNDEBUG -fPIC   -D __STDC_LIMIT_MACROS -D __STDC_CONSTANT_MACROS -D __STDC_FORMAT_MACROS -D HSA_DEPRECATED= -o CMakeFiles/hsa-runtime64.dir/core/runtime/amd_cpu_agent.cpp.o -c /builddir/build/BUILD/ROCR-Runtime-roc-1.6.1/src/core/runtime/amd_cpu_agent.cpp
make[2]: Leaving directory '/builddir/build/BUILD/ROCR-Runtime-roc-1.6.1/build'
In file included from /builddir/build/BUILD/ROCR-Runtime-roc-1.6.1/src/core/runtime/amd_gpu_agent.cpp:43:
/builddir/build/BUILD/ROCR-Runtime-roc-1.6.1/src/core/inc/amd_gpu_agent.h:50:10: fatal error: hsakmt.h: No such file or directory
 #include "hsakmt.h"
          ^~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/hsa-runtime64.dir/build.make:210: CMakeFiles/hsa-runtime64.dir/core/runtime/amd_gpu_agent.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from /builddir/build/BUILD/ROCR-Runtime-roc-1.6.1/src/core/runtime/amd_cpu_agent.cpp:43:
/builddir/build/BUILD/ROCR-Runtime-roc-1.6.1/src/core/inc/amd_cpu_agent.h:50:10: fatal error: hsakmt.h: No such file or directory
 #include "hsakmt.h"
          ^~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/hsa-runtime64.dir/build.make:186: CMakeFiles/hsa-runtime64.dir/core/runtime/amd_cpu_agent.cpp.o] Error 1

See full log on Koji: https://koji.fedoraproject.org/koji/taskinfo?taskID=24623516

Comment 3 Robert-André Mauchin 🐧 2018-02-01 15:19:39 UTC
 Also use the version macro in Source0:

Source0:	https://github.com/RadeonOpenCompute/ROCR-Runtime/archive/roc-%{version}.tar.gz

Comment 4 Robert-André Mauchin 🐧 2018-02-01 15:51:30 UTC
You should also ask the maintainer of hsakmt to update its package because the version included in Fedora is too old. I don't even know how you manage to build it before proposing this review.

https://src.fedoraproject.org/rpms/hsakmt

Comment 5 Tom Stellard 2018-02-01 16:06:08 UTC
The pull request for hsakmt is here: https://src.fedoraproject.org/rpms/hsakmt/pull-request/1

If you add this copr repo to your mock config, then it should build:

https://copr.fedorainfracloud.org/coprs/tstellar/rocm-1.6-upstream/repo/fedora-rawhide/tstellar-rocm-1.6-upstream-fedora-rawhide.repo

Comment 6 Robert-André Mauchin 🐧 2018-02-01 16:42:31 UTC
The maintainer of hsakmt hasn't been active in over a year according to the FAS, you might have to launch a non-responsive maintainer procedure if there is no news from him. https://fedoraproject.org/wiki/Policy_for_nonresponsive_package_maintainers

Comment 7 Tom Stellard 2018-02-06 14:46:02 UTC
Spec URL: http://copr-dist-git.fedorainfracloud.org/cgit/tstellar/rocm-1.6-userspace/rocm-runtime.git/plain/rocm-runtime.spec
SRPM URL: https://copr-be.cloud.fedoraproject.org/results/tstellar/rocm-1.6-userspace/fedora-rawhide-x86_64/00708103-rocm-runtime/rocm-runtime-1.6.1-4.fc28.src.rpm

Here is an updated spec with a gcc-8 build fix and a fix for the Source0 URL.  The update for hsakmt has been merged, so this package should be buildable in rawhide now.

Comment 8 Robert-André Mauchin 🐧 2018-02-06 15:48:24 UTC
[!]: Package must own all directories that it creates.
     Note: Directories without known owners: /usr/include/hsa

     Remove the * to own the directory:

%{_includedir}/hsa/*


Package otherwise approved. Just fix the above error before import.

Package Review
==============

Legend:
[x] = Pass, [!] = Fail, [-] = Not applicable, [?] = Not evaluated
[ ] = Manual review needed



===== MUST items =====

C/C++:
[x]: Package does not contain kernel modules.
[x]: Package contains no static executables.
[x]: Header files in -devel subpackage, if present.
[x]: ldconfig called in %post and %postun if required.
[x]: Package does not contain any libtool archives (.la)
[x]: Rpath absent or only used for internal libs.
[x]: Development (unversioned) .so files in -devel subpackage, if present.

Generic:
[x]: Package is licensed with an open-source compatible license and meets
     other legal requirements as defined in the legal section of Packaging
     Guidelines.
[x]: License field in the package spec file matches the actual license.
     Note: Checking patched sources after %prep for licenses. Licenses
     found: "*No copyright* BSD (3 clause)", "Unknown or generated". 112
     files have unknown license. Detailed output of licensecheck in
     /home/bob/packaging/review/rocm-runtime/review-rocm-
     runtime/licensecheck.txt
[x]: License file installed when any subpackage combination is installed.
[x]: Package requires other packages for directories it uses.
     Note: No known owner of /usr/include/hsa
[!]: Package must own all directories that it creates.
     Note: Directories without known owners: /usr/include/hsa
[x]: %build honors applicable compiler flags or justifies otherwise.
[x]: Package contains no bundled libraries without FPC exception.
[x]: Changelog in prescribed format.
[x]: Sources contain only permissible code or content.
[-]: Package contains desktop file if it is a GUI application.
[x]: Development files must be in a -devel package
[x]: Package uses nothing in %doc for runtime.
[x]: Package consistently uses macros (instead of hard-coded directory
     names).
[x]: Package is named according to the Package Naming Guidelines.
[x]: Package does not generate any conflict.
[x]: Package obeys FHS, except libexecdir and /usr/target.
[-]: If the package is a rename of another package, proper Obsoletes and
     Provides are present.
[x]: Requires correct, justified where necessary.
[x]: Spec file is legible and written in American English.
[-]: Package contains systemd file(s) if in need.
[x]: Useful -debuginfo package or justification otherwise.
[x]: Package is not known to require an ExcludeArch tag.
[-]: Large documentation must go in a -doc subpackage. Large could be size
     (~1MB) or number of files.
     Note: Documentation size is 10240 bytes in 1 files.
[x]: Package complies to the Packaging Guidelines
[x]: Package successfully compiles and builds into binary rpms on at least
     one supported primary architecture.
[x]: Package installs properly.
[x]: Rpmlint is run on all rpms the build produces.
     Note: There are rpmlint messages (see attachment).
[x]: If (and only if) the source package includes the text of the
     license(s) in its own file, then that file, containing the text of the
     license(s) for the package is included in %license.
[x]: Package does not own files or directories owned by other packages.
[x]: Package uses either %{buildroot} or $RPM_BUILD_ROOT
[x]: Package does not run rm -rf %{buildroot} (or $RPM_BUILD_ROOT) at the
     beginning of %install.
[x]: Macros in Summary, %description expandable at SRPM build time.
[x]: Dist tag is present.
[x]: Package does not contain duplicates in %files.
[x]: Permissions on files are set properly.
[x]: Package use %makeinstall only when make install DESTDIR=... doesn't
     work.
[x]: Package is named using only allowed ASCII characters.
[x]: Package does not use a name that already exists.
[x]: Package is not relocatable.
[x]: Sources used to build the package match the upstream source, as
     provided in the spec URL.
[x]: Spec file name must match the spec package %{name}, in the format
     %{name}.spec.
[x]: File names are valid UTF-8.
[x]: Packages must not store files under /srv, /opt or /usr/local

===== SHOULD items =====

Generic:
[-]: If the source package does not include license text(s) as a separate
     file from upstream, the packager SHOULD query upstream to include it.
[x]: Final provides and requires are sane (see attachments).
[?]: Package functions as described.
[!]: Latest version is packaged.
[x]: Package does not include license text files separate from upstream.
[x]: Patches link to upstream bugs/comments/lists or are otherwise
     justified.
[x]: Scriptlets must be sane, if used.
[-]: Description and summary sections in the package spec file contains
     translations for supported Non-English languages, if available.
[x]: Package should compile and build into binary rpms on all supported
     architectures.
[x]: %check is present and all tests pass.
[x]: Packages should try to preserve timestamps of original installed
     files.
[x]: Reviewer should test that the package builds in mock.
[x]: Buildroot is not present
[x]: Package has no %clean section with rm -rf %{buildroot} (or
     $RPM_BUILD_ROOT)
[x]: No file requires outside of /etc, /bin, /sbin, /usr/bin, /usr/sbin.
[x]: Fully versioned dependency in subpackages if applicable.
[x]: Packager, Vendor, PreReq, Copyright tags should not be in spec file
[x]: Sources can be downloaded from URI in Source: tag
[x]: SourceX is a working URL.
[x]: Spec use %global instead of %define unless justified.

===== EXTRA items =====

Generic:
[x]: Rpmlint is run on debuginfo package(s).
     Note: No rpmlint messages.
[x]: Rpmlint is run on all installed packages.
     Note: There are rpmlint messages (see attachment).
[x]: Large data in /usr/share should live in a noarch subpackage if package
     is arched.
[x]: Spec file according to URL is the same as in SRPM.


Rpmlint
-------
Checking: rocm-runtime-1.6.1-4.fc28.x86_64.rpm
          rocm-runtime-devel-1.6.1-4.fc28.x86_64.rpm
          rocm-runtime-debuginfo-1.6.1-4.fc28.x86_64.rpm
          rocm-runtime-debugsource-1.6.1-4.fc28.x86_64.rpm
          rocm-runtime-1.6.1-4.fc28.src.rpm
rocm-runtime-devel.x86_64: W: only-non-binary-in-usr-lib
rocm-runtime-devel.x86_64: W: no-documentation
rocm-runtime-debugsource.x86_64: W: no-documentation
rocm-runtime.src:51: E: hardcoded-library-path in %{buildroot}/usr/lib/libhsa-runtime64.so
5 packages and 0 specfiles checked; 1 errors, 3 warnings.

Comment 10 Gwyn Ciesla 2018-02-06 22:22:34 UTC
(fedrepo-req-admin):  The Pagure repository was created at https://src.fedoraproject.org/rpms/rocm-runtime

Comment 11 Ariel 2018-07-30 17:34:30 UTC
Tom - does this imply that Fedora 29 will enable openCL via ROCM when the system has a supported GPU (ie. CL-info will list ROCM as one of its detected options, and apps like darktable will be able to use it)?
I.e. we will no longer need amd-gpu-pro in order to use full openCL acceleration?

Comment 12 Tom Stellard 2018-07-30 20:15:55 UTC
No, this is only the base run-time for ROCm.  OpenCL would need to be done in a separate packages.

Comment 13 Ariel 2018-07-30 22:12:44 UTC
OK thanks, I see. Still having this is in will make building the opencl runtime much simpler hopefully. I assume that in order to get the base run time to work you needed the kernel driver / KFD to be included as well.
Do you know if there has been a ROCm opencl fedora package submission yet?

Comment 14 Tom Stellard 2018-07-30 22:27:46 UTC
There has not been a ROCm OpenCL submission that I know of.


Note You need to log in before you can comment on or make changes to this bug.