[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
04/11: gnu: Add rocm-comgr.
From: |
guix-commits |
Subject: |
04/11: gnu: Add rocm-comgr. |
Date: |
Sun, 8 Aug 2021 10:57:27 -0400 (EDT) |
lbraun pushed a commit to branch master
in repository guix.
commit 9c083e706329909d41ab13d0721e726031ab78c7
Author: Lars-Dominik Braun <lars@6xq.net>
AuthorDate: Fri Aug 6 08:21:20 2021 +0200
gnu: Add rocm-comgr.
* gnu/packages/rocm.scm (rocm-comgr): New variable.
* gnu/packages/patches/rocm-comgr-3.1.0-dependencies.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
---
gnu/local.mk | 1 +
.../patches/rocm-comgr-3.1.0-dependencies.patch | 52 ++++++++++++++++++++++
gnu/packages/rocm.scm | 32 +++++++++++++
3 files changed, 85 insertions(+)
diff --git a/gnu/local.mk b/gnu/local.mk
index 59dc7b0..d545db3 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1701,6 +1701,7 @@ dist_patch_DATA =
\
%D%/packages/patches/rnp-add-version.cmake.patch \
%D%/packages/patches/rnp-disable-ruby-rnp-tests.patch \
%D%/packages/patches/rnp-unbundle-googletest.patch \
+ %D%/packages/patches/rocm-comgr-3.1.0-dependencies.patch \
%D%/packages/patches/ruby-sanitize-system-libxml.patch \
%D%/packages/patches/rust-1.19-mrustc.patch \
%D%/packages/patches/rust-1.25-accept-more-detailed-gdb-lines.patch \
diff --git a/gnu/packages/patches/rocm-comgr-3.1.0-dependencies.patch
b/gnu/packages/patches/rocm-comgr-3.1.0-dependencies.patch
new file mode 100644
index 0000000..c91d273
--- /dev/null
+++ b/gnu/packages/patches/rocm-comgr-3.1.0-dependencies.patch
@@ -0,0 +1,52 @@
+https://github.com/RadeonOpenCompute/ROCm-CompilerSupport/pull/25
+
+From c65cba2e73f9118e128b9ab7e655ee0f8a7798e7 Mon Sep 17 00:00:00 2001
+From: Craig Andrews <candrews@integralblue.com>
+Date: Sun, 1 Mar 2020 19:24:22 -0500
+Subject: [PATCH] Link additional required LLVM libraries
+
+Without these additional required dependencies, linking fails with errors such
as:
+`undefined reference to llvm::errs()'`
+---
+ CMakeLists.txt | 20 ++++++++++++++++++--
+ 1 file changed, 18 insertions(+), 2 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 1794a07..c7b852a 100644
+--- a/lib/comgr/CMakeLists.txt
++++ b/lib/comgr/CMakeLists.txt
+@@ -207,7 +207,11 @@ install(FILES
+ DESTINATION "${AMD_COMGR_PACKAGE_PREFIX}")
+
+ set(CLANG_LIBS
+- clangFrontendTool)
++ clangFrontendTool
++ clangFrontend
++ clangBasic
++ clangDriver
++ clangSerialization)
+
+ set(LLD_LIBS
+ lldELF
+@@ -218,8 +222,20 @@ if (LLVM_LINK_LLVM_DYLIB)
+ else()
+ llvm_map_components_to_libnames(LLVM_LIBS
+ ${LLVM_TARGETS_TO_BUILD}
++ Option
+ DebugInfoDWARF
+- Symbolize)
++ Symbolize
++ Support
++ Object
++ BitWriter
++ MC
++ MCParser
++ MCDisassembler
++ Core
++ IRReader
++ CodeGen
++ Linker
++ BinaryFormat)
+ endif()
+
+ target_link_libraries(amd_comgr
diff --git a/gnu/packages/rocm.scm b/gnu/packages/rocm.scm
index 48d7099..5ecc741 100644
--- a/gnu/packages/rocm.scm
+++ b/gnu/packages/rocm.scm
@@ -115,3 +115,35 @@ tasks needed for the ROCM software stack.")
(description "AMD-specific device-side language runtime libraries, namely
oclc, ocml, ockl, opencl, hip and hc.")
(license license:ncsa)))
+
+(define-public rocm-comgr
+ (package
+ (name "rocm-comgr")
+ (version %rocm-version)
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url
"https://github.com/RadeonOpenCompute/ROCm-CompilerSupport.git")
+ (commit (string-append "rocm-" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0bakbm7shr0l67lph44b5cnc9psd6rivg1mp79qizaawkn380x60"))
+ (patches
+ (search-patches "rocm-comgr-3.1.0-dependencies.patch"))))
+ (build-system cmake-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'chdir
+ (lambda _
+ (chdir "lib/comgr"))))))
+ (inputs
+ `(("rocm-device-libs" ,rocm-device-libs)
+ ("llvm" ,llvm-for-rocm)
+ ("lld" ,lld)))
+ (home-page "https://github.com/RadeonOpenCompute/ROCm-CompilerSupport")
+ (synopsis "ROCm Code Object Manager")
+ (description "The Comgr library provides APIs for compiling and inspecting
+AMDGPU code objects.")
+ (license license:ncsa)))
- branch master updated (a75cc5f -> e81cf4e), guix-commits, 2021/08/08
- 02/11: gnu: Add llvm-for-rocm., guix-commits, 2021/08/08
- 01/11: gnu: Add rocm-cmake., guix-commits, 2021/08/08
- 04/11: gnu: Add rocm-comgr.,
guix-commits <=
- 07/11: gnu: Add rocclr., guix-commits, 2021/08/08
- 06/11: gnu: Add rocr-runtime., guix-commits, 2021/08/08
- 10/11: gnu: Add rocm-bandwidth-test., guix-commits, 2021/08/08
- 09/11: gnu: Add rocminfo., guix-commits, 2021/08/08
- 08/11: gnu: Add rocm-opencl-runtime., guix-commits, 2021/08/08
- 11/11: gnu: darktable: Add compatibility for ROCm., guix-commits, 2021/08/08
- 05/11: gnu: Add roct-thunk-interface., guix-commits, 2021/08/08
- 03/11: gnu: Add rocm-device-libs., guix-commits, 2021/08/08