This patch adds an option (BUILD_ICD) to toggle the ICD loader build
with rocm-opencl. This isn't useful for official ROCm use, but distros
or users may want build rocm-opencl with their own OCL ICD loader.
The default option is BUILD_ICD=ON.
If this option is set to OFF, an OpenCL OCD loader must be installed
prior to attempting to build rocm-opencl.
E.g. distros already provide ocl icd loader packages:
sudo yum install ocd-icd-devel
sudo apt-get install ocl-icd-opencl-dev
sudo zypper install ocd-icd-devel
Signed-off-by: Jeremy Newton <Jeremy.Newton@amd.com>
Change-Id: I6006593eceed543cd829e8949ec2256482815673
[ROCm/clr commit: d1782940f3]
Use GNUInstallDirs variables to determine the location of BINDIR,
LIBDIR, DOCDIR, and SYSCONFDIR.
Note that CMAKE_INSTALL_LIBDIR is overriden, since the default for RHEL
is lib64, but ROCm packaging wants it to be lib always. Distros or users
can easily override this.
Signed-off-by: Jeremy Newton <Jeremy.Newton@amd.com>
Change-Id: Ifb38263dce80d80c5ebb4eacd8e49c76bb013a44
[ROCm/clr commit: b8c124acb5]
This looks unused. This should allow building rocm-opencl without any
dependency on any particular OCL ICD.
Signed-off-by: Jeremy Newton <Jeremy.Newton@amd.com>
Change-Id: Ib9229ede8400fd0e883275659ab99513b03952cb
[ROCm/clr commit: 86c9bb1946]
Package installed in /opt/rocm
Warpper header files and soft link to libraries for backward compatibilty
Change-Id: Ib1edb27713dfa589369f0a03c59d3ac1b0dc8400
[ROCm/clr commit: c110ac233f]
During RPM upgrade, lib/libOpenCL.so* files/symlinks from the previous
installed version are not removed.
This change will remove those symlinks as part of the RPM remove
or upgrade operation.
Signed-off-by: Saravanan Solaiyappan <saravanan.solaiyappan@amd.com>
Change-Id: Ia943407052ec24911756042a5f9839a605522443
[ROCm/clr commit: 56dde03fbb]
During upgrade lib/libOpenCL.so* files/symlinks are not
removed.
This change will remove those symlinks as part of the upgrade
package activity.
Signed-off-by: Saravanan Solaiyappan <saravanan.solaiyappan@amd.com>
Change-Id: Ia12e89e857b358101f93a6044fe090aa7acafbe0
[ROCm/clr commit: c741a808ae]
CPACK_PACKAGING_INSTALL_PREFIX is defined in the wrong location.
Signed-off-by: Jeremy Newton <Jeremy.Newton@amd.com>
Change-Id: Id8ce6beb1d18878c9132cab335cb372a53cc0ee8
[ROCm/clr commit: 9c1f2da1a2]
Current packaging structure using custom command fail to work for
generating debug symbols.Hence changing the packaging to more
conventional way of using single CMakeLists.txt and split packages
using components like binary, dev and icd
Change-Id: I7fcf5f8afc3602f77576f2a13aa4916acb10888b
[ROCm/clr commit: 8fa82f6e64]
ROCM_DEP_ROCMCORE is not passed to the packaging cmake files, so
rocm-core is never added to the dependency list, even if it's set.
Signed-off-by: Jeremy Newton <Jeremy.Newton@amd.com>
Change-Id: I57ec415b5e2b816f8bc226a66643ca0a808e9a35
[ROCm/clr commit: 3898530e2c]
These packages contains only the ICD loader (libopencl.so). This allows
legacy opencl (PAL) to use these packages instead of duplicating these
packages in both builds.
This also resolves a licensing issue where OCL ICD is licensed as
Apache, while opencl is MIT. Having a separate package avoid license
confusion.
Signed-off-by: Jeremy Newton <Jeremy.Newton@amd.com>
Change-Id: I3dd29239841da7f5dc767419a9bc35d9046e9936
[ROCm/clr commit: cb1e7cd48d]
To fix SWDEV-306293, x86_64-rocm-opencl.conf was renamed to
10-rocm-opencl.conf. This was not changes in the clean up, only in the
creation, so the patch causes a regression by not cleaning up the new
filename.
Signed-off-by: Jeremy Newton <Jeremy.Newton@amd.com>
Change-Id: I4aa456955f6f7c2d52a3560e5e792537f95add17
[ROCm/clr commit: e885ae9591]
Fix FEAT-39125
Add EMU_ENV option. If it is ON, the building is for
emulation environment, thus some logics can be adjusted
to match emulation environment. If it is OFF, the
building is for regular environment.
Currently only ocltst will use the option. But it can
be used for other modules.
Change-Id: I54e1bc1309e82794b41fca2ae1f01f004138dced
[ROCm/clr commit: 76c6dcd558]
renaming rocm-opencl ldconfig file with "10-" prefix to prioritize
over system icd loader.
Change-Id: I0a54de7a0bc0e256d6470eae743ec712d1e42a36
Change-Id: I4af1d0e3e27f40f8b03b798cae43cfd4ba4a1880
[ROCm/clr commit: 3f1e227182]
The license file needs to be installed.
RPM also requires the LICENSE field to be set.
Signed-off-by: Jeremy Newton <Jeremy.Newton@amd.com>
Change-Id: I8bcec77e51b88f3f6a6fa5799d6e38db1d1ab566
[ROCm/clr commit: 5416bcb7e8]
As part of the stack unification some of the application using
opencl seem to depend on libopencl.so provided from thirdparty
providers. For libopencl.so from thirdparty provider to find
libamdocl.so ldconfig path to {opencl install path}/lib is required
Change-Id: I8e12e463209a44177ee433644c75ef0781f1da2f
[ROCm/clr commit: b4b83e274e]
ATI_OS_WIN -> _WIN32
ATI_OS_LINUX -> __linux__
We should not rely on non-standard macros for platform detections.
Change-Id: If1d06e2e1187268df62a59609ea5496ab7eb709d
[ROCm/clr commit: c4aa6febe5]
The OCL_ICD_FILENAMES env var contains a list of OpenCL platforms that
the ICD should prepend to the list of reported platforms. Since the
built amdocl library will show up as the first platform, we can tell
ocltst to always run with platform 0. This way we guarantee that the
correct binary is being loaded.
Using this env var also makes programming LD_LIBRARY_PATH redundant
for Linux.
Change-Id: I8c1729e8b4dd1cd2df1a3da08c7b7addebd08b4f
[ROCm/clr commit: 6c9b07370c]
optind's starting value is 1 and it needs to be reset to 1 after each
getopt() invocation. Resetting it to 0 will cause getopt() to
reinitialize its internal state. This is only needed for some corner
cases. In our current usage, we should be resetting it to 1.
Change-Id: I68da7e41ee8b83b275e2a7bd660c13af569769f1
[ROCm/clr commit: 3d82092632]
clinfo should rely on OpenCL interface, headere file and library only
Change-Id: I8e09aa73b55f1a28c2e4403f52740803d0338c12
[ROCm/clr commit: 19ca123460]
OpenCl applications are expected to work with publicly available
libopencl.so that is capable of finding vendor specific library
libamdocl64.so using the ICD loader entry.
x86_64-rocm-opencl.conf should provide ldconfig entry for
libamdocl64.so and libamdocl64.so shall use RUNPATH for finding
dependencies like hsa runtime.
Change-Id: Icf1267c7a04c1545eae0a7236bf8b7581ffa11ef
[ROCm/clr commit: 4790350f63]