Commit Graph

62 Commits

Author SHA1 Message Date
Vlad Sytchenko 3a84fcd13e Handle the option USE_COMGR_LIBRARY correctly
This is a follow up to http://gerrit-git.amd.com/c/compute/ec/vdi/+/359563. The setting is now either ON or OFF, never "yes".

Change-Id: I031d013a8d239dc72ef610da81bd31b8b78a3ba8
2020-06-03 17:25:47 -04:00
Matt Arsenault 0c539737cf Use standard cmake option for USE_COMGR_LIBRARY
Change-Id: Id94d88a33772d9c9ab28f9a82c6f761d9c867476
2020-06-02 10:32:45 -04:00
Alex Xie 9a8bd9e68b ROCMOPS-924 centos-6.10 support for opencl_on_rocclr build
Fix a build error in centos 6.10. When linking, ld cannot find function
clock_getres. This function is from librt (for glibc version before 2.17).

Change-Id: I698f768d0618a054d5d0fc73b9f1916a7ce542fb
2020-06-01 17:47:03 -04:00
Matt Arsenault 4d1cbcba4e Don't include llvm directories
There aren't any llvm includes here.

Change-Id: Ifce797c50bde772845923b1054fadd4173b3119a
2020-05-29 15:36:26 -04:00
kjayapra-amd df6994c3f9 SWDEV-229840 - Just adding DDEV_LOG_ENABLE instead of assigning it to -1.
Change-Id: I6859bc55e6e82ffae66ca84ee686c7e76cd8b6f2
2020-05-23 11:00:34 -04:00
Matt Arsenault 8988f34935 Export targets for find_package
Currently the opencl build hardcodes the path and directly includes
amdvdi_staticTargets.cmake. The proper way to find this is through
find_package, so start exporting the expected format.

Change-Id: Ic960a2dd467d57867cb96ab831dbd85bca336535
2020-05-21 13:47:59 -04:00
Matt Arsenault a38144dec7 Don't add_subdirectory on a binary directory
This doesn't make sense and didn't do anything.

Change-Id: If6cbcd9269d8d45b091f100318afd3ab9ec6ceec
2020-05-20 09:01:08 -04:00
Matt Arsenault 3624b8df16 Fix missing target includes for GL/EGL headers
Change-Id: I9a31eae40cb7187dd0264ad5b9577fab96464b41
2020-05-14 16:56:34 -04:00
Matt Arsenault 3a7f2e3682 Improve usage of target_include_directories
Eliminates most of the global include_directories. The install header
paths are different from the build directory, so we have to separate
those for the exported target include paths.

Change-Id: I13e4c56c1218cb31c29a316422dc5fd1d09d8b1b
2020-05-13 17:25:58 -04:00
Matt Arsenault 199f6114d0 Move top.hpp into include directory
This partially avoids a difference in the include paths between a
build and install tree, and simplifies the install configuration.

Change-Id: If8119507594e0d284ac08c141c6c51c88ec619ef
2020-05-13 16:30:43 -04:00
Michael LIAO 503ef06555 Clear executable permission.
Change-Id: Ia0d363b1ba89d7947e5b5a55cb67edba86f0515e
2020-05-07 10:38:58 -04:00
Payam d6100a9547 name change vdi to rocclr
Change-Id: I856d6ac1a9a83d89715d6e33dec4aa17abc2f2f2
2020-05-06 00:54:45 -04:00
kjayapra-amd 8931ac106c SWDEV-209747 - Enable DevLogs on DEBUG or DEV_LOG_ENABLE Compiletime var
Change-Id: Ie5b7855c469f03947b680d4844c1657cbae55b11
2020-05-05 09:55:54 -04:00
Matt Arsenault cba7a4d20e Avoid intermediate object library
Object libraries are weird, and producing a library by using the
target objects from them doesn't automatically import the interface
properties of the linked targets. These object libraries only have
single uses, so just directly create the final library from the
sources.

Leaves libelf as an object library, since there seems to be some cmake
oddity when trying to link an unexported target to an exported one.

