* [gentoo-commits] repo/gentoo:master commit in: dev-libs/rocm-opencl-runtime/, dev-libs/rocm-opencl-runtime/files/
@ 2019-12-29 22:22 Craig Andrews
0 siblings, 0 replies; 5+ messages in thread
From: Craig Andrews @ 2019-12-29 22:22 UTC (permalink / raw
To: gentoo-commits
commit: 6b973845a45a631ee62677847ee4b6ea0b3d7337
Author: Craig Andrews <candrews <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 29 22:20:14 2019 +0000
Commit: Craig Andrews <candrews <AT> gentoo <DOT> org>
CommitDate: Sun Dec 29 22:21:55 2019 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6b973845
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 <AT> gentoo.org>
dev-libs/rocm-opencl-runtime/Manifest | 1 +
...ncl-runtime-3.0.0-change-install-location.patch | 147 +++++++++++++++++++++
.../rocm-opencl-runtime-3.0.0.ebuild | 58 ++++++++
3 files changed, 206 insertions(+)
diff --git a/dev-libs/rocm-opencl-runtime/Manifest b/dev-libs/rocm-opencl-runtime/Manifest
index 20a196694f6..3e9db010b8e 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 00000000000..eb1901f6a1e
--- /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 00000000000..b57b49b6965
--- /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
+}
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/rocm-opencl-runtime/, dev-libs/rocm-opencl-runtime/files/
@ 2020-08-23 15:30 Craig Andrews
0 siblings, 0 replies; 5+ messages in thread
From: Craig Andrews @ 2020-08-23 15:30 UTC (permalink / raw
To: gentoo-commits
commit: 7553658cd43dbd2dfd1eb13ed5be4ecd84d76d40
Author: Wilfried Holzke <gentoo <AT> holzke <DOT> net>
AuthorDate: Sun Aug 23 15:34:36 2020 +0000
Commit: Craig Andrews <candrews <AT> gentoo <DOT> org>
CommitDate: Sun Aug 23 15:30:53 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7553658c
dev-libs/rocm-opencl-runtime: Version bump to 3.7.0
Signed-off-by: Wilfried Holzke <gentoo <AT> holzke.net>
Package-Manager: Portage-2.3.103, Repoman-2.3.23
Closes: https://github.com/gentoo/gentoo/pull/17237
Signed-off-by: Craig Andrews <candrews <AT> gentoo.org>
dev-libs/rocm-opencl-runtime/Manifest | 1 +
...time-3.7.0-add-rocclr-include-directories.patch | 11 +++
.../rocm-opencl-runtime-3.7.0-amdocl64icd.patch | 10 +++
...ncl-runtime-3.7.0-change-install-location.patch | 79 ++++++++++++++++++++++
.../rocm-opencl-runtime-3.7.0.ebuild | 69 +++++++++++++++++++
5 files changed, 170 insertions(+)
diff --git a/dev-libs/rocm-opencl-runtime/Manifest b/dev-libs/rocm-opencl-runtime/Manifest
index 61c9de050a5..3f9bc8f9f6f 100644
--- a/dev-libs/rocm-opencl-runtime/Manifest
+++ b/dev-libs/rocm-opencl-runtime/Manifest
@@ -3,3 +3,4 @@ DIST rocm-opencl-runtime-3.0.0.tar.gz 974702 BLAKE2B 2cc1eaf1aa8d8cc80de698b587b
DIST rocm-opencl-runtime-3.1.0.tar.gz 969782 BLAKE2B efe3cba6122273900fec80f577c45b5a93816cfd3cadbffaa36df258ea163ecc9d47530da0aa012fd7797c431506deb96fd3642c160470e2b78af75bc9fd56f6 SHA512 1665c30349547e6404563b1b1dd4258af5ab8106a66d65d6f94e7eb3ef51b2da9bc71878330c0c7ec21842e17a97e910a36be9b06fbdeab3de84bebe3a65c9db
DIST rocm-opencl-runtime-3.3.0.tar.gz 969871 BLAKE2B 5dae88abc5861752b45f2b7e72a4d774786d0363a6da633d2ca1386a002374243a0655e8c5bc4aaa7a7db528f3c9bd5e6e1298561d3b06ce935865b6f0106172 SHA512 10c892cebca3db031b69ef3e1521fa11e49f40b18b621983f4f0902c9f563ff178d543fd1a05f6217f817838499436adaac883f7b474b64a54ce9eeb482382e5
DIST rocm-opencl-runtime-3.5.0.tar.gz 734076 BLAKE2B cc6992999188968c628b378f637c8073c99381fab42e05d7d9d89d75fe9f2bd3d573f61f00a18c078542f7fc4a3a856385d0f34fa9bb599dd63de8be18594bdf SHA512 658649c3f13d32308f8f031f26b62c20bda4841059b5ea0db5c6a827af26b07aa0bdee07a461cc4b3c37108b3f25ae59b1658fab30125f84c0729fb57c2fa014
+DIST rocm-opencl-runtime-3.7.0.tar.gz 1004361 BLAKE2B 7fa9481c77884dda15a3b0335449b2879fbac000f644fc56bbd8d06c5fd77d8355f159b9b7e8920f06351e388d0df41379b7e1fcff51cf81714a28f902218e42 SHA512 6ea509dde0290f13e66497eaad587099ed6a98df967adce207afc857ecd961b65801332ca74e36173719488639480cfcffc625a007345d0e48c10c8a0efdfa3f
diff --git a/dev-libs/rocm-opencl-runtime/files/rocm-opencl-runtime-3.7.0-add-rocclr-include-directories.patch b/dev-libs/rocm-opencl-runtime/files/rocm-opencl-runtime-3.7.0-add-rocclr-include-directories.patch
new file mode 100644
index 00000000000..357b97c7f49
--- /dev/null
+++ b/dev-libs/rocm-opencl-runtime/files/rocm-opencl-runtime-3.7.0-add-rocclr-include-directories.patch
@@ -0,0 +1,11 @@
+--- a/amdocl/CMakeLists.txt 2020-08-23 10:11:28.227839351 +0200
++++ b/amdocl/CMakeLists.txt 2020-08-23 10:44:34.929831772 +0200
+@@ -23,6 +23,8 @@
+ include_directories(${CMAKE_SOURCE_DIR}/khronos)
+ include_directories(${CMAKE_SOURCE_DIR}/khronos/headers)
+ include_directories(${CMAKE_SOURCE_DIR}/khronos/headers/opencl2.2)
++include_directories(/usr/include/rocclr)
++include_directories(/usr/include/rocclr/compiler/lib/include/)
+
+ if((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") OR
+ (CMAKE_${COMPILER}_COMPILER_ID MATCHES "Clang"))
diff --git a/dev-libs/rocm-opencl-runtime/files/rocm-opencl-runtime-3.7.0-amdocl64icd.patch b/dev-libs/rocm-opencl-runtime/files/rocm-opencl-runtime-3.7.0-amdocl64icd.patch
new file mode 100644
index 00000000000..6541c69bd48
--- /dev/null
+++ b/dev-libs/rocm-opencl-runtime/files/rocm-opencl-runtime-3.7.0-amdocl64icd.patch
@@ -0,0 +1,10 @@
+--- a/amdocl/CMakeLists.txt 2020-08-23 10:11:28.227839351 +0200
++++ b/amdocl/CMakeLists.txt 2020-08-23 10:12:03.697839216 +0200
+@@ -76,3 +76,7 @@
+ add_library(amdocl64 SHARED ${amdocl64_src})
+
+ target_link_libraries(amdocl64 amdrocclr_static Threads::Threads dl ${ADDITIONAL_LIBRARIES})
++
++file(GENERATE OUTPUT "${CMAKE_BINARY_DIR}/amdocl64.icd" CONTENT "$<TARGET_FILE_NAME:amdocl64>")
++install(FILES "${CMAKE_BINARY_DIR}/amdocl64.icd" DESTINATION "${CMAKE_INSTALL_FULL_SYSCONFDIR}/OpenCL/vendors/")
++
diff --git a/dev-libs/rocm-opencl-runtime/files/rocm-opencl-runtime-3.7.0-change-install-location.patch b/dev-libs/rocm-opencl-runtime/files/rocm-opencl-runtime-3.7.0-change-install-location.patch
new file mode 100644
index 00000000000..77ce5e9bd33
--- /dev/null
+++ b/dev-libs/rocm-opencl-runtime/files/rocm-opencl-runtime-3.7.0-change-install-location.patch
@@ -0,0 +1,79 @@
+--- a/CMakeLists.txt 2020-08-23 10:14:54.337838565 +0200
++++ b/CMakeLists.txt 2020-08-23 10:18:26.993837753 +0200
+@@ -14,6 +14,8 @@
+ #example command:
+ # cmake -DCMAKE_PREFIX_PATH=/path/to/ROCclr/build/or/install ..
+
++include (GNUInstallDirs)
++
+ set(OPENCL_ICD_LOADER_HEADERS_DIR "${CMAKE_CURRENT_SOURCE_DIR}/khronos/headers/opencl2.2" CACHE PATH "")
+ option(BUILD_SHARED_LIBS "Build shared libs" ON)
+
+@@ -60,7 +62,7 @@
+
+ add_subdirectory(khronos/icd)
+ add_subdirectory(amdocl)
+-add_subdirectory(tools/clinfo)
++#add_subdirectory(tools/clinfo)
+ add_subdirectory(tools/cltrace)
+ if(BUILD_TESTS)
+ add_subdirectory(tests/ocltst)
+@@ -96,34 +98,34 @@
+ ###--- Packaging ------------------------------------------------------------###
+
+ # MAIN package
+-install(PROGRAMS $<TARGET_FILE:clinfo>
+- DESTINATION bin
+- COMPONENT MAIN)
+-install(PROGRAMS $<TARGET_FILE:cltrace>
+- DESTINATION lib
+- COMPONENT MAIN)
++#install(PROGRAMS $<TARGET_FILE:clinfo>
++# DESTINATION bin
++# COMPONENT MAIN)
++#install(PROGRAMS $<TARGET_FILE:cltrace>
++# DESTINATION lib
++# COMPONENT MAIN)
+ install(PROGRAMS $<TARGET_FILE:amdocl64>
+- DESTINATION lib
+- COMPONENT MAIN)
+-install(PROGRAMS $<TARGET_FILE:OpenCL>
+- DESTINATION lib
+- COMPONENT MAIN)
+-install(PROGRAMS $<TARGET_SONAME_FILE:OpenCL>
+- DESTINATION lib
++ DESTINATION lib64
+ COMPONENT MAIN)
++#install(PROGRAMS $<TARGET_FILE:OpenCL>
++# DESTINATION lib
++# COMPONENT MAIN)
++#install(PROGRAMS $<TARGET_SONAME_FILE:OpenCL>
++# DESTINATION lib
++# COMPONENT MAIN)
+
+ # DEV package
+-install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/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
+- COMPONENT DEV)
++#install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/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
++# COMPONENT DEV)
+
+ #############################
+ # Packaging steps
diff --git a/dev-libs/rocm-opencl-runtime/rocm-opencl-runtime-3.7.0.ebuild b/dev-libs/rocm-opencl-runtime/rocm-opencl-runtime-3.7.0.ebuild
new file mode 100644
index 00000000000..5a1a4386433
--- /dev/null
+++ b/dev-libs/rocm-opencl-runtime/rocm-opencl-runtime-3.7.0.ebuild
@@ -0,0 +1,69 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake
+
+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-rocm-${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/rocclr-${PV}
+ >=dev-libs/rocm-comgr-${PV}
+ >=dev-libs/rocm-device-libs-${PV}
+ >=virtual/opencl-3
+ media-libs/mesa"
+DEPEND="${RDEPEND}
+ dev-lang/ocaml
+ dev-ml/findlib"
+BDEPEND=">=dev-util/rocm-cmake-${PV}"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-3.7.0-change-install-location.patch"
+ "${FILESDIR}/${PN}-3.5.0-do-not-install-libopencl.patch"
+ "${FILESDIR}/${PN}-3.7.0-add-rocclr-include-directories.patch"
+ "${FILESDIR}/${PN}-3.7.0-amdocl64icd.patch"
+)
+
+src_prepare() {
+ # Remove "clinfo" - use "dev-util/clinfo" instead
+ [ -d tools/clinfo ] && rm -rf tools/clinfo || die
+
+ # Wrong position of a '"' results in a list of strings instead of a single string and the build fails...
+ sed -e "s:set(CMAKE_SHARED_LINKER_FLAGS \${CMAKE_SHARED_LINKER_FLAGS} \":set(CMAKE_SHARED_LINKER_FLAGS \"\${CMAKE_SHARED_LINKER_FLAGS} :" -i "${S}/amdocl/CMakeLists.txt"
+
+ cmake_src_prepare
+}
+
+src_configure() {
+ # Reported upstream: https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime/issues/120
+ append-cflags -fcommon
+
+ local mycmakeargs=(
+ -DUSE_COMGR_LIBRARY=yes
+ -DROCclr_DIR="${EPREFIX}/usr/include/rocclr"
+ -DLIBROCclr_STATIC_DIR="${EPREFIX}/usr/lib/cmake/rocclr"
+ )
+ cmake_src_configure
+}
+
+src_install() {
+ cd "${BUILD_DIR}" || die
+ insinto /etc/OpenCL/vendors
+ doins amdocl64.icd
+ insinto /usr/lib64
+ doins lib/libamdocl64.so
+}
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/rocm-opencl-runtime/, dev-libs/rocm-opencl-runtime/files/
@ 2023-02-10 4:26 Sam James
0 siblings, 0 replies; 5+ messages in thread
From: Sam James @ 2023-02-10 4:26 UTC (permalink / raw
To: gentoo-commits
commit: 794758cd9e9393bccfddf89d160810220a5913df
Author: Yiyang Wu <xgreenlandforwyy <AT> gmail <DOT> com>
AuthorDate: Fri Feb 10 03:53:33 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Feb 10 04:25:42 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=794758cd
dev-libs/rocm-opencl-runtime: fix rocclr compile issue
Due to bbff88f734f62381b0a0624b4b2d182a8d4b8589, /usr/include/hsa.h is
gone, so backport patch for rocclr to fix compile error.
Also remove the unused prefix.eclass inherit
Closes: https://bugs.gentoo.org/893602
Signed-off-by: Yiyang Wu <xgreenlandforwyy <AT> gmail.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>
.../files/rocclr-5.3.3-fix-include.patch | 218 +++++++++++++++++++++
.../rocm-opencl-runtime-5.3.3-r1.ebuild | 3 +-
.../rocm-opencl-runtime-5.3.3.ebuild | 122 ------------
3 files changed, 220 insertions(+), 123 deletions(-)
diff --git a/dev-libs/rocm-opencl-runtime/files/rocclr-5.3.3-fix-include.patch b/dev-libs/rocm-opencl-runtime/files/rocclr-5.3.3-fix-include.patch
new file mode 100644
index 000000000000..e014fe374bec
--- /dev/null
+++ b/dev-libs/rocm-opencl-runtime/files/rocclr-5.3.3-fix-include.patch
@@ -0,0 +1,218 @@
+For https://bugs.gentoo.org/893602
+==================================
+From 197ea6f76f34e0b3c8ab46d96c2fa5014e467e37 Mon Sep 17 00:00:00 2001
+From: Maneesh Gupta <maneesh.gupta@amd.com>
+Date: Fri, 5 Aug 2022 05:42:39 +0000
+Subject: [PATCH] SWDEV-350289 - Fix build warnings due to file re-org
+
+Change-Id: I0066fa163b9f25fdde4c5b3baed1ef0654390c06
+---
+ device/comgrctx.hpp | 2 +-
+ device/devkernel.hpp | 2 +-
+ device/devprogram.hpp | 2 +-
+ device/rocm/pro/prodevice.cpp | 2 +-
+ device/rocm/pro/prodriver.hpp | 2 +-
+ device/rocm/roccounters.hpp | 2 +-
+ device/rocm/rocdevice.hpp | 8 ++++----
+ device/rocm/rocglinterop.hpp | 2 +-
+ device/rocm/rockernel.cpp | 2 +-
+ device/rocm/rocprogram.cpp | 2 +-
+ device/rocm/rocsignal.hpp | 4 ++--
+ device/rocm/rocvirtual.cpp | 4 ++--
+ device/rocm/rocvirtual.hpp | 8 ++++----
+ 13 files changed, 21 insertions(+), 21 deletions(-)
+
+diff --git a/device/comgrctx.hpp b/device/comgrctx.hpp
+index d69506e2..31ee24e1 100644
+--- a/device/comgrctx.hpp
++++ b/device/comgrctx.hpp
+@@ -23,7 +23,7 @@
+ #include <mutex>
+ #if defined(USE_COMGR_LIBRARY)
+ #include "top.hpp"
+-#include "amd_comgr.h"
++#include "amd_comgr/amd_comgr.h"
+
+ namespace amd {
+ typedef void (*t_amd_comgr_get_version)(size_t *major, size_t *minor);
+diff --git a/device/devkernel.hpp b/device/devkernel.hpp
+index 19b3212d..b256abf3 100644
+--- a/device/devkernel.hpp
++++ b/device/devkernel.hpp
+@@ -105,7 +105,7 @@ struct RuntimeHandle {
+ uint32_t group_segment_size; //!< From GROUP_SEGMENT_FIXED_SIZE
+ };
+
+-#include "amd_comgr.h"
++#include "amd_comgr/amd_comgr.h"
+
+ // for Code Object V3
+ enum class ArgField : uint8_t {
+diff --git a/device/devprogram.hpp b/device/devprogram.hpp
+index 099d6a37..741d81b0 100644
+--- a/device/devprogram.hpp
++++ b/device/devprogram.hpp
+@@ -29,7 +29,7 @@
+ #include "devwavelimiter.hpp"
+
+ #if defined(USE_COMGR_LIBRARY)
+-#include "amd_comgr.h"
++#include "amd_comgr/amd_comgr.h"
+ #endif // defined(USE_COMGR_LIBRARY)
+
+ namespace amd {
+diff --git a/device/rocm/pro/prodevice.cpp b/device/rocm/pro/prodevice.cpp
+index a0e49461..1e366cd2 100644
+--- a/device/rocm/pro/prodevice.cpp
++++ b/device/rocm/pro/prodevice.cpp
+@@ -20,7 +20,7 @@
+
+ #ifndef WITHOUT_HSA_BACKEND
+
+-#include "hsa_ext_amd.h"
++#include "hsa/hsa_ext_amd.h"
+ #include "lnxheaders.h"
+ #include "prodevice.hpp"
+ #include "amdgpu_drm.h"
+diff --git a/device/rocm/pro/prodriver.hpp b/device/rocm/pro/prodriver.hpp
+index bc420697..819ade27 100644
+--- a/device/rocm/pro/prodriver.hpp
++++ b/device/rocm/pro/prodriver.hpp
+@@ -23,7 +23,7 @@
+ #ifndef WITHOUT_HSA_BACKEND
+
+ #include "top.hpp"
+-#include "hsa.h"
++#include "hsa/hsa.h"
+
+ /*! \addtogroup HSA
+ * @{
+diff --git a/device/rocm/roccounters.hpp b/device/rocm/roccounters.hpp
+index ffc9fad0..45ebbe66 100644
+--- a/device/rocm/roccounters.hpp
++++ b/device/rocm/roccounters.hpp
+@@ -24,7 +24,7 @@
+ #include "top.hpp"
+ #include "device/device.hpp"
+ #include "device/rocm/rocdevice.hpp"
+-#include "hsa_ven_amd_aqlprofile.h"
++#include "hsa/hsa_ven_amd_aqlprofile.h"
+
+ namespace roc {
+
+diff --git a/device/rocm/rocdevice.hpp b/device/rocm/rocdevice.hpp
+index d8cb4c6c..44339bb9 100644
+--- a/device/rocm/rocdevice.hpp
++++ b/device/rocm/rocdevice.hpp
+@@ -40,10 +40,10 @@
+ #include "device/rocm/rocprintf.hpp"
+ #include "device/rocm/rocglinterop.hpp"
+
+-#include "hsa.h"
+-#include "hsa_ext_image.h"
+-#include "hsa_ext_amd.h"
+-#include "hsa_ven_amd_loader.h"
++#include "hsa/hsa.h"
++#include "hsa/hsa_ext_image.h"
++#include "hsa/hsa_ext_amd.h"
++#include "hsa/hsa_ven_amd_loader.h"
+
+ #include <atomic>
+ #include <iostream>
+diff --git a/device/rocm/rocglinterop.hpp b/device/rocm/rocglinterop.hpp
+index a539cc6f..588d8a6f 100644
+--- a/device/rocm/rocglinterop.hpp
++++ b/device/rocm/rocglinterop.hpp
+@@ -34,7 +34,7 @@ typedef __GLXcontextRec* GLXContext;
+
+ #include "device/rocm/mesa_glinterop.h"
+ #include "device/rocm/rocregisters.hpp"
+-#include "hsa_ext_amd.h"
++#include "hsa/hsa_ext_amd.h"
+
+ namespace roc {
+
+diff --git a/device/rocm/rockernel.cpp b/device/rocm/rockernel.cpp
+index 76ab76ad..5624c877 100644
+--- a/device/rocm/rockernel.cpp
++++ b/device/rocm/rockernel.cpp
+@@ -19,7 +19,7 @@
+ THE SOFTWARE. */
+
+ #include "rockernel.hpp"
+-#include "amd_hsa_kernel_code.h"
++#include "hsa/amd_hsa_kernel_code.h"
+
+ #include <algorithm>
+
+diff --git a/device/rocm/rocprogram.cpp b/device/rocm/rocprogram.cpp
+index e4559645..4f77026d 100644
+--- a/device/rocm/rocprogram.cpp
++++ b/device/rocm/rocprogram.cpp
+@@ -25,7 +25,7 @@
+ #include "utils/options.hpp"
+ #include "rockernel.hpp"
+
+-#include "amd_hsa_kernel_code.h"
++#include "hsa/amd_hsa_kernel_code.h"
+
+ #include <string>
+ #include <vector>
+diff --git a/device/rocm/rocsignal.hpp b/device/rocm/rocsignal.hpp
+index 3e8c1e6e..fff310d5 100644
+--- a/device/rocm/rocsignal.hpp
++++ b/device/rocm/rocsignal.hpp
+@@ -22,7 +22,7 @@
+
+ #include "device/devsignal.hpp"
+
+-#include <hsa.h>
++#include "hsa/hsa.h"
+
+ namespace roc {
+
+@@ -44,4 +44,4 @@ public:
+ }
+ };
+
+-};
+\ No newline at end of file
++};
+diff --git a/device/rocm/rocvirtual.cpp b/device/rocm/rocvirtual.cpp
+index 63b96378..1b6287e9 100644
+--- a/device/rocm/rocvirtual.cpp
++++ b/device/rocm/rocvirtual.cpp
+@@ -33,8 +33,8 @@
+ #include "platform/sampler.hpp"
+ #include "utils/debug.hpp"
+ #include "os/os.hpp"
+-#include "amd_hsa_kernel_code.h"
+-#include "amd_hsa_queue.h"
++#include "hsa/amd_hsa_kernel_code.h"
++#include "hsa/amd_hsa_queue.h"
+
+ #include <fstream>
+ #include <limits>
+diff --git a/device/rocm/rocvirtual.hpp b/device/rocm/rocvirtual.hpp
+index 6c738776..1bb0868c 100644
+--- a/device/rocm/rocvirtual.hpp
++++ b/device/rocm/rocvirtual.hpp
+@@ -24,11 +24,11 @@
+ #include "rocdefs.hpp"
+ #include "rocdevice.hpp"
+ #include "utils/util.hpp"
+-#include "hsa.h"
+-#include "hsa_ext_image.h"
+-#include "hsa_ext_amd.h"
++#include "hsa/hsa.h"
++#include "hsa/hsa_ext_image.h"
++#include "hsa/hsa_ext_amd.h"
+ #include "rocprintf.hpp"
+-#include "hsa_ven_amd_aqlprofile.h"
++#include "hsa/hsa_ven_amd_aqlprofile.h"
+ #include "rocsched.hpp"
+
+ namespace roc {
+--
+2.39.1
+
diff --git a/dev-libs/rocm-opencl-runtime/rocm-opencl-runtime-5.3.3-r1.ebuild b/dev-libs/rocm-opencl-runtime/rocm-opencl-runtime-5.3.3-r1.ebuild
index 88142c6e203e..169deaf37b79 100644
--- a/dev-libs/rocm-opencl-runtime/rocm-opencl-runtime-5.3.3-r1.ebuild
+++ b/dev-libs/rocm-opencl-runtime/rocm-opencl-runtime-5.3.3-r1.ebuild
@@ -3,7 +3,7 @@
EAPI=8
-inherit cmake edo flag-o-matic prefix
+inherit cmake edo flag-o-matic
DESCRIPTION="Radeon Open Compute OpenCL Compatible Runtime"
HOMEPAGE="https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime"
@@ -37,6 +37,7 @@ src_prepare() {
# Bug #753377
# patch re-enables accidentally disabled gfx800 family
eapply "${FILESDIR}/${PN}-5.0.2-enable-gfx800.patch"
+ eapply "${FILESDIR}/rocclr-${PV}-fix-include.patch"
popd || die
}
diff --git a/dev-libs/rocm-opencl-runtime/rocm-opencl-runtime-5.3.3.ebuild b/dev-libs/rocm-opencl-runtime/rocm-opencl-runtime-5.3.3.ebuild
deleted file mode 100644
index 1dc7f3cf3345..000000000000
--- a/dev-libs/rocm-opencl-runtime/rocm-opencl-runtime-5.3.3.ebuild
+++ /dev/null
@@ -1,122 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit cmake edo flag-o-matic prefix
-
-DESCRIPTION="Radeon Open Compute OpenCL Compatible Runtime"
-HOMEPAGE="https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime"
-SRC_URI="https://github.com/ROCm-Developer-Tools/ROCclr/archive/rocm-${PV}.tar.gz -> rocclr-${PV}.tar.gz
- https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime/archive/rocm-${PV}.tar.gz -> rocm-opencl-runtime-${PV}.tar.gz"
-
-LICENSE="Apache-2.0 MIT"
-SLOT="0/$(ver_cut 1-2)"
-IUSE="debug test"
-RESTRICT="!test? ( test )"
-KEYWORDS="~amd64"
-
-RDEPEND=">=dev-libs/rocr-runtime-${PV}
- >=dev-libs/rocm-comgr-${PV}
- >=dev-libs/rocm-device-libs-${PV}
- >=virtual/opencl-3
- media-libs/mesa"
-DEPEND="${RDEPEND}"
-BDEPEND=">=dev-util/rocm-cmake-${PV}
- media-libs/glew
- test? ( >=x11-apps/mesa-progs-8.5.0[X] )
- "
-
-PATCHES=(
- "${FILESDIR}/${PN}-3.5.0-do-not-install-libopencl.patch"
-)
-
-S="${WORKDIR}/ROCm-OpenCL-Runtime-rocm-${PV}"
-S1="${WORKDIR}/ROCclr-rocm-${PV}"
-
-src_prepare() {
- # Remove "clinfo" - use "dev-util/clinfo" instead
- #[ -d tools/clinfo ] && rm -rf tools/clinfo || die
-
- cmake_src_prepare
-
- hprefixify amdocl/CMakeLists.txt
-
- sed -e "s/DESTINATION lib/DESTINATION ${CMAKE_INSTALL_LIBDIR}/g" -i packaging/CMakeLists.txt || die
- # remove trailing CR or it won't work
- sed -e "s/\r$//g" -i tests/ocltst/module/perf/oclperf.exclude || die
-
- pushd ${S1} || die
- # Bug #753377
- # patch re-enables accidentally disabled gfx800 family
- eapply "${FILESDIR}/${PN}-5.0.2-enable-gfx800.patch"
- popd || die
-}
-
-src_configure() {
- # Reported upstream: https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime/issues/120
- append-cflags -fcommon
-
- local mycmakeargs=(
- -Wno-dev
- -DROCCLR_PATH="${S1}"
- -DAMD_OPENCL_PATH="${S}"
- -DROCM_PATH="${EPREFIX}/usr"
- -DBUILD_TESTS=$(usex test ON OFF)
- -DEMU_ENV=ON
- # -DCMAKE_STRIP=""
- )
- cmake_src_configure
-}
-
-src_install() {
- insinto /etc/OpenCL/vendors
- doins config/amdocl64.icd
-
- cd "${BUILD_DIR}" || die
- insinto /usr/lib64
- doins amdocl/libamdocl64.so
- doins tools/cltrace/libcltrace.so
-}
-
-# Copied from rocm.eclass. This ebuild does not need amdgpu_targets
-# USE_EXPANDS, so it should not inherit rocm.eclass; it only uses the
-# check_amdgpu function in src_test. Rename it to check-amdgpu to avoid
-# pkgcheck warning.
-check-amdgpu() {
- for device in /dev/kfd /dev/dri/render*; do
- addwrite ${device}
- if [[ ! -r ${device} || ! -w ${device} ]]; then
- eerror "Cannot read or write ${device}!"
- eerror "Make sure it is present and check the permission."
- ewarn "By default render group have access to it. Check if portage user is in render group."
- die "${device} inaccessible"
- fi
- done
-}
-
-src_test() {
- check-amdgpu
- cd "${BUILD_DIR}"/tests/ocltst || die
- export OCL_ICD_FILENAMES="${BUILD_DIR}"/amdocl/libamdocl64.so
- local instruction1="Please start an X server using amdgpu driver (not Xvfb!),"
- local instruction2="and export OCLGL_DISPLAY=\${DISPLAY} OCLGL_XAUTHORITY=\${XAUTHORITY} before reruning the test."
- if [[ -n ${OCLGL_DISPLAY+x} ]]; then
- export DISPLAY=${OCLGL_DISPLAY}
- export XAUTHORITY=${OCLGL_XAUTHORITY}
- ebegin "Running oclgl test under DISPLAY ${OCLGL_DISPLAY}"
- if ! glxinfo | grep "OpenGL vendor string: AMD"; then
- ewarn "${instruction1}"
- ewarn "${instruction2}"
- die "This display does not have AMD OpenGL vendor!"
- fi
- ./ocltst -m liboclgl.so -A ogl.exclude
- eend $? || die "oclgl test failed"
- else
- ewarn "${instruction1}"
- ewarn "${instruction2}"
- die "\${OCLGL_DISPLAY} not set."
- fi
- edob ./ocltst -m liboclruntime.so -A oclruntime.exclude
- edob ./ocltst -m liboclperf.so -A oclperf.exclude
-}
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/rocm-opencl-runtime/, dev-libs/rocm-opencl-runtime/files/
@ 2024-09-19 8:49 Patrick Lauer
0 siblings, 0 replies; 5+ messages in thread
From: Patrick Lauer @ 2024-09-19 8:49 UTC (permalink / raw
To: gentoo-commits
commit: e7f0f2bac9d6d07e6056700534da627f854014c0
Author: Patrick Lauer <patrick <AT> gentoo <DOT> org>
AuthorDate: Thu Sep 19 08:48:35 2024 +0000
Commit: Patrick Lauer <patrick <AT> gentoo <DOT> org>
CommitDate: Thu Sep 19 08:48:58 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e7f0f2ba
dev-libs/rocm-opencl-runtime: Add segfault fix
Signed-off-by: Patrick Lauer <patrick <AT> gentoo.org>
.../rocm-opencl-runtime-6.1.2-fix-segfault.patch | 31 +++++++
.../rocm-opencl-runtime-6.1.2-r1.ebuild | 94 ++++++++++++++++++++++
2 files changed, 125 insertions(+)
diff --git a/dev-libs/rocm-opencl-runtime/files/rocm-opencl-runtime-6.1.2-fix-segfault.patch b/dev-libs/rocm-opencl-runtime/files/rocm-opencl-runtime-6.1.2-fix-segfault.patch
new file mode 100644
index 000000000000..78f76303468f
--- /dev/null
+++ b/dev-libs/rocm-opencl-runtime/files/rocm-opencl-runtime-6.1.2-fix-segfault.patch
@@ -0,0 +1,31 @@
+From d1fff7cea2231e7980d85790486edb70d093a1dc Mon Sep 17 00:00:00 2001
+From: Rakesh Roy <rakesh.roy@amd.com>
+Date: Wed, 20 Mar 2024 22:50:22 +0530
+Subject: [PATCH] SWDEV-445096 - Fix -O0 crash in OpenCL tests
+
+- With https://gerrit-git.amd.com/c/lightning/ec/llvm-project/+/1002628 applied, at -O0 Kernel::dynamicParallelism() returns true but virtual queue isn't created
+- This causes segfault inside VirtualGPU::submitKernelInternal() when getVQVirtualAddress() is called
+
+Change-Id: Ia7af042adad2329e870c142caaac3e8fa886f8b8
+---
+ rocclr/device/rocm/rocvirtual.cpp | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/rocclr/device/rocm/rocvirtual.cpp b/rocclr/device/rocm/rocvirtual.cpp
+index 51080013b..1610aecfe 100644
+--- a/rocclr/device/rocm/rocvirtual.cpp
++++ b/rocclr/device/rocm/rocvirtual.cpp
+@@ -3326,8 +3326,11 @@ bool VirtualGPU::submitKernelInternal(const amd::NDRangeContainer& sizes,
+
+ if (gpuKernel.dynamicParallelism()) {
+ dispatchBarrierPacket(kBarrierPacketHeader, true);
+- static_cast<KernelBlitManager&>(blitMgr()).runScheduler(
+- getVQVirtualAddress(), schedulerParam_, schedulerQueue_, schedulerSignal_, schedulerThreads_);
++ if (virtualQueue_ != nullptr) {
++ static_cast<KernelBlitManager&>(blitMgr()).runScheduler(
++ getVQVirtualAddress(), schedulerParam_, schedulerQueue_,
++ schedulerSignal_, schedulerThreads_);
++ }
+ }
+
+ // Check if image buffer write back is required
diff --git a/dev-libs/rocm-opencl-runtime/rocm-opencl-runtime-6.1.2-r1.ebuild b/dev-libs/rocm-opencl-runtime/rocm-opencl-runtime-6.1.2-r1.ebuild
new file mode 100644
index 000000000000..69ddac919e07
--- /dev/null
+++ b/dev-libs/rocm-opencl-runtime/rocm-opencl-runtime-6.1.2-r1.ebuild
@@ -0,0 +1,94 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+ROCM_SKIP_GLOBALS=1
+inherit cmake edo flag-o-matic rocm
+
+DESCRIPTION="Radeon Open Compute OpenCL Compatible Runtime"
+HOMEPAGE="https://github.com/ROCm-Developer-Tools/clr"
+
+SRC_URI="https://github.com/ROCm-Developer-Tools/clr/archive/refs/tags/rocm-${PV}.tar.gz -> rocm-clr-${PV}.tar.gz"
+S="${WORKDIR}/clr-rocm-${PV}/"
+
+LICENSE="Apache-2.0 MIT"
+SLOT="0/$(ver_cut 1-2)"
+KEYWORDS="~amd64"
+IUSE="debug test"
+RESTRICT="!test? ( test )"
+
+RDEPEND=">=dev-libs/rocr-runtime-6.0
+ >=dev-libs/rocm-comgr-6.0
+ >=dev-libs/rocm-device-libs-6.0
+ >=virtual/opencl-3
+ media-libs/mesa[-opencl]"
+DEPEND="${RDEPEND}"
+BDEPEND=">=dev-build/rocm-cmake-5.3
+ media-libs/glew
+ test? ( >=x11-apps/mesa-progs-8.5.0[X] )
+"
+PATCHES=( ${FILESDIR}/rocm-opencl-runtime-6.1.2-fix-segfault.patch )
+
+src_configure() {
+ # -Werror=strict-aliasing
+ # https://bugs.gentoo.org/856088
+ # https://github.com/ROCm/clr/issues/64
+ #
+ # Do not trust it for LTO either
+ append-flags -fno-strict-aliasing
+ filter-lto
+
+ # Fix ld.lld linker error: https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime/issues/155
+ append-ldflags $(test-flags-CCLD -Wl,--undefined-version)
+
+ # Reported upstream: https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime/issues/120
+ append-cflags -fcommon
+
+ local mycmakeargs=(
+ -Wno-dev
+ -DROCM_PATH="${EPREFIX}/usr"
+ -DBUILD_TESTS=$(usex test ON OFF)
+ -DEMU_ENV=ON
+ -DBUILD_ICD=ON
+ -DFILE_REORG_BACKWARD_COMPATIBILITY=OFF
+ -DCLR_BUILD_OCL=on
+ )
+ cmake_src_configure
+}
+
+src_install() {
+ insinto /etc/OpenCL/vendors
+ doins opencl/config/amdocl64.icd
+
+ cd "${BUILD_DIR}"/opencl || die
+ insinto /usr/lib64
+ doins amdocl/libamdocl64.so
+ doins tools/cltrace/libcltrace.so
+}
+
+src_test() {
+ check_amdgpu
+ cd "${BUILD_DIR}"/tests/ocltst || die
+ export OCL_ICD_FILENAMES="${BUILD_DIR}"/amdocl/libamdocl64.so
+ local instruction1="Please start an X server using amdgpu driver (not Xvfb!),"
+ local instruction2="and export OCLGL_DISPLAY=\${DISPLAY} OCLGL_XAUTHORITY=\${XAUTHORITY} before reruning the test."
+ if [[ -n ${OCLGL_DISPLAY+x} ]]; then
+ export DISPLAY=${OCLGL_DISPLAY}
+ export XAUTHORITY=${OCLGL_XAUTHORITY}
+ ebegin "Running oclgl test under DISPLAY ${OCLGL_DISPLAY}"
+ if ! glxinfo | grep "OpenGL vendor string: AMD"; then
+ ewarn "${instruction1}"
+ ewarn "${instruction2}"
+ die "This display does not have AMD OpenGL vendor!"
+ fi
+ ./ocltst -m $(realpath liboclgl.so) -A ogl.exclude
+ eend $? || die "oclgl test failed"
+ else
+ ewarn "${instruction1}"
+ ewarn "${instruction2}"
+ die "\${OCLGL_DISPLAY} not set."
+ fi
+ edob ./ocltst -m $(realpath liboclruntime.so) -A oclruntime.exclude
+ edob ./ocltst -m $(realpath liboclperf.so) -A oclperf.exclude
+}
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/rocm-opencl-runtime/, dev-libs/rocm-opencl-runtime/files/
@ 2025-02-13 8:38 Sam James
0 siblings, 0 replies; 5+ messages in thread
From: Sam James @ 2025-02-13 8:38 UTC (permalink / raw
To: gentoo-commits
commit: d83ed96038b745dc23a1c79e03ef7a43518f4163
Author: Sv. Lockal <lockalsash <AT> gmail <DOT> com>
AuthorDate: Thu Jan 30 14:06:30 2025 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Feb 13 08:35:18 2025 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d83ed960
dev-libs/rocm-opencl-runtime: drop 5.1.3, 5.3.3-r1, 5.4.3-r1, 5.5.1
Signed-off-by: Sv. Lockal <lockalsash <AT> gmail.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>
dev-libs/rocm-opencl-runtime/Manifest | 8 -
.../files/rocclr-5.3.3-fix-include.patch | 218 ---------------------
.../files/rocclr-5.3.3-gcc13.patch | 27 ---
...cl-runtime-3.5.0-do-not-install-libopencl.patch | 14 --
.../rocm-opencl-runtime-5.0.2-enable-gfx800.patch | 16 --
.../rocm-opencl-runtime-5.1.3-remove-clinfo.patch | 24 ---
.../files/rocm-opencl-runtime-5.3.3-gcc13.patch | 27 ---
.../rocm-opencl-runtime-5.1.3.ebuild | 130 ------------
.../rocm-opencl-runtime-5.3.3-r1.ebuild | 118 -----------
.../rocm-opencl-runtime-5.4.3-r1.ebuild | 136 -------------
.../rocm-opencl-runtime-5.5.1.ebuild | 133 -------------
11 files changed, 851 deletions(-)
diff --git a/dev-libs/rocm-opencl-runtime/Manifest b/dev-libs/rocm-opencl-runtime/Manifest
index 4ec8a58f9896..d149cf048e0c 100644
--- a/dev-libs/rocm-opencl-runtime/Manifest
+++ b/dev-libs/rocm-opencl-runtime/Manifest
@@ -1,13 +1,5 @@
-DIST rocclr-5.1.3.tar.gz 618606 BLAKE2B 02b7732ddd03c0883bee49c56466cd21c649159f801bfb2537eea6e640c65613eb57b37d942f465a9deb83d65735f51212dde5e4f77ba8239d1a6b7037e1800c SHA512 89fd2eca39ed84a1cf525b2c606089ef39f64c1f997c4880e10722da6de4864110752640e1508db1aeb9d15c48ba4e6fe5dbe7a9e56718853ece42548028b2ca
-DIST rocclr-5.3.3.tar.gz 625944 BLAKE2B 0cdbc1415a355e1d56628834846aaa8587c9827eeea59f4312b788e868265dcb42197181fd5ef411416da2e11662c7f665f578aa750ab88c3a5405bcc58ee449 SHA512 3f85532cffc09c2ca8e7cd1770263d1c1a38633ed2bc5cfe62072e12a6f8f669db400519950718be31f6b77693d372e2ef905f06c7f02e126aa9ff7d2da97924
-DIST rocclr-5.4.3.tar.gz 640557 BLAKE2B 9ab91bab7ffb06c9c0d1c2ae79533fccc597071dda289ac375e32eb2965c638a7029951d2a49d46eeead9d7d242fe3a0cedb3e444d877af1bbf0e2d801c91e11 SHA512 c1d1a2ca08c2d762a221c04d394469aa7aff46086151333b145e0db9a7c7eb3dbbf8b9693e50d816aa9a13c16b4ebacf5ff3d5d8ff3393a8a764728ef5172d3a
-DIST rocclr-5.5.1.tar.gz 634330 BLAKE2B e6383a6b6b09f274a944d66effd345e38a191ec73ee5c5240f8ec8bb62a4df97b80835ce57f8f78c3834602b9da425b49289b5c7cd7e4c7071147ff409c6a6c9 SHA512 4c12011d22a4f14d9e93250b2a38716eb973139afa1adbbbd51c0e0ed13c0b7c1f45a37c71ef937c5fdabf09e928d7913ca3332fc61b7a2c10d21421306a228f
DIST rocm-clr-5.7.1.tar.gz 2008647 BLAKE2B 3db0760d6f83504e60caf88a2dd5e0bc02c7db9d6f263ad0eb2cfc79aa0f88a3699c412844a0158a796d9d02e79660287e791edad787d814eefffea4fd2298b4 SHA512 d79323481d82fc02c12a32cdcc0d14437d512af023e7737db0387b7eecb27fe6e4ae7c71d6adce57932a04bb24c880440d9dc10aeb5af11a4f2ca64d44330965
DIST rocm-clr-6.1.1.tar.gz 2031034 BLAKE2B b0485bb015d31986f4988d1db0c029c826856e50b5bb1b58fac2097c14b3966668f1b8d41ec198889e27ac860497a8b3c081ec31d52390d5c9ff5db092bf7cce SHA512 86925e8b9a9e77b06a57daefbc7279887b4ef7c6a79c3717bc2f2d3bf29926281c60063fd17e21c65d7def520d9f579bf88f69051d053a38750ba968f69ca3fc
DIST rocm-clr-6.1.2.tar.gz 2031283 BLAKE2B d51d32a77794ea97f1a3817786c9fd6b482106b665eea6e2c9b4c11e4dce19a3486386eb5ba111554c2d82c30e2a93add7502eed5768caf3fb709fb5fbb2e71b SHA512 e97224451864efe0084c4117f54893c9624a6a9f365a0b4abad08fd9635f008dea742dc589429fbb714e1b8177d06362c0f5a741f6c4a050d0fd4d48da72d54b
DIST rocm-clr-6.3.0.tar.gz 2093572 BLAKE2B 14f75f9f5dc4000a2abf28e523659def8cd96112c9c8b95abb634c33433077faa3ddab3fbe659e0ed2e1f309f63a93b7eb03fa6f246b4cea06ca8c512c13308a SHA512 f005baaf2a8f63946811db990e2d373906b31a4085a51427d407c9e4c1d877a14aeb713190a285953cadb960b5517570941c60e2f998adb2b1f9833f1d2f5925
DIST rocm-clr-6.3.2.tar.gz 2095677 BLAKE2B 2f1122a2058f8ba358fe48a46473f23c46a5413fef16515f103c21a8ae13bb76522fbe587cb9c9e6e3dd06f968402b6a881391823c80381c0c41072597c845ac SHA512 5bade294dc6fc60bf459bfd7124c354f2b0079167d3c8776a9e3d6d8320bb9b1a2a0770a466987e164994293024bf47de158ba207f077968dfccb7bf20fb884b
-DIST rocm-opencl-runtime-5.1.3.tar.gz 1004765 BLAKE2B 64d9b42026d2be1d0e4aa666785699f6b4ec0584a927904a94bf830883050943503f8bdd7c97438a2fb11c71686a330d526f633959916c5c6c8da2e037841e79 SHA512 b83c3ae0bfad80f867bacce36710a8964f6dd7e64bf50da3ec6ce842217d6de63299d9ceaab9dc25a22252484520a85d02859809463dad5dda9b1f00a86863e0
-DIST rocm-opencl-runtime-5.3.3.tar.gz 1007773 BLAKE2B a3f600a68183337f92b152a123241cb7025889cca2ef6814d9d5b5a2146a78703b171d20bcb432bc7a2cdd1f24ad349408c17816b25a66702e9f0f5345af9082 SHA512 391f0f244b7f02972df8cada821e69ee8d81d96b9cff3c14f1d0838da583d8fb136ec4bd5ee820f6dd261968e9eef5e9a5b10b7bb76b1b64625c399d79bcb03f
-DIST rocm-opencl-runtime-5.4.3.tar.gz 1005268 BLAKE2B f9398e4c2b0f045f1b5d8df9f31b7f2bef6a9201885aa6ee5fc5d71632cfde26a078d9a5ea38c3da12d3c187faf04c7bdcf1a8ecb9927cdba56b1efdfcdc44ee SHA512 f65d4622ce8721a6b91ab5b5b306d142ba507d3e631ac3ab0b76c5bc6d8d18455e02debd954c82e7eb609f232b509f1ec1a013dc2fad467c2c2ad31fdf15755d
-DIST rocm-opencl-runtime-5.5.1.tar.gz 991802 BLAKE2B 07d955b4a76b11296259287f5878cadc2438350a3abcdb5bd693c02790ff4c330b1d0a2a87f8de5334b3e3459c26b3fdf695886502ec5d2c373d807c242c8f93 SHA512 06786e818002dc43f64e4b0aaae0a0a2bcdad7acdb4662e1215d43277b107d65fb9a7f7441c31e3378c380cac860b1cd2eaefb5753246beffa4d9c10efced85e
diff --git a/dev-libs/rocm-opencl-runtime/files/rocclr-5.3.3-fix-include.patch b/dev-libs/rocm-opencl-runtime/files/rocclr-5.3.3-fix-include.patch
deleted file mode 100644
index e014fe374bec..000000000000
--- a/dev-libs/rocm-opencl-runtime/files/rocclr-5.3.3-fix-include.patch
+++ /dev/null
@@ -1,218 +0,0 @@
-For https://bugs.gentoo.org/893602
-==================================
-From 197ea6f76f34e0b3c8ab46d96c2fa5014e467e37 Mon Sep 17 00:00:00 2001
-From: Maneesh Gupta <maneesh.gupta@amd.com>
-Date: Fri, 5 Aug 2022 05:42:39 +0000
-Subject: [PATCH] SWDEV-350289 - Fix build warnings due to file re-org
-
-Change-Id: I0066fa163b9f25fdde4c5b3baed1ef0654390c06
----
- device/comgrctx.hpp | 2 +-
- device/devkernel.hpp | 2 +-
- device/devprogram.hpp | 2 +-
- device/rocm/pro/prodevice.cpp | 2 +-
- device/rocm/pro/prodriver.hpp | 2 +-
- device/rocm/roccounters.hpp | 2 +-
- device/rocm/rocdevice.hpp | 8 ++++----
- device/rocm/rocglinterop.hpp | 2 +-
- device/rocm/rockernel.cpp | 2 +-
- device/rocm/rocprogram.cpp | 2 +-
- device/rocm/rocsignal.hpp | 4 ++--
- device/rocm/rocvirtual.cpp | 4 ++--
- device/rocm/rocvirtual.hpp | 8 ++++----
- 13 files changed, 21 insertions(+), 21 deletions(-)
-
-diff --git a/device/comgrctx.hpp b/device/comgrctx.hpp
-index d69506e2..31ee24e1 100644
---- a/device/comgrctx.hpp
-+++ b/device/comgrctx.hpp
-@@ -23,7 +23,7 @@
- #include <mutex>
- #if defined(USE_COMGR_LIBRARY)
- #include "top.hpp"
--#include "amd_comgr.h"
-+#include "amd_comgr/amd_comgr.h"
-
- namespace amd {
- typedef void (*t_amd_comgr_get_version)(size_t *major, size_t *minor);
-diff --git a/device/devkernel.hpp b/device/devkernel.hpp
-index 19b3212d..b256abf3 100644
---- a/device/devkernel.hpp
-+++ b/device/devkernel.hpp
-@@ -105,7 +105,7 @@ struct RuntimeHandle {
- uint32_t group_segment_size; //!< From GROUP_SEGMENT_FIXED_SIZE
- };
-
--#include "amd_comgr.h"
-+#include "amd_comgr/amd_comgr.h"
-
- // for Code Object V3
- enum class ArgField : uint8_t {
-diff --git a/device/devprogram.hpp b/device/devprogram.hpp
-index 099d6a37..741d81b0 100644
---- a/device/devprogram.hpp
-+++ b/device/devprogram.hpp
-@@ -29,7 +29,7 @@
- #include "devwavelimiter.hpp"
-
- #if defined(USE_COMGR_LIBRARY)
--#include "amd_comgr.h"
-+#include "amd_comgr/amd_comgr.h"
- #endif // defined(USE_COMGR_LIBRARY)
-
- namespace amd {
-diff --git a/device/rocm/pro/prodevice.cpp b/device/rocm/pro/prodevice.cpp
-index a0e49461..1e366cd2 100644
---- a/device/rocm/pro/prodevice.cpp
-+++ b/device/rocm/pro/prodevice.cpp
-@@ -20,7 +20,7 @@
-
- #ifndef WITHOUT_HSA_BACKEND
-
--#include "hsa_ext_amd.h"
-+#include "hsa/hsa_ext_amd.h"
- #include "lnxheaders.h"
- #include "prodevice.hpp"
- #include "amdgpu_drm.h"
-diff --git a/device/rocm/pro/prodriver.hpp b/device/rocm/pro/prodriver.hpp
-index bc420697..819ade27 100644
---- a/device/rocm/pro/prodriver.hpp
-+++ b/device/rocm/pro/prodriver.hpp
-@@ -23,7 +23,7 @@
- #ifndef WITHOUT_HSA_BACKEND
-
- #include "top.hpp"
--#include "hsa.h"
-+#include "hsa/hsa.h"
-
- /*! \addtogroup HSA
- * @{
-diff --git a/device/rocm/roccounters.hpp b/device/rocm/roccounters.hpp
-index ffc9fad0..45ebbe66 100644
---- a/device/rocm/roccounters.hpp
-+++ b/device/rocm/roccounters.hpp
-@@ -24,7 +24,7 @@
- #include "top.hpp"
- #include "device/device.hpp"
- #include "device/rocm/rocdevice.hpp"
--#include "hsa_ven_amd_aqlprofile.h"
-+#include "hsa/hsa_ven_amd_aqlprofile.h"
-
- namespace roc {
-
-diff --git a/device/rocm/rocdevice.hpp b/device/rocm/rocdevice.hpp
-index d8cb4c6c..44339bb9 100644
---- a/device/rocm/rocdevice.hpp
-+++ b/device/rocm/rocdevice.hpp
-@@ -40,10 +40,10 @@
- #include "device/rocm/rocprintf.hpp"
- #include "device/rocm/rocglinterop.hpp"
-
--#include "hsa.h"
--#include "hsa_ext_image.h"
--#include "hsa_ext_amd.h"
--#include "hsa_ven_amd_loader.h"
-+#include "hsa/hsa.h"
-+#include "hsa/hsa_ext_image.h"
-+#include "hsa/hsa_ext_amd.h"
-+#include "hsa/hsa_ven_amd_loader.h"
-
- #include <atomic>
- #include <iostream>
-diff --git a/device/rocm/rocglinterop.hpp b/device/rocm/rocglinterop.hpp
-index a539cc6f..588d8a6f 100644
---- a/device/rocm/rocglinterop.hpp
-+++ b/device/rocm/rocglinterop.hpp
-@@ -34,7 +34,7 @@ typedef __GLXcontextRec* GLXContext;
-
- #include "device/rocm/mesa_glinterop.h"
- #include "device/rocm/rocregisters.hpp"
--#include "hsa_ext_amd.h"
-+#include "hsa/hsa_ext_amd.h"
-
- namespace roc {
-
-diff --git a/device/rocm/rockernel.cpp b/device/rocm/rockernel.cpp
-index 76ab76ad..5624c877 100644
---- a/device/rocm/rockernel.cpp
-+++ b/device/rocm/rockernel.cpp
-@@ -19,7 +19,7 @@
- THE SOFTWARE. */
-
- #include "rockernel.hpp"
--#include "amd_hsa_kernel_code.h"
-+#include "hsa/amd_hsa_kernel_code.h"
-
- #include <algorithm>
-
-diff --git a/device/rocm/rocprogram.cpp b/device/rocm/rocprogram.cpp
-index e4559645..4f77026d 100644
---- a/device/rocm/rocprogram.cpp
-+++ b/device/rocm/rocprogram.cpp
-@@ -25,7 +25,7 @@
- #include "utils/options.hpp"
- #include "rockernel.hpp"
-
--#include "amd_hsa_kernel_code.h"
-+#include "hsa/amd_hsa_kernel_code.h"
-
- #include <string>
- #include <vector>
-diff --git a/device/rocm/rocsignal.hpp b/device/rocm/rocsignal.hpp
-index 3e8c1e6e..fff310d5 100644
---- a/device/rocm/rocsignal.hpp
-+++ b/device/rocm/rocsignal.hpp
-@@ -22,7 +22,7 @@
-
- #include "device/devsignal.hpp"
-
--#include <hsa.h>
-+#include "hsa/hsa.h"
-
- namespace roc {
-
-@@ -44,4 +44,4 @@ public:
- }
- };
-
--};
-\ No newline at end of file
-+};
-diff --git a/device/rocm/rocvirtual.cpp b/device/rocm/rocvirtual.cpp
-index 63b96378..1b6287e9 100644
---- a/device/rocm/rocvirtual.cpp
-+++ b/device/rocm/rocvirtual.cpp
-@@ -33,8 +33,8 @@
- #include "platform/sampler.hpp"
- #include "utils/debug.hpp"
- #include "os/os.hpp"
--#include "amd_hsa_kernel_code.h"
--#include "amd_hsa_queue.h"
-+#include "hsa/amd_hsa_kernel_code.h"
-+#include "hsa/amd_hsa_queue.h"
-
- #include <fstream>
- #include <limits>
-diff --git a/device/rocm/rocvirtual.hpp b/device/rocm/rocvirtual.hpp
-index 6c738776..1bb0868c 100644
---- a/device/rocm/rocvirtual.hpp
-+++ b/device/rocm/rocvirtual.hpp
-@@ -24,11 +24,11 @@
- #include "rocdefs.hpp"
- #include "rocdevice.hpp"
- #include "utils/util.hpp"
--#include "hsa.h"
--#include "hsa_ext_image.h"
--#include "hsa_ext_amd.h"
-+#include "hsa/hsa.h"
-+#include "hsa/hsa_ext_image.h"
-+#include "hsa/hsa_ext_amd.h"
- #include "rocprintf.hpp"
--#include "hsa_ven_amd_aqlprofile.h"
-+#include "hsa/hsa_ven_amd_aqlprofile.h"
- #include "rocsched.hpp"
-
- namespace roc {
---
-2.39.1
-
diff --git a/dev-libs/rocm-opencl-runtime/files/rocclr-5.3.3-gcc13.patch b/dev-libs/rocm-opencl-runtime/files/rocclr-5.3.3-gcc13.patch
deleted file mode 100644
index a86cd9fa120e..000000000000
--- a/dev-libs/rocm-opencl-runtime/files/rocclr-5.3.3-gcc13.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-For https://bugs.gentoo.org/895382
-==================================
-From ca70cd7c3d63b1036e604116f3b269ca123e7904 Mon Sep 17 00:00:00 2001
-From: Jeremy Newton <Jeremy.Newton@amd.com>
-Date: Wed, 8 Feb 2023 14:03:58 -0500
-Subject: [PATCH] SWDEV-1 - device: Add missing include
-
-Newer GCC's seem to require this.
-
-Change-Id: I85926d4fa552b772f2eb9f8ede7863a546c47f54
-Signed-off-by: Jeremy Newton <Jeremy.Newton@amd.com>
----
- device/devhcprintf.cpp | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/device/devhcprintf.cpp b/device/devhcprintf.cpp
-index b36f7758..a5aba4a4 100644
---- a/device/devhcprintf.cpp
-+++ b/device/devhcprintf.cpp
-@@ -23,6 +23,7 @@
-
- #include <assert.h>
- #include <cstdarg>
-+#include <cstdint>
- #include <cstdio>
- #include <cstring>
- #include <string>
diff --git a/dev-libs/rocm-opencl-runtime/files/rocm-opencl-runtime-3.5.0-do-not-install-libopencl.patch b/dev-libs/rocm-opencl-runtime/files/rocm-opencl-runtime-3.5.0-do-not-install-libopencl.patch
deleted file mode 100644
index a74b2363c2df..000000000000
--- a/dev-libs/rocm-opencl-runtime/files/rocm-opencl-runtime-3.5.0-do-not-install-libopencl.patch
+++ /dev/null
@@ -1,14 +0,0 @@
---- a/khronos/icd/CMakeLists.txt 2020-06-07 16:05:32.425022904 +0200
-+++ b/khronos/icd/CMakeLists.txt 2020-06-07 16:06:03.273022786 +0200
-@@ -132,7 +132,7 @@
- add_subdirectory (test)
- endif()
-
--install (TARGETS OpenCL
-- RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
-- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
-- LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
-+#install (TARGETS OpenCL
-+# RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
-+# ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
-+# LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
diff --git a/dev-libs/rocm-opencl-runtime/files/rocm-opencl-runtime-5.0.2-enable-gfx800.patch b/dev-libs/rocm-opencl-runtime/files/rocm-opencl-runtime-5.0.2-enable-gfx800.patch
deleted file mode 100644
index 29482340295e..000000000000
--- a/dev-libs/rocm-opencl-runtime/files/rocm-opencl-runtime-5.0.2-enable-gfx800.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-#From xuhuisheng
-#at https://github.com/RadeonOpenCompute/ROCm/issues/1659#issuecomment-1041026624
-
-diff --git a/utils/flags.hpp b/utils/flags.hpp
-index 8f0228cc..2eaa47c5 100644
---- a/utils/flags.hpp
-+++ b/utils/flags.hpp
-@@ -245,7 +245,7 @@ release(bool, ROC_SYSTEM_SCOPE_SIGNAL, true, \
- "Enable system scope for signals (uses interrupts).") \
- release(bool, ROC_SKIP_COPY_SYNC, false, \
- "Skips copy syncs if runtime can predict the same engine.") \
--release(bool, ROC_ENABLE_PRE_VEGA, false, \
-+release(bool, ROC_ENABLE_PRE_VEGA, true, \
- "Enable support of pre-vega ASICs in ROCm path") \
- release(bool, HIP_FORCE_QUEUE_PROFILING, false, \
- "Force command queue profiling by default") \
diff --git a/dev-libs/rocm-opencl-runtime/files/rocm-opencl-runtime-5.1.3-remove-clinfo.patch b/dev-libs/rocm-opencl-runtime/files/rocm-opencl-runtime-5.1.3-remove-clinfo.patch
deleted file mode 100644
index d169902563e1..000000000000
--- a/dev-libs/rocm-opencl-runtime/files/rocm-opencl-runtime-5.1.3-remove-clinfo.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-Index: ROCm-OpenCL-Runtime-rocm-5.1.3/CMakeLists.txt
-===================================================================
---- ROCm-OpenCL-Runtime-rocm-5.1.3.orig/CMakeLists.txt
-+++ ROCm-OpenCL-Runtime-rocm-5.1.3/CMakeLists.txt
-@@ -16,7 +16,6 @@ option(EMU_ENV "Enable building for emul
- set(OPENCL_ICD_LOADER_HEADERS_DIR "${CMAKE_CURRENT_LIST_DIR}/khronos/headers/opencl2.2" CACHE PATH "")
- add_subdirectory(khronos/icd)
- add_subdirectory(amdocl)
--add_subdirectory(tools/clinfo)
- add_subdirectory(tools/cltrace)
- if(BUILD_TESTS)
- add_subdirectory(tests/ocltst)
-Index: ROCm-OpenCL-Runtime-rocm-5.1.3/packaging/CMakeLists.txt
-===================================================================
---- ROCm-OpenCL-Runtime-rocm-5.1.3.orig/packaging/CMakeLists.txt
-+++ ROCm-OpenCL-Runtime-rocm-5.1.3/packaging/CMakeLists.txt
-@@ -5,7 +5,6 @@ set(CPACK_COMPONENTS_ALL binary dev icd)
- set(CPACK_DEB_COMPONENT_INSTALL ON)
- set(CPACK_RPM_COMPONENT_INSTALL ON)
-
--install(TARGETS clinfo DESTINATION bin COMPONENT binary)
- install(TARGETS amdocl DESTINATION lib COMPONENT binary)
- install(FILES ${CMAKE_SOURCE_DIR}/LICENSE.txt DESTINATION share/doc/${CMAKE_PROJECT_NAME} COMPONENT binary)
-
diff --git a/dev-libs/rocm-opencl-runtime/files/rocm-opencl-runtime-5.3.3-gcc13.patch b/dev-libs/rocm-opencl-runtime/files/rocm-opencl-runtime-5.3.3-gcc13.patch
deleted file mode 100644
index b1cd513ce6b7..000000000000
--- a/dev-libs/rocm-opencl-runtime/files/rocm-opencl-runtime-5.3.3-gcc13.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-For https://bugs.gentoo.org/895382
-==================================
-From 767241dca886bcd2469d91382afab9d032e1cfa6 Mon Sep 17 00:00:00 2001
-From: Jeremy Newton <Jeremy.Newton@amd.com>
-Date: Wed, 8 Feb 2023 14:16:43 -0500
-Subject: [PATCH] SWDEV-1 - cltrace: Add missing include
-
-Newer GCC's seem to require this.
-
-Signed-off-by: Jeremy Newton <Jeremy.Newton@amd.com>
-Change-Id: I56ef934600729e892f1cd7ab11662760df48aed8
----
- tools/cltrace/cltrace.cpp | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/tools/cltrace/cltrace.cpp b/tools/cltrace/cltrace.cpp
-index be96298..5ac5b62 100644
---- a/tools/cltrace/cltrace.cpp
-+++ b/tools/cltrace/cltrace.cpp
-@@ -17,6 +17,7 @@
- #include <iostream>
- #include <cstring>
- #include <cstdlib>
-+#include <cstdint>
-
- #ifdef _MSC_VER
- #include <windows.h>
diff --git a/dev-libs/rocm-opencl-runtime/rocm-opencl-runtime-5.1.3.ebuild b/dev-libs/rocm-opencl-runtime/rocm-opencl-runtime-5.1.3.ebuild
deleted file mode 100644
index b9015cd84b13..000000000000
--- a/dev-libs/rocm-opencl-runtime/rocm-opencl-runtime-5.1.3.ebuild
+++ /dev/null
@@ -1,130 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit cmake edo flag-o-matic prefix
-
-DESCRIPTION="Radeon Open Compute OpenCL Compatible Runtime"
-HOMEPAGE="https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime"
-SRC_URI="https://github.com/ROCm-Developer-Tools/ROCclr/archive/rocm-${PV}.tar.gz -> rocclr-${PV}.tar.gz
- https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime/archive/rocm-${PV}.tar.gz -> rocm-opencl-runtime-${PV}.tar.gz"
-
-LICENSE="Apache-2.0 MIT"
-SLOT="0/$(ver_cut 1-2)"
-IUSE="debug test"
-RESTRICT="!test? ( test )"
-KEYWORDS="~amd64"
-
-RDEPEND=">=dev-libs/rocr-runtime-${PV}
- >=dev-libs/rocm-comgr-${PV}
- >=dev-libs/rocm-device-libs-${PV}
- >=virtual/opencl-3
- media-libs/mesa[-opencl]"
-DEPEND="${RDEPEND}
- dev-util/opencl-headers"
-BDEPEND=">=dev-build/rocm-cmake-${PV}
- media-libs/glew
- test? ( >=x11-apps/mesa-progs-8.5.0[X] )
- "
-
-PATCHES=(
- "${FILESDIR}/${PN}-5.1.3-remove-clinfo.patch"
- "${FILESDIR}/${PN}-3.5.0-do-not-install-libopencl.patch"
- "${FILESDIR}/${PN}-5.3.3-gcc13.patch"
-)
-
-S="${WORKDIR}/ROCm-OpenCL-Runtime-rocm-${PV}"
-S1="${WORKDIR}/ROCclr-rocm-${PV}"
-
-src_prepare() {
- # Remove "clinfo" - use "dev-util/clinfo" instead
- [ -d tools/clinfo ] && rm -rf tools/clinfo || die
-
- cmake_src_prepare
-
- hprefixify amdocl/CMakeLists.txt
-
- sed -e "s/DESTINATION lib/DESTINATION ${CMAKE_INSTALL_LIBDIR}/g" -i packaging/CMakeLists.txt || die
- # remove trailing CR or it won't work
- sed -e "s/\r$//g" -i tests/ocltst/module/perf/oclperf.exclude || die
-
- pushd ${S1} || die
- # Bug #753377
- # patch re-enables accidentally disabled gfx800 family
- eapply "${FILESDIR}/${PN}-5.0.2-enable-gfx800.patch"
- eapply "${FILESDIR}/rocclr-5.3.3-fix-include.patch"
- eapply "${FILESDIR}/rocclr-5.3.3-gcc13.patch"
- popd || die
-}
-
-src_configure() {
- # Fix ld.lld linker error: https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime/issues/155
- append-ldflags $(test-flags-CCLD -Wl,--undefined-version)
-
- # Reported upstream: https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime/issues/120
- append-cflags -fcommon
-
- local mycmakeargs=(
- -Wno-dev
- -DROCCLR_PATH="${S1}"
- -DAMD_OPENCL_PATH="${S}"
- -DROCM_PATH="${EPREFIX}/usr"
- -DBUILD_TESTS=$(usex test ON OFF)
- -DEMU_ENV=ON
- # -DCMAKE_STRIP=""
- )
- cmake_src_configure
-}
-
-src_install() {
- insinto /etc/OpenCL/vendors
- doins config/amdocl64.icd
-
- cd "${BUILD_DIR}" || die
- insinto /usr/lib64
- doins amdocl/libamdocl64.so
- doins tools/cltrace/libcltrace.so
-}
-
-# Copied from rocm.eclass. This ebuild does not need amdgpu_targets
-# USE_EXPANDS, so it should not inherit rocm.eclass; it only uses the
-# check_amdgpu function in src_test. Rename it to check-amdgpu to avoid
-# pkgcheck warning.
-check-amdgpu() {
- for device in /dev/kfd /dev/dri/render*; do
- addwrite ${device}
- if [[ ! -r ${device} || ! -w ${device} ]]; then
- eerror "Cannot read or write ${device}!"
- eerror "Make sure it is present and check the permission."
- ewarn "By default render group have access to it. Check if portage user is in render group."
- die "${device} inaccessible"
- fi
- done
-}
-
-src_test() {
- check-amdgpu
- cd "${BUILD_DIR}"/tests/ocltst || die
- export OCL_ICD_FILENAMES="${BUILD_DIR}"/amdocl/libamdocl64.so
- local instruction1="Please start an X server using amdgpu driver (not Xvfb!),"
- local instruction2="and export OCLGL_DISPLAY=\${DISPLAY} OCLGL_XAUTHORITY=\${XAUTHORITY} before reruning the test."
- if [[ -n ${OCLGL_DISPLAY+x} ]]; then
- export DISPLAY=${OCLGL_DISPLAY}
- export XAUTHORITY=${OCLGL_XAUTHORITY}
- ebegin "Running oclgl test under DISPLAY ${OCLGL_DISPLAY}"
- if ! glxinfo | grep "OpenGL vendor string: AMD"; then
- ewarn "${instruction1}"
- ewarn "${instruction2}"
- die "This display does not have AMD OpenGL vendor!"
- fi
- ./ocltst -m liboclgl.so -A ogl.exclude
- eend $? || die "oclgl test failed"
- else
- ewarn "${instruction1}"
- ewarn "${instruction2}"
- die "\${OCLGL_DISPLAY} not set."
- fi
- edob ./ocltst -m liboclruntime.so -A oclruntime.exclude
- edob ./ocltst -m liboclperf.so -A oclperf.exclude
-}
diff --git a/dev-libs/rocm-opencl-runtime/rocm-opencl-runtime-5.3.3-r1.ebuild b/dev-libs/rocm-opencl-runtime/rocm-opencl-runtime-5.3.3-r1.ebuild
deleted file mode 100644
index 3e7f3d21381e..000000000000
--- a/dev-libs/rocm-opencl-runtime/rocm-opencl-runtime-5.3.3-r1.ebuild
+++ /dev/null
@@ -1,118 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit cmake edo flag-o-matic
-
-DESCRIPTION="Radeon Open Compute OpenCL Compatible Runtime"
-HOMEPAGE="https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime"
-SRC_URI="https://github.com/ROCm-Developer-Tools/ROCclr/archive/rocm-${PV}.tar.gz -> rocclr-${PV}.tar.gz
- https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime/archive/rocm-${PV}.tar.gz -> rocm-opencl-runtime-${PV}.tar.gz"
-
-LICENSE="Apache-2.0 MIT"
-SLOT="0/$(ver_cut 1-2)"
-IUSE="debug test"
-RESTRICT="!test? ( test )"
-KEYWORDS="~amd64"
-
-RDEPEND=">=dev-libs/rocr-runtime-${PV}
- >=dev-libs/rocm-comgr-${PV}
- >=dev-libs/rocm-device-libs-${PV}
- >=virtual/opencl-3
- media-libs/mesa[-opencl]"
-DEPEND="${RDEPEND}
- dev-util/opencl-headers"
-BDEPEND=">=dev-build/rocm-cmake-${PV}
- media-libs/glew
- test? ( >=x11-apps/mesa-progs-8.5.0[X] )
- "
-
-S="${WORKDIR}/ROCm-OpenCL-Runtime-rocm-${PV}"
-S1="${WORKDIR}/ROCclr-rocm-${PV}"
-
-PATCHES=( "${FILESDIR}/${PN}-5.3.3-gcc13.patch" )
-
-src_prepare() {
- cmake_src_prepare
-
- pushd ${S1} || die
- # Bug #753377
- # patch re-enables accidentally disabled gfx800 family
- eapply "${FILESDIR}/${PN}-5.0.2-enable-gfx800.patch"
- eapply "${FILESDIR}/rocclr-${PV}-fix-include.patch"
- eapply "${FILESDIR}/rocclr-5.3.3-gcc13.patch"
- popd || die
-}
-
-src_configure() {
- # Fix ld.lld linker error: https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime/issues/155
- append-ldflags $(test-flags-CCLD -Wl,--undefined-version)
-
- # Reported upstream: https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime/issues/120
- append-cflags -fcommon
-
- local mycmakeargs=(
- -Wno-dev
- -DROCCLR_PATH="${S1}"
- -DAMD_OPENCL_PATH="${S}"
- -DROCM_PATH="${EPREFIX}/usr"
- -DBUILD_TESTS=$(usex test ON OFF)
- -DEMU_ENV=ON
- -DBUILD_ICD=OFF
- -DFILE_REORG_BACKWARD_COMPATIBILITY=OFF
- )
- cmake_src_configure
-}
-
-src_install() {
- insinto /etc/OpenCL/vendors
- doins config/amdocl64.icd
-
- cd "${BUILD_DIR}" || die
- insinto /usr/lib64
- doins amdocl/libamdocl64.so
- doins tools/cltrace/libcltrace.so
-}
-
-# Copied from rocm.eclass. This ebuild does not need amdgpu_targets
-# USE_EXPANDS, so it should not inherit rocm.eclass; it only uses the
-# check_amdgpu function in src_test. Rename it to check-amdgpu to avoid
-# pkgcheck warning.
-check-amdgpu() {
- for device in /dev/kfd /dev/dri/render*; do
- addwrite ${device}
- if [[ ! -r ${device} || ! -w ${device} ]]; then
- eerror "Cannot read or write ${device}!"
- eerror "Make sure it is present and check the permission."
- ewarn "By default render group have access to it. Check if portage user is in render group."
- die "${device} inaccessible"
- fi
- done
-}
-
-src_test() {
- check-amdgpu
- cd "${BUILD_DIR}"/tests/ocltst || die
- export OCL_ICD_FILENAMES="${BUILD_DIR}"/amdocl/libamdocl64.so
- local instruction1="Please start an X server using amdgpu driver (not Xvfb!),"
- local instruction2="and export OCLGL_DISPLAY=\${DISPLAY} OCLGL_XAUTHORITY=\${XAUTHORITY} before reruning the test."
- if [[ -n ${OCLGL_DISPLAY+x} ]]; then
- export DISPLAY=${OCLGL_DISPLAY}
- export XAUTHORITY=${OCLGL_XAUTHORITY}
- ebegin "Running oclgl test under DISPLAY ${OCLGL_DISPLAY}"
- if ! glxinfo | grep "OpenGL vendor string: AMD"; then
- ewarn "${instruction1}"
- ewarn "${instruction2}"
- die "This display does not have AMD OpenGL vendor!"
- fi
- ./ocltst -m liboclgl.so -A ogl.exclude
- eend $? || die "oclgl test failed"
- else
- ewarn "${instruction1}"
- ewarn "${instruction2}"
- die "\${OCLGL_DISPLAY} not set."
- fi
- edob ./ocltst -m liboclruntime.so -A oclruntime.exclude
- edob ./ocltst -m liboclperf.so -A oclperf.exclude
-}
diff --git a/dev-libs/rocm-opencl-runtime/rocm-opencl-runtime-5.4.3-r1.ebuild b/dev-libs/rocm-opencl-runtime/rocm-opencl-runtime-5.4.3-r1.ebuild
deleted file mode 100644
index fea24ac7dafc..000000000000
--- a/dev-libs/rocm-opencl-runtime/rocm-opencl-runtime-5.4.3-r1.ebuild
+++ /dev/null
@@ -1,136 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit cmake edo flag-o-matic
-
-DESCRIPTION="Radeon Open Compute OpenCL Compatible Runtime"
-HOMEPAGE="https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime"
-
-if [[ ${PV} == *9999 ]] ; then
- EGIT_REPO_URI="https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime"
- EGIT_CLR_REPO_URI="https://github.com/ROCm-Developer-Tools/ROCclr"
- inherit git-r3
- S="${WORKDIR}/${P}"
-else
- KEYWORDS="~amd64"
- SRC_URI="https://github.com/ROCm-Developer-Tools/ROCclr/archive/rocm-${PV}.tar.gz -> rocclr-${PV}.tar.gz
- https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime/archive/rocm-${PV}.tar.gz -> rocm-opencl-runtime-${PV}.tar.gz"
- S="${WORKDIR}/ROCm-OpenCL-Runtime-rocm-${PV}"
-fi
-
-LICENSE="Apache-2.0 MIT"
-SLOT="0/$(ver_cut 1-2)"
-IUSE="debug test"
-RESTRICT="!test? ( test )"
-
-RDEPEND=">=dev-libs/rocr-runtime-5.3
- >=dev-libs/rocm-comgr-5.3
- >=dev-libs/rocm-device-libs-5.3
- >=virtual/opencl-3
- media-libs/mesa[-opencl]"
-DEPEND="${RDEPEND}
- dev-util/opencl-headers"
-BDEPEND=">=dev-build/rocm-cmake-5.3
- test? (
- >=x11-apps/mesa-progs-8.5.0[X]
- media-libs/glew
- )
- "
-
-CLR_S="${WORKDIR}/ROCclr-rocm-${PV}"
-PATCHES=( "${FILESDIR}/${PN}-5.3.3-gcc13.patch" )
-
-src_unpack () {
-if [[ ${PV} == "9999" ]]; then
- git-r3_fetch
- git-r3_checkout
- git-r3_fetch "${EGIT_CLR_REPO_URI}"
- git-r3_checkout "${EGIT_CLR_REPO_URI}" "${CLR_S}"
- else
- default
- fi
-}
-src_prepare() {
- # Fix ld.lld linker error: https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime/issues/155
- append-ldflags $(test-flags-CCLD -Wl,--undefined-version)
-
- cmake_src_prepare
-
- pushd ${CLR_S} || die
- # Bug #753377
- # patch re-enables accidentally disabled gfx800 family
- eapply "${FILESDIR}/${PN}-5.0.2-enable-gfx800.patch"
- eapply "${FILESDIR}/rocclr-5.3.3-gcc13.patch"
- popd || die
-}
-
-src_configure() {
- # Reported upstream: https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime/issues/120
- append-cflags -fcommon
-
- local mycmakeargs=(
- -Wno-dev
- -DROCCLR_PATH="${CLR_S}"
- -DAMD_OPENCL_PATH="${S}"
- -DROCM_PATH="${EPREFIX}/usr"
- -DBUILD_TESTS=$(usex test ON OFF)
- -DEMU_ENV=ON
- -DBUILD_ICD=OFF
- -DFILE_REORG_BACKWARD_COMPATIBILITY=OFF
- )
- cmake_src_configure
-}
-
-src_install() {
- insinto /etc/OpenCL/vendors
- doins config/amdocl64.icd
-
- cd "${BUILD_DIR}" || die
- insinto /usr/lib64
- doins amdocl/libamdocl64.so
- doins tools/cltrace/libcltrace.so
-}
-
-# Copied from rocm.eclass. This ebuild does not need amdgpu_targets
-# USE_EXPANDS, so it should not inherit rocm.eclass; it only uses the
-# check_amdgpu function in src_test. Rename it to check-amdgpu to avoid
-# pkgcheck warning.
-check-amdgpu() {
- for device in /dev/kfd /dev/dri/render*; do
- addwrite ${device}
- if [[ ! -r ${device} || ! -w ${device} ]]; then
- eerror "Cannot read or write ${device}!"
- eerror "Make sure it is present and check the permission."
- ewarn "By default render group have access to it. Check if portage user is in render group."
- die "${device} inaccessible"
- fi
- done
-}
-
-src_test() {
- check-amdgpu
- cd "${BUILD_DIR}"/tests/ocltst || die
- export OCL_ICD_FILENAMES="${BUILD_DIR}"/amdocl/libamdocl64.so
- local instruction1="Please start an X server using amdgpu driver (not Xvfb!),"
- local instruction2="and export OCLGL_DISPLAY=\${DISPLAY} OCLGL_XAUTHORITY=\${XAUTHORITY} before reruning the test."
- if [[ -n ${OCLGL_DISPLAY+x} ]]; then
- export DISPLAY=${OCLGL_DISPLAY}
- export XAUTHORITY=${OCLGL_XAUTHORITY}
- ebegin "Running oclgl test under DISPLAY ${OCLGL_DISPLAY}"
- if ! glxinfo | grep "OpenGL vendor string: AMD"; then
- ewarn "${instruction1}"
- ewarn "${instruction2}"
- die "This display does not have AMD OpenGL vendor!"
- fi
- ./ocltst -m $(realpath liboclgl.so) -A ogl.exclude
- eend $? || die "oclgl test failed"
- else
- ewarn "${instruction1}"
- ewarn "${instruction2}"
- die "\${OCLGL_DISPLAY} not set."
- fi
- edob ./ocltst -m $(realpath liboclruntime.so) -A oclruntime.exclude
- edob ./ocltst -m $(realpath liboclperf.so) -A oclperf.exclude
-}
diff --git a/dev-libs/rocm-opencl-runtime/rocm-opencl-runtime-5.5.1.ebuild b/dev-libs/rocm-opencl-runtime/rocm-opencl-runtime-5.5.1.ebuild
deleted file mode 100644
index c9a0dfc880b7..000000000000
--- a/dev-libs/rocm-opencl-runtime/rocm-opencl-runtime-5.5.1.ebuild
+++ /dev/null
@@ -1,133 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit cmake edo flag-o-matic
-
-DESCRIPTION="Radeon Open Compute OpenCL Compatible Runtime"
-HOMEPAGE="https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime"
-
-if [[ ${PV} == *9999 ]] ; then
- EGIT_REPO_URI="https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime"
- EGIT_CLR_REPO_URI="https://github.com/ROCm-Developer-Tools/ROCclr"
- inherit git-r3
- S="${WORKDIR}/${P}"
-else
- KEYWORDS="~amd64"
- SRC_URI="https://github.com/ROCm-Developer-Tools/ROCclr/archive/rocm-${PV}.tar.gz -> rocclr-${PV}.tar.gz
- https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime/archive/rocm-${PV}.tar.gz -> rocm-opencl-runtime-${PV}.tar.gz"
- S="${WORKDIR}/ROCm-OpenCL-Runtime-rocm-${PV}"
-fi
-
-LICENSE="Apache-2.0 MIT"
-SLOT="0/$(ver_cut 1-2)"
-IUSE="debug test"
-RESTRICT="!test? ( test )"
-
-RDEPEND=">=dev-libs/rocr-runtime-5.3
- >=dev-libs/rocm-comgr-5.3
- >=dev-libs/rocm-device-libs-5.3
- >=virtual/opencl-3
- media-libs/mesa[-opencl]"
-DEPEND="${RDEPEND}"
-BDEPEND=">=dev-build/rocm-cmake-5.3
- media-libs/glew
- test? ( >=x11-apps/mesa-progs-8.5.0[X] )
- "
-
-CLR_S="${WORKDIR}/ROCclr-rocm-${PV}"
-PATCHES=( "${FILESDIR}/${PN}-5.3.3-gcc13.patch" )
-
-src_unpack () {
-if [[ ${PV} == "9999" ]]; then
- git-r3_fetch
- git-r3_checkout
- git-r3_fetch "${EGIT_CLR_REPO_URI}"
- git-r3_checkout "${EGIT_CLR_REPO_URI}" "${CLR_S}"
- else
- default
- fi
-}
-src_prepare() {
- cmake_src_prepare
-
- pushd ${CLR_S} || die
- # Bug #753377
- # patch re-enables accidentally disabled gfx800 family
- eapply "${FILESDIR}/${PN}-5.0.2-enable-gfx800.patch"
- eapply "${FILESDIR}/rocclr-5.3.3-gcc13.patch"
- popd || die
-}
-
-src_configure() {
- # Fix ld.lld linker error: https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime/issues/155
- append-ldflags $(test-flags-CCLD -Wl,--undefined-version)
-
- # Reported upstream: https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime/issues/120
- append-cflags -fcommon
-
- local mycmakeargs=(
- -Wno-dev
- -DROCCLR_PATH="${CLR_S}"
- -DAMD_OPENCL_PATH="${S}"
- -DROCM_PATH="${EPREFIX}/usr"
- -DBUILD_TESTS=$(usex test ON OFF)
- -DEMU_ENV=ON
- -DBUILD_ICD=OFF
- -DFILE_REORG_BACKWARD_COMPATIBILITY=OFF
- )
- cmake_src_configure
-}
-
-src_install() {
- insinto /etc/OpenCL/vendors
- doins config/amdocl64.icd
-
- cd "${BUILD_DIR}" || die
- insinto /usr/lib64
- doins amdocl/libamdocl64.so
- doins tools/cltrace/libcltrace.so
-}
-
-# Copied from rocm.eclass. This ebuild does not need amdgpu_targets
-# USE_EXPANDS, so it should not inherit rocm.eclass; it only uses the
-# check_amdgpu function in src_test. Rename it to check-amdgpu to avoid
-# pkgcheck warning.
-check-amdgpu() {
- for device in /dev/kfd /dev/dri/render*; do
- addwrite ${device}
- if [[ ! -r ${device} || ! -w ${device} ]]; then
- eerror "Cannot read or write ${device}!"
- eerror "Make sure it is present and check the permission."
- ewarn "By default render group have access to it. Check if portage user is in render group."
- die "${device} inaccessible"
- fi
- done
-}
-
-src_test() {
- check-amdgpu
- cd "${BUILD_DIR}"/tests/ocltst || die
- export OCL_ICD_FILENAMES="${BUILD_DIR}"/amdocl/libamdocl64.so
- local instruction1="Please start an X server using amdgpu driver (not Xvfb!),"
- local instruction2="and export OCLGL_DISPLAY=\${DISPLAY} OCLGL_XAUTHORITY=\${XAUTHORITY} before reruning the test."
- if [[ -n ${OCLGL_DISPLAY+x} ]]; then
- export DISPLAY=${OCLGL_DISPLAY}
- export XAUTHORITY=${OCLGL_XAUTHORITY}
- ebegin "Running oclgl test under DISPLAY ${OCLGL_DISPLAY}"
- if ! glxinfo | grep "OpenGL vendor string: AMD"; then
- ewarn "${instruction1}"
- ewarn "${instruction2}"
- die "This display does not have AMD OpenGL vendor!"
- fi
- ./ocltst -m $(realpath liboclgl.so) -A ogl.exclude
- eend $? || die "oclgl test failed"
- else
- ewarn "${instruction1}"
- ewarn "${instruction2}"
- die "\${OCLGL_DISPLAY} not set."
- fi
- edob ./ocltst -m $(realpath liboclruntime.so) -A oclruntime.exclude
- edob ./ocltst -m $(realpath liboclperf.so) -A oclperf.exclude
-}
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-02-13 8:38 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-13 8:38 [gentoo-commits] repo/gentoo:master commit in: dev-libs/rocm-opencl-runtime/, dev-libs/rocm-opencl-runtime/files/ Sam James
-- strict thread matches above, loose matches on Subject: below --
2024-09-19 8:49 Patrick Lauer
2023-02-10 4:26 Sam James
2020-08-23 15:30 Craig Andrews
2019-12-29 22:22 Craig Andrews
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox