summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCraig Andrews <candrews@gentoo.org>2019-12-29 17:20:14 -0500
committerCraig Andrews <candrews@gentoo.org>2019-12-29 17:21:55 -0500
commit6b973845a45a631ee62677847ee4b6ea0b3d7337 (patch)
tree97e422ca51c7a5b2163dffa73a9769a2c6b46a4c /dev-libs/rocm-opencl-runtime
parentdev-libs/rocm-comgr: 3.0.0 version bump (diff)
downloadgentoo-6b973845a45a631ee62677847ee4b6ea0b3d7337.tar.gz
gentoo-6b973845a45a631ee62677847ee4b6ea0b3d7337.tar.bz2
gentoo-6b973845a45a631ee62677847ee4b6ea0b3d7337.zip
dev-libs/rocm-opencl-runtime: 3.0.0 version bump
Package-Manager: Portage-2.3.84, Repoman-2.3.20 Signed-off-by: Craig Andrews <candrews@gentoo.org>
Diffstat (limited to 'dev-libs/rocm-opencl-runtime')
-rw-r--r--dev-libs/rocm-opencl-runtime/Manifest1
-rw-r--r--dev-libs/rocm-opencl-runtime/files/rocm-opencl-runtime-3.0.0-change-install-location.patch147
-rw-r--r--dev-libs/rocm-opencl-runtime/rocm-opencl-runtime-3.0.0.ebuild58
3 files changed, 206 insertions, 0 deletions
diff --git a/dev-libs/rocm-opencl-runtime/Manifest b/dev-libs/rocm-opencl-runtime/Manifest
index 20a196694f63..3e9db010b8e3 100644
--- a/dev-libs/rocm-opencl-runtime/Manifest
+++ b/dev-libs/rocm-opencl-runtime/Manifest
@@ -4,3 +4,4 @@ DIST rocm-opencl-runtime-2.10.0.tar.gz 965836 BLAKE2B 2eeb3449939389d684b016a5ea
DIST rocm-opencl-runtime-2.6.0.tar.gz 986155 BLAKE2B 43469ec3a368e2ee9716a38d08df48c28165a233bd80de54f286011df25782a197e252e8e41ffa8f59eecf93d6beae5434497e8d4b648676252d32a0859ba59a SHA512 bbbbd29bf23f93440135786600cca28a806714bb207b7ad0947d26471fa38470820e7801acc84380000d43d55ff2ec1d95cee9e64b500628b6a3b026744c67df
DIST rocm-opencl-runtime-2.8.0.tar.gz 976851 BLAKE2B 4191c2f027f615a8ba7a38d30364549df509e6bd432e5bfe3d30d40fb6bade15b58fe824b5aa9704e5d93421f28e1067d283738fa85e7ec59a444f5be25c963c SHA512 6c070d3e2f455d96f028f614f0562c0b8983b457c6295c398d6d4574133d4a7384573caa1f32e39550887861aa09aa19c9e34fc8bbae6ddc41ae395969d33540
DIST rocm-opencl-runtime-2.9.0.tar.gz 980980 BLAKE2B b72c9659ca8ac6b12d0c5c8c204a2a481c9e057e1b6aa80e24b57e141538c345025bfe74143ee2450bb013ff1b45a314538965fdc071a6e925967368baabfb94 SHA512 9d9742da94d4dd7326e6f64042418726f8fcaa05b3a02b6a7760b2f17067747a2a5f37183a4245697211ceb21e4fa0870dfeca9970b4fd3794985311d6ff7d0f
+DIST rocm-opencl-runtime-3.0.0.tar.gz 974702 BLAKE2B 2cc1eaf1aa8d8cc80de698b587bf38cfebd51b31959b9d0150e4f01ea1b41240b0311cad156c48cf531207f1a120d2151f38679a8bc4cef1e73c9c8e56dcaf45 SHA512 2a47deda34544832421fd8110dd437eaeab3a1fca498a9ac14e825402d48e81fb9fe065d078bc8bf112e0534a750fdf81a29bf5979b42f9925b1561f7bcbf6e7
diff --git a/dev-libs/rocm-opencl-runtime/files/rocm-opencl-runtime-3.0.0-change-install-location.patch b/dev-libs/rocm-opencl-runtime/files/rocm-opencl-runtime-3.0.0-change-install-location.patch
new file mode 100644
index 000000000000..eb1901f6a1ed
--- /dev/null
+++ b/dev-libs/rocm-opencl-runtime/files/rocm-opencl-runtime-3.0.0-change-install-location.patch
@@ -0,0 +1,147 @@
+--- a/CMakeLists.txt 2019-12-28 09:34:17.470030419 +0100
++++ b/CMakeLists.txt 2019-12-28 09:32:14.939030886 +0100
+@@ -21,12 +21,26 @@
+
+ project(rocm-opencl)
+
++include (GNUInstallDirs)
++
+ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake" "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules")
+ set(OPENCL_ICD_LOADER_HEADERS_DIR "${CMAKE_CURRENT_SOURCE_DIR}/api/opencl/khronos/headers/opencl2.2" CACHE PATH "")
+
+ find_package(ROCT REQUIRED)
+ find_package(ROCR REQUIRED)
+
++find_package(LLVM REQUIRED CONFIG PATHS ${LLVM_DIR} "/opt/rocm/llvm" NO_DEFAULT_PATH)
++set(USE_COMGR_LIBRARY "yes")
++find_package(amd_comgr REQUIRED CONFIG)
++add_definitions(-DUSE_COMGR_LIBRARY)
++FOREACH(DIR ${LLVM_INCLUDE_DIRS})
++ include_directories("${DIR}")
++ include_directories("${DIR}/clang")
++ include_directories("${DIR}/lld")
++ # TODO: move AMDGPU.h header to include folder
++ include_directories("${DIR}/llvm/Target/AMDGPU")
++ENDFOREACH()
++
+ # FIXME: Remove following if block after enabling COMGR by default
+ if (${USE_COMGR_LIBRARY} STREQUAL "no")
+ set(LLVM_INCLUDE_TESTS OFF CACHE BOOL "")
+@@ -39,29 +53,19 @@
+ # override default option value in library and driver
+ set(GENERIC_IS_ZERO ON CACHE BOOL ON FORCE)
+
+- add_subdirectory(compiler/llvm EXCLUDE_FROM_ALL)
+-
+- find_package(LLVM REQUIRED CONFIG PATHS ${CMAKE_BINARY_DIR}/compiler/llvm NO_DEFAULT_PATH)
++ find_package(LLVM REQUIRED CONFIG PATHS ${LLVM_DIR} "/opt/rocm/llvm" NO_DEFAULT_PATH)
+
+ list(APPEND CMAKE_MODULE_PATH "${LLVM_CMAKE_DIR}")
+ include(AddLLVM)
+
+ add_definitions(${LLVM_DEFINITIONS})
+- # TODO: add find_package for Clang and lld, and also use LLVM/Clang variables got from their config
+- include_directories(${CMAKE_SOURCE_DIR}/compiler/llvm/tools/clang/include)
+- include_directories(${CMAKE_BINARY_DIR}/compiler/llvm/tools/clang/include)
+- include_directories(${CMAKE_SOURCE_DIR}/compiler/llvm/tools/lld/include)
+-
+- # TODO: move AMDGPU.h header to include folder
+- include_directories(${CMAKE_SOURCE_DIR}/compiler/llvm/lib/Target/AMDGPU)
+- include_directories(${CMAKE_BINARY_DIR}/compiler/llvm/lib/Target/AMDGPU)
+
+ set(BUILD_HC_LIB OFF CACHE BOOL "")
+ set(ROCM_DEVICELIB_INCLUDE_TESTS OFF CACHE BOOL "")
+ set(AMDGCN_TARGETS_LIB_LIST "AMDGCN_LIB_TARGETS")
+ set(AMDGCN_TARGETS_LIB_DEPS "AMDGCN_DEP_TARGETS")
+ set(AMDGPU_TARGET_TRIPLE "amdgcn-amd-amdhsa")
+- add_subdirectory(library/amdgcn EXCLUDE_FROM_ALL)
++
+ add_subdirectory(compiler/driver EXCLUDE_FROM_ALL)
+
+ install(PROGRAMS $<TARGET_FILE:clang> $<TARGET_FILE:lld>
+@@ -77,22 +81,22 @@
+ endforeach()
+ endif() # if (${USE_COMGR_LIBRARY} STREQUAL "no")
+
+-if(${USE_COMGR_LIBRARY} MATCHES "yes")
+- set(COMGR_DYN_DLL "yes")
+- add_definitions(-DCOMGR_DYN_DLL)
+- add_definitions(-DUSE_COMGR_LIBRARY)
+- if( ${BUILD_HIP} MATCHES "yes")
+- add_subdirectory(api/hip)
+- endif()
+-endif()
++#if(${USE_COMGR_LIBRARY} MATCHES "yes")
++# set(COMGR_DYN_DLL "yes")
++# add_definitions(-DCOMGR_DYN_DLL)
++# add_definitions(-DUSE_COMGR_LIBRARY)
++# if( ${BUILD_HIP} MATCHES "yes")
++# add_subdirectory(api/hip)
++# endif()
++#endif()
+
+ add_subdirectory(api/opencl/amdocl)
+ add_subdirectory(compiler/lib/loaders/elf/utils/libelf)
+ add_subdirectory(runtime)
+-add_subdirectory(tools/clinfo)
++#add_subdirectory(tools/clinfo)
+
+ set(BUILD_SHARED_LIBS "Build shared libs" ON)
+-add_subdirectory(api/opencl/khronos/icd)
++#add_subdirectory(api/opencl/khronos/icd)
+
+ ###--- Packaging ------------------------------------------------------------###
+
+@@ -101,31 +105,31 @@
+ rocm_setup_version( VERSION "2.0.0" )
+
+ # MAIN package
+-install(PROGRAMS $<TARGET_FILE:clinfo>
+- DESTINATION bin/x86_64
+- COMPONENT MAIN)
++#install(PROGRAMS $<TARGET_FILE:clinfo>
++# DESTINATION bin/x86_64
++# COMPONENT MAIN)
+ install(PROGRAMS $<TARGET_FILE:amdocl64>
+- DESTINATION lib/x86_64
+- COMPONENT MAIN)
+-install(PROGRAMS $<TARGET_FILE:OpenCL>
+- DESTINATION lib/x86_64
+- COMPONENT MAIN)
+-install(PROGRAMS $<TARGET_SONAME_FILE:OpenCL>
+- DESTINATION lib/x86_64
++ DESTINATION lib64
+ COMPONENT MAIN)
++#install(PROGRAMS $<TARGET_FILE:OpenCL>
++# DESTINATION lib/x86_64
++# COMPONENT MAIN)
++#install(PROGRAMS $<TARGET_SONAME_FILE:OpenCL>
++# DESTINATION lib/x86_64
++# COMPONENT MAIN)
+
+ # DEV package
+-install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/api/opencl/khronos/headers/opencl2.2/CL"
+- DESTINATION include
+- COMPONENT DEV
+- USE_SOURCE_PERMISSIONS
+- PATTERN cl_d3d10.h EXCLUDE
+- PATTERN cl_d3d11.h EXCLUDE
+- PATTERN cl_dx9_media_sharing.h EXCLUDE
+- PATTERN cl_egl.h EXCLUDE)
+-install(PROGRAMS $<TARGET_LINKER_FILE:OpenCL>
+- DESTINATION lib/x86_64
+- COMPONENT DEV)
++#install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/api/opencl/khronos/headers/opencl2.2/CL"
++# DESTINATION include
++# COMPONENT DEV
++# USE_SOURCE_PERMISSIONS
++# PATTERN cl_d3d10.h EXCLUDE
++# PATTERN cl_d3d11.h EXCLUDE
++# PATTERN cl_dx9_media_sharing.h EXCLUDE
++# PATTERN cl_egl.h EXCLUDE)
++#install(PROGRAMS $<TARGET_LINKER_FILE:OpenCL>
++# DESTINATION lib/x86_64
++# COMPONENT DEV)
+
+ # Generic CPACK variables
+ set(CPACK_GENERATOR "DEB;RPM" CACHE STRING "Default packaging generators")
diff --git a/dev-libs/rocm-opencl-runtime/rocm-opencl-runtime-3.0.0.ebuild b/dev-libs/rocm-opencl-runtime/rocm-opencl-runtime-3.0.0.ebuild
new file mode 100644
index 000000000000..b57b49b69659
--- /dev/null
+++ b/dev-libs/rocm-opencl-runtime/rocm-opencl-runtime-3.0.0.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake-utils
+
+OPENCL_ICD_COMMIT="6c03f8b58fafd9dd693eaac826749a5cfad515f8"
+SRC_URI="https://github.com/KhronosGroup/OpenCL-ICD-Loader/archive/${OPENCL_ICD_COMMIT}.tar.gz -> OpenCL-ICD-Loader-${OPENCL_ICD_COMMIT}.tar.gz"
+if [[ ${PV} == *9999 ]] ; then
+ EGIT_REPO_URI="https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime/"
+ inherit git-r3
+else
+ SRC_URI+=" https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime/archive/roc-${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64"
+ S="${WORKDIR}/ROCm-OpenCL-Runtime-roc-${PV}"
+fi
+
+DESCRIPTION="Radeon Open Compute OpenCL Compatible Runtime"
+HOMEPAGE="https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime"
+
+LICENSE="Apache-2.0 MIT"
+SLOT="0/$(ver_cut 1-2)"
+
+RDEPEND=">=dev-libs/rocr-runtime-${PV}
+ >=dev-libs/rocm-comgr-${PV}
+ >=dev-libs/rocm-device-libs-${PV}
+ dev-libs/ocl-icd[khronos-headers]
+ media-libs/mesa"
+DEPEND="${RDEPEND}
+ dev-lang/ocaml
+ dev-ml/findlib"
+BDEPEND=">=dev-util/rocm-cmake-${PV}"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-3.0.0-change-install-location.patch"
+ "${FILESDIR}/${PN}-2.8.0-change-AMDCompilerh.patch"
+ "${FILESDIR}/${PN}-2.8.0-change-opencl.patch"
+ "${FILESDIR}/${PN}-2.8.0-update-README.patch"
+ "${FILESDIR}/${PN}-2.8.0-amdocl64icd.patch"
+)
+
+src_prepare() {
+ mkdir -p "${S}"/api/opencl/khronos/ || die
+ mv "${WORKDIR}/OpenCL-ICD-Loader-${OPENCL_ICD_COMMIT}" "${S}"/api/opencl/khronos/icd || die
+ [ -d tools/clinfo ] && rm -rf tools/clinfo || die
+ cmake-utils_src_prepare
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DUSE_COMGR_LIBRARY=yes
+ -DLLVM_DIR="${EPREFIX}/usr/lib/llvm/roc/"
+ -DClang_DIR="${EPREFIX}/usr/lib/llvm/roc/lib/cmake/clang/"
+ -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/"
+ )
+ cmake-utils_src_configure
+}