Change-Id: Ic379612c89340c40085c9862cfe111fa4bbff425
2020-04-28 16:41:34 -04:00
Matt Arsenault e7d6a5e5a6 Prune some unused compile definitions
There's a lot of unnecessary system configuration junk here which
isn't used, and is already available through compiler predefines. This
is also blindly placed without really checking the host architecture.

-DLINUX is unused.

-D__AMD64__ is predefined by the compiler, and is also redundant with
 __x86_64__ and ATI_BITS_64.

__x86_64__ should also be removed. It's used in libelf, but I'm not
sure if msvc predefines this or not.

-DqLittleEndian is unused, and also doesn't follow macro naming
 conventions (plus compilers have their own predefines for checking
 this).

Change-Id: I89f6fc4c88e861623be7f32df41aecbb4e9009ab
2020-04-24 12:38:42 -04:00
Matt Arsenault c60d7d860d Add comgr macros to public definition export
This should allow the cmake build for the opencl runtime to work
without manually adding these definitions. The PAL build also adds
these as private defines in its build, so change rocm to match. This
should probably be including these a config header to benefit other
builds, but this will at least avoid some clutter in the opencl build
for now.

Change-Id: I1044984b87ba3fc72e280e255ceea2dd9e3337ff
2020-04-24 12:12:54 -04:00
Matt Arsenault 350d54e198 Don't use include_directories for ROCR includes
Use the modern cmake, target specified method.

Change-Id: Icd7196bfccb85f255bbc01bc87c6667d961bb236
2020-04-24 11:05:40 -04:00
Matt Arsenault ff12016c7b Use target_compile_definitions for HSA vs. PAL device macros
Change-Id: I7e1240cb4d32ce86948814d727a516025ee976fa
2020-04-24 11:05:16 -04:00
Matt Arsenault 815198bec9 Cleanup libelf build
Use target specific forms for define/include. Don't set
CMAKE_CXX_FLAGS for the standard, which is already implied from the
parent build.

Change-Id: I4000893376d6685e9889b66ad8451fc493020272
2020-04-24 11:04:52 -04:00
Matt Arsenault ec62f9b8de Unscreamake some cmake functions
This was already using the new lowercase style in most places.

Change-Id: I7ed04a3652c932581a2897f2fee79d79aa732f8e
2020-04-24 11:04:21 -04:00
Matt Arsenault 3c2e0f6155 Remove leftover cmake debug printing
Change-Id: I886b21717eadab6b4365ddaff063fbcd37300aa8
2020-04-24 11:03:37 -04:00
Matt Arsenault 83455f36c5 Modernize cmake usage for finding amd_comgr
Don't use find_path on the header, it's redundant with the interface
include directories on the imported target. Use the target specific
forms for including and linking it.

Change-Id: I3923143c992888ee7d5ee1130084ac2e5eaa0f3a
2020-04-24 11:03:27 -04:00
Matt Arsenault a36f19df51 Don't use CMAKE_SOURCE_DIR
This is almost never the correct thing to use since it breaks adding
this as a subproject build in a larger build. Switch to refer to
CMAKE_CURRENT_SOURCE_DIR, which is equivalent in a standalone build.

Change-Id: Ib8dbbc0668491f4227389b9a5b27da770b3bc5ce
2020-04-24 11:02:52 -04:00
Matt Arsenault d4a447967e Use cmake features to set c++ version
Change-Id: I2649cdca5bc68298371f770a7a624a21db3f4137
2020-04-21 16:01:30 -04:00
Matt Arsenault 356c3bf5b8 Update cmake project name
Change-Id: If4bdf15ca3774148c0c415e8cd950efa310ef62f
2020-04-21 15:23:06 -04:00
Saleel Kudchadker a97f206ab1 Change for OpenCL2.2 header promotion
Change-Id: Icd579e5c94af6e8d984a3f6c2606be44dec72e91
2020-04-01 16:32:03 -04:00
German Andryeyev 85c09043f3 SWDEV-79445 - Remove cl_amd_object_metadata extension
Change-Id: I35502d5e3bd4be4a087f4b49b68098f8aa31fdb4
2020-03-24 19:12:52 -04:00
Jason Tang f51ff32113 Seperate PAL and ROCm
Change-Id: I7d0fbbab88c0541f17274da6e8850f2c6783dcd1
2020-03-03 16:06:51 -05:00
Payam 19791a242b clean up
Change-Id: Ic0201ffd1231f05d265165c62b475f768756991c
2020-02-25 02:13:12 -05:00
Payam e019d12f81 updated install to include header files from include dir and elf dir
Change-Id: Ie7a8de6e5788de082703d806d0e5248bee9d1394
2020-02-19 16:42:12 -05:00
German Andryeyev da5f4c554e Add CMake support for PAL backend
Change-Id: Id0673d43217be305aa4ca7a612c416baee3fb23c
2020-02-10 11:18:24 -05:00
Payam 853b2e38a4 updated find_path for opencl so it doesn't break cmake if opencl dir is passed
and opencl path is not found

Change-Id: I288dccef8d871bdf4e3e146de9337c1938c231ac
2020-02-07 02:45:46 -05:00
Laurent Morichetti 20c7173849 Merge branch 'origin/pghafari/vdi-prototype' into lmoriche/amd-master
Change-Id: Id3b833d405596735becb3346f3b08c6da57033fe
2020-01-30 20:12:13 -08:00
foreman 1927416168 P4 to Git Change 2028995 by jatang@jatang_win_pal_lc on 2019/11/12 11:56:20
SWDEV-207835 - Implement uniform package versioning for cmake version of OpenCL.

	Need to generate the same style of packages name as the Makefile version does.

Affected files ...

... //depot/stg/opencl/drivers/opencl/CMakeLists.txt#29 edit
2019-11-12 12:04:53 -05:00
foreman d468e85281 P4 to Git Change 1978446 by kzhuravl@kzhuravl-spot-ocl on 2019/08/05 11:37:30
SWDEV-79445 - OCL generic changes and code clean-up

	Bring cmake changes from gerrit (reviewed and tested on gerrit)

Affected files ...

... //depot/stg/opencl/drivers/opencl/CMakeLists.txt#28 edit
... //depot/stg/opencl/drivers/opencl/tools/clinfo/CMakeLists.txt#7 edit
2019-08-05 11:41:06 -04:00
foreman ed4ddbb31d P4 to Git Change 1977064 by kzhuravl@kzhuravl-spot-ocl on 2019/08/01 12:38:51
SWDEV-79445 - OCL generic changes and code clean-up

	- Changes to allow the use of newer icd revisions - http://git.amd.com:8080/c/compute/ec/opencl/+/248346

	Reviewed on gerrit
	Tested locally

Affected files ...

... //depot/stg/opencl/drivers/opencl/CMakeLists.txt#27 edit
2019-08-01 12:50:41 -04:00
foreman 9f4f52ca73 P4 to Git Change 1977054 by kzhuravl@kzhuravl-spot-ocl on 2019/08/01 12:32:41
SWDEV-79445 - OCL generic changes and code clean-up

	- Fix COMGR+CMAKE combination - http://git.amd.com:8080/c/compute/ec/opencl/+/247843
	- Fix and clean up packaging (cmake) - http://git.amd.com:8080/c/compute/ec/opencl/+/247844

Affected files ...

... //depot/stg/opencl/drivers/opencl/CMakeLists.txt#26 edit
... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/CMakeLists.txt#19 edit
... //depot/stg/opencl/drivers/opencl/runtime/CMakeLists.txt#16 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/devprogram.cpp#54 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/CMakeLists.txt#21 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocprogram.cpp#104 edit
... //depot/stg/opencl/drivers/opencl/tools/clinfo/CMakeLists.txt#6 edit
2019-08-01 12:44:10 -04:00
foreman 12175a7af9 P4 to Git Change 1975195 by pghafari@pghafari-gera-win10 on 2019/07/29 14:54:55
SWDEV-197122 - updated cmake for hip-vdi-rorc

Affected files ...

... //depot/stg/opencl/drivers/opencl/CMakeLists.txt#25 edit
... //depot/stg/opencl/drivers/opencl/api/hip/CMakeLists.txt#2 edit
2019-07-29 15:01:09 -04:00
foreman b21a094a92 P4 to Git Change 1971654 by kzhuravl@kzhuravl-spot-ocl on 2019/07/22 17:15:57
SWDEV-79445 - Bring cmake related changes from git

	http://git.amd.com:8080/c/compute/ec/opencl/+/229473
	http://git.amd.com:8080/c/compute/ec/opencl/+/229474
	http://git.amd.com:8080/c/compute/ec/opencl/+/233268

	+

	Payam's changes for comgr

Affected files ...

... //depot/stg/opencl/drivers/opencl/CMakeLists.txt#24 edit
... //depot/stg/opencl/drivers/opencl/DEB/postinst#1 add
... //depot/stg/opencl/drivers/opencl/DEB/prerm#1 add
... //depot/stg/opencl/drivers/opencl/RPM/rpm_post#1 add
... //depot/stg/opencl/drivers/opencl/RPM/rpm_postun#1 add
... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/CMakeLists.txt#18 edit
... //depot/stg/opencl/drivers/opencl/cmake/modules/FindROCR.cmake#3 edit
... //depot/stg/opencl/drivers/opencl/cmake/modules/FindROCT.cmake#1 add
... //depot/stg/opencl/drivers/opencl/runtime/CMakeLists.txt#15 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/CMakeLists.txt#20 edit
2019-07-22 17:19:35 -04:00
foreman 3ee86b8db7 P4 to Git Change 1968653 by marsenau@marsenau-fiji on 2019/07/16 17:57:30
SWDEV-79445 - Don't use amdgizcl. This has been unnecessary for a long time.

Affected files ...

... //depot/stg/opencl/drivers/opencl/CMakeLists.txt#23 edit
2019-07-16 17:59:51 -04:00
foreman d07fd4bd06 P4 to Git Change 1753206 by kzhuravl@bos-10-kzhuravl-sc on 2019/03/07 21:36:25
SWDEV-125823 - Use ccache if ROCM_OPENCL_CCACHE_BUILD=ON

	This is a preparation for enabling ccache in our Jenkins jobs.

	Change-Id: I3d0ae3fbf0f14afdd828fc51120f24b130ee105d

	Reviewed and tested: http://git.amd.com:8080/c/compute/ec/opencl/+/208573

Affected files ...

... //depot/stg/opencl/drivers/opencl/CMakeLists.txt#22 edit
2019-03-07 21:52:47 -05:00
foreman 2dcc063b81 P4 to Git Change 1618184 by kzhuravl@kzhuravl-fiji-ocllc-2 on 2018/10/12 14:28:12
SWDEV-125823 - Fix cmake-based opencl build from p4

	//depot/mirrors/amdgcn.git/* changes would be submitted through gerrit.

Affected files ...

... //depot/stg/opencl/drivers/opencl/CMakeLists.txt#21 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/utils/v0_8/libUtils.cpp#35 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/utils/v0_8/libUtils.h#35 edit
... //depot/stg/opencl/drivers/opencl/runtime/CMakeLists.txt#14 edit
2018-10-18 03:07:56 -04:00
foreman a326b96d41 P4 to Git Change 1590860 by lmoriche@lmoriche_opencl_dev2 on 2018/08/08 12:49:56
SWDEV-161464 - OpenCL github project rpm and deb package issue
	- Add CPack packaging to the CMake build.

Affected files ...

... //depot/stg/opencl/drivers/opencl/CMakeLists.txt#20 edit
... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/CMakeLists.txt#14 edit
2018-08-08 13:05:50 -04:00
foreman 23f5df6686 P4 to Git Change 1478111 by yaxunl@yaxunl_stg_win50 on 2017/11/02 14:37:52
SWDEV-120711 - Synch CMake change about switching to new addr space mapping.

Affected files ...

... //depot/stg/opencl/drivers/opencl/CMakeLists.txt#19 edit
2017-11-02 14:42:08 -04:00
foreman 6afeb11d56 P4 to Git Change 1477431 by kzhuravl@kzhuravl-fiji-ocllc on 2017/11/01 12:56:46
SWDEV-102733 - Update cmake for CL 1455364

	Testing: open source build, also here http://git.amd.com:8080/#/c/113674/

Affected files ...

... //depot/stg/opencl/drivers/opencl/CMakeLists.txt#18 edit
... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/CMakeLists.txt#12 edit
... //depot/stg/opencl/drivers/opencl/runtime/CMakeLists.txt#7 edit
2017-11-01 13:01:29 -04:00
foreman d52e0bf530 P4 to Git Change 1476932 by kzhuravl@kzhuravl-fiji-ocllc on 2017/10/31 16:10:43
SWDEV-102733 - Bring CMakeLists.txt in sync with open source

	 - Remove extra empty lines
	 - Add new lines at the end of files

Affected files ...

... //depot/stg/opencl/drivers/opencl/CMakeLists.txt#17 edit
... //depot/stg/opencl/drivers/opencl/tools/clinfo/CMakeLists.txt#4 edit
2017-10-31 16:19:51 -04:00
foreman a4696ffec9 P4 to Git Change 1465020 by emankov@em-hsa-lightning on 2017/09/29 13:04:54
SWDEV-102733 - [OCL-LC-ROCm] Update from git http://git.amd.com:8080/#/c/109326/

Affected files ...

... //depot/stg/opencl/drivers/opencl/CMakeLists.txt#16 edit
2017-09-29 13:11:05 -04:00
foreman 81a57cc378 P4 to Git Change 1453266 by fdaniil@rocm_spec on 2017/08/30 12:27:36
SWDEV-102733 - [OCL-LC-ROCm] Cmake build Write CMakeLists.txt to enable building with and without the DK environment

	Update from git http://git.amd.com:8080/#/c/103512/

	1. fixed ninja warning on multiple targets generating .inc files
	2. added libamdocl64.so and libOpenCL.so.1.2 libraries installation into install/lib
	3. added Khronos OpenCL headers installation into install/include
	4. added clinfo application installation int install/bin
	5. removed installation of dozens of LLVM libs and tools
	6. fixed minor misspellings in llvm options setup

Affected files ...

... //depot/stg/opencl/drivers/opencl/CMakeLists.txt#15 edit
... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/CMakeLists.txt#11 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/CMakeLists.txt#9 edit
... //depot/stg/opencl/drivers/opencl/tools/clinfo/CMakeLists.txt#3 edit
2017-08-30 12:44:23 -04:00
foreman f27162ba57 P4 to Git Change 1444296 by lmoriche@lmoriche_palamida on 2017/08/08 00:10:29
SWDEV-102733 - [OCL-LC-ROCm] Cmake build Write CMakeLists.txt to enable building with and without the DK environment
	- Disable LLVM object compression. Allows closed source LLVM binaries to run with the open source runtime
	- Define the DEBUG macro for Debug build types
	- Use the prepared amdgcn lib instead of the static lib when generating the .bc includes for the runtime.

Affected files ...

... //depot/stg/opencl/drivers/opencl/CMakeLists.txt#14 edit
... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/CMakeLists.txt#9 edit
... //depot/stg/opencl/drivers/opencl/runtime/CMakeLists.txt#6 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/CMakeLists.txt#8 edit
2017-08-08 00:31:20 -04:00
foreman ca5e8526e0 P4 to Git Change 1434399 by lmoriche@lmoriche_palamida on 2017/07/14 14:29:20
SWDEV-102733 - [OCL-LC-ROCm] Cmake build Write CMakeLists.txt to enable building with and without the DK environment
	- Update from git.

Affected files ...

... //depot/stg/opencl/drivers/opencl/CMakeLists.txt#13 edit
... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/CMakeLists.txt#7 edit
2017-07-14 14:54:24 -04:00