Commit Graph

87 Commits

Author SHA1 Message Date
agunashe 49f0546637 SWDEV-293742 - Update copyright end year VDI repo
Change-Id: I69d2fea4a7a43adf96ccea794270e4af991c5261


[ROCm/clr commit: d96481fb36]
2021-08-22 23:56:07 -07:00
Vladislav Sytchenko ed789dd3dc SWDEV-273235 - Initial support for Windows CMake
This change refactors the current ROCclr cmake build to accomodate a
more modular approach. This allows easier support for multiple compiler
and/or multiple runtime backends.

Currently supported compilers:
    HSAIL - enabled by ROCCLR_ENABLE_HSAIL (defaults to OFF)
    LC    - enabled by ROCCLR_ENABLE_LC    (defaults to ON)

Currently supported runtimes:
    HSA - enabled by ROCCLR_ENABLE_HSA (defaults to ON)
    PAL - enabled by ROCCLR_ENABLE_PAL (defaults to OFF)

Any configuration is supported as long as at least one compiler and one
runtime is enabled.

Since ROCclr clients can configure it differently, one cannot reuse the
same ROCclr build artifacts between different clients. To assure this,
this patch assumes that ROCclr will be built as part of the clients
project.

Change-Id: Id4a5c43634296802b8ae87d1ad5984968391ccaf


[ROCm/clr commit: 7f0c18457d]
2021-08-22 23:56:00 -07:00
Vladislav Sytchenko 6ff739e446 SWDEV-1 - Remove VEGA10_ONLY macro
This is a relic of the past.

Change-Id: I888cf96368e321dcb000c1e59e9ed3f7c5dff7ab


[ROCm/clr commit: 3a12ab8fae]
2021-04-15 16:11:31 -04:00
Vladislav Sytchenko c585ae92a7 SWDEV-280473 - Support HSAIL shared library build
This change makes HSAIL usage similar to that of Comgr. By default, the
runtime will statically link against it, however if HSAIL_DYN_DLL is
defined, then the runtime will try to dynamically load HSAIL.

Currently stick to statically linking to HSAIL. In a feature patch the
dynamic loading behaviour will be enabled.

Change-Id: I6a78a4375975cf847f236b200404c8cf941d012b


[ROCm/clr commit: c7b50bb890]
2021-04-14 12:25:54 -04:00
Jason Tang 12802612a4 SWDEV-277771 - Build rocclr with c++ standard 14
Change-Id: Id91460ca50acd0640d479f207fb169d207648f61


[ROCm/clr commit: 542ae617e5]
2021-03-22 11:28:56 -04:00
Ravi C Akkenapally 1d842c07ec SWDEV-179105 - Stream Operations: Add feature querying support
Change-Id: I01cb85223b83f3655e5e21ad16639da406e5cd3e


[ROCm/clr commit: e94d482c8f]
2021-03-02 11:02:15 -08:00
Tao Sang e6bde7467e SWDEV-270973 - Add missing copyright headers
Change-Id: I6bb17650f74371dae6e29c59fd6bb2022cc062fe


[ROCm/clr commit: c1c5c89cd0]
2021-03-02 12:01:54 -05:00
Jason Tang 09259cd49f SWDEV-198364 - Only enable clgl sharing in ROCm path when building LinuxPro
Change-Id: Ie4d87e252519d090a62b930f7ebb315d3477b690


[ROCm/clr commit: 54a7170e40]
2021-02-23 14:15:04 -05:00
Jason Tang 5b8e6b8e36 SWDEV-268345 - Remove ADDRESS_SANITIZER option from cmake
DevOps is going to add this through build script.

Change-Id: I536d691ea8c05d8289bad1448cac532a8ef93cc4


[ROCm/clr commit: 82c6aabb0a]
2021-02-16 17:37:48 -05:00
Vladislav Sytchenko 086bdf83b4 SWDEV-232428 - Push hostcall implementation to the device layer
This change unifies the hostcall implementation for all the backends,
by pushing the common logic to the device layer. This is done by
replacing the use of hsa_signal_t with device::Signal (a light wrapper
around it).

Change-Id: I7b6fca7930b5a0b199da5d85e2e048354cc04e7b


[ROCm/clr commit: 671778bdd3]
2021-02-16 17:19:57 -05:00
Jason Tang ac06dab550 SWDEV-265304 - Disable GFX8 in LinuxPro ROCr build
Change-Id: Ia26bb025a133a4acb255a539a45668975019cc6e


[ROCm/clr commit: c65be06c4c]
2021-02-16 13:32:47 -05:00
Jason Tang 8eb41aee8c SWDEV-268345 - Enable address sanitizer build when ADDRESS_SANITIZER is ON
Change-Id: I09e5c5b2c21637bc67c23267411c2996ee57aad4


[ROCm/clr commit: 64714fdbbe]
2021-01-22 16:21:50 -05:00
Sarbojit Sarkar cd827fad4d SWDEV-262734: Fix for Numa policy bug
Change-Id: I4be62c1fc45a59d09aa043af1c998b9e308da604


[ROCm/clr commit: 673f483879]
2020-12-16 11:22:32 -05:00
Rahul Garg c829e74be7 Revert "SWDEV-253557 Strip shared lib for release builds"
Fixes SWDEV-256563 - Mainline build breaking issue.

This reverts commit fe7bf0e7e5.

Reason for revert: <INSERT REASONING HERE>

Change-Id: Ib2e9ef362dc7dece9f4bbe7611b4be45087aa18e


[ROCm/clr commit: 6d9ceed2f4]
2020-10-14 17:53:04 -04:00
Reshabh Sharma fe7bf0e7e5 SWDEV-253557 Strip shared lib for release builds
Change-Id: I79608406b3295c762a3781abd455bd63e6893dd4


[ROCm/clr commit: eac709a8a9]
2020-10-14 10:50:07 -04:00
Jason Tang 92cf96e1d0 Export tiny_printf in PAL build
Change-Id: I6166bb3a4d177f03c60e14116c41b9b6da6e6ed2


[ROCm/clr commit: cef70aa8d3]
2020-09-09 10:55:35 -04:00
Tao Sang f3b85497ae Replace private libelf with elfio
Change-Id: I4c630d78f7bf23dda85ec8480bb2790864405657


[ROCm/clr commit: e986f5c820]
2020-08-26 12:32:13 -04:00
Freddy Paul 872b0bedee Align to new hsa cmake target usage.
HIP or any ROCm component above HIP may not be calling
hsa-runtime directly. OpenCl and HIP are the two components
calling ROCclr and to bring in the transitive dependency of
thunk,ROCR,amd_comgr it is better to have the dependency
chain set correctly in the ROCclr cmake target. With this
change OpenCl or HIP should not be setting ROCR dependency
directly.

This helps to link OpenCl(libamdocl.so) link statically with
comgr,hsa,thunk.

Change-Id: I0d538b7abc6a0ce700ec3332b97fc144db5fc5ff


[ROCm/clr commit: 6b8ae3dd77]
2020-07-22 11:21:09 -04:00
Tao Sang 10f1bfc765 Add numa lib detection in cmake
If numa lib is in building system, define ROCCLR_NUMA_SUPPORT to
support numa; otherwise, don't support numa.

Change-Id: I3848d7fdec5a3813ff1edad9b71ff04372dc0b9a


[ROCm/clr commit: 214827defa]
2020-07-21 14:58:56 -04:00
Tao Sang d3dfb225fc Support static lib of comgr
Add "BUILD_SHARED_LIBS" flag to cmake file.
To build libamdhip64.so, you don't need change cmake cmd.
To build libamdhip64.a, you need append
   -DBUILD_SHARED_LIBS=OFF
to cmake cmd.

Change-Id: Ibc30ed52963314b2b8cc1df73c360fc1ba15780a


[ROCm/clr commit: 4d67856bed]
2020-07-11 09:41:03 -04:00
Matt Arsenault f67b99fc26 Enable warnings on unused functions
There weren't all that many to fix, and it's not even the most
prevalent warning.

Change-Id: I286aaa42e3c4e305b1e1918f302bbf71e41dd47d


[ROCm/clr commit: 3a564bc6cb]
2020-07-06 10:29:29 -04:00
Matt Arsenault 3bd3b7298a Fix compiler test for clang
Change-Id: I06e01d3422ec4aa8d0fb8f5d9a44e2a840531a87


[ROCm/clr commit: a430215067]
2020-07-06 10:27:11 -04:00
Jason Tang f2084f8fad Remove finding OpenCL library
Change-Id: I44faa5c3d40430ae9c9bc5440252812a8e7f717d


[ROCm/clr commit: 6f2dfea285]
2020-06-23 12:42:42 -04:00
Aryan Salmanpour 6943b4fa83 move hostcall-based implementation of messages/printf from rocm backend to the common device layer
SWDEV-232428

Change-Id: I14b774e66a1783569c6d34d8759c1faa5f340e27


[ROCm/clr commit: 1bd265f8d6]
2020-06-18 13:49:28 -04:00
Vlad Sytchenko f88ff3ebc1 Enable the use of some warnings when building ROCclr
Enabling anything beyond -Wall like -Wextra or -pedantic seems impossible as our code base explodes in thousands of warnings.

-Wno-unused-{variable/function} is not present in the p4 build, but with gcc7.4.0 we get hundreds of instances of this warning being triggered in the code base.

With this change only two warnings show up during the build - -Wsequence-point and -Wunused-but-set-variable. The fix for the first is alredy in review.

Change-Id: I2ff37981377487b0e07fd9490498e38a60792c0c


[ROCm/clr commit: 947dbe82fb]
2020-06-15 17:32:45 -04:00
Vlad Sytchenko 20c5916b32 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


[ROCm/clr commit: 3a84fcd13e]
2020-06-03 17:25:47 -04:00
Matt Arsenault ff922a013e Use standard cmake option for USE_COMGR_LIBRARY
Change-Id: Id94d88a33772d9c9ab28f9a82c6f761d9c867476


[ROCm/clr commit: 0c539737cf]
2020-06-02 10:32:45 -04:00
Alex Xie 3167f3c725 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


[ROCm/clr commit: 9a8bd9e68b]
2020-06-01 17:47:03 -04:00
Matt Arsenault 4eacd3d38c Don't include llvm directories
There aren't any llvm includes here.

Change-Id: Ifce797c50bde772845923b1054fadd4173b3119a


[ROCm/clr commit: 4d1cbcba4e]
2020-05-29 15:36:26 -04:00
kjayapra-amd bc4adeaf25 SWDEV-229840 - Just adding DDEV_LOG_ENABLE instead of assigning it to -1.
Change-Id: I6859bc55e6e82ffae66ca84ee686c7e76cd8b6f2


[ROCm/clr commit: df6994c3f9]
2020-05-23 11:00:34 -04:00
Matt Arsenault 39011c417d 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


[ROCm/clr commit: 8988f34935]
2020-05-21 13:47:59 -04:00
Matt Arsenault 8789cbafa1 Don't add_subdirectory on a binary directory
This doesn't make sense and didn't do anything.

Change-Id: If6cbcd9269d8d45b091f100318afd3ab9ec6ceec


[ROCm/clr commit: a38144dec7]
2020-05-20 09:01:08 -04:00
Matt Arsenault 24cc417ec1 Fix missing target includes for GL/EGL headers
Change-Id: I9a31eae40cb7187dd0264ad5b9577fab96464b41


[ROCm/clr commit: 3624b8df16]
2020-05-14 16:56:34 -04:00
Matt Arsenault 26597f888a 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


[ROCm/clr commit: 3a7f2e3682]
2020-05-13 17:25:58 -04:00
Matt Arsenault 49c251e518 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


[ROCm/clr commit: 199f6114d0]
2020-05-13 16:30:43 -04:00
Michael LIAO b785d25506 Clear executable permission.
Change-Id: Ia0d363b1ba89d7947e5b5a55cb67edba86f0515e


[ROCm/clr commit: 503ef06555]
2020-05-07 10:38:58 -04:00
Payam f66b02a3a2 name change vdi to rocclr
Change-Id: I856d6ac1a9a83d89715d6e33dec4aa17abc2f2f2


[ROCm/clr commit: d6100a9547]
2020-05-06 00:54:45 -04:00
kjayapra-amd aa6dfb2d96 SWDEV-209747 - Enable DevLogs on DEBUG or DEV_LOG_ENABLE Compiletime var
Change-Id: Ie5b7855c469f03947b680d4844c1657cbae55b11


[ROCm/clr commit: 8931ac106c]
2020-05-05 09:55:54 -04:00
Matt Arsenault 1cb198dba2 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


[ROCm/clr commit: cba7a4d20e]
2020-04-28 16:41:34 -04:00
Matt Arsenault 1060511a84 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


[ROCm/clr commit: e7d6a5e5a6]
2020-04-24 12:38:42 -04:00
Matt Arsenault 9ad645d7a8 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


[ROCm/clr commit: c60d7d860d]
2020-04-24 12:12:54 -04:00
Matt Arsenault df90e345d0 Don't use include_directories for ROCR includes
Use the modern cmake, target specified method.

Change-Id: Icd7196bfccb85f255bbc01bc87c6667d961bb236


[ROCm/clr commit: 350d54e198]
2020-04-24 11:05:40 -04:00
Matt Arsenault a8f183bb1b Use target_compile_definitions for HSA vs. PAL device macros
Change-Id: I7e1240cb4d32ce86948814d727a516025ee976fa


[ROCm/clr commit: ff12016c7b]
2020-04-24 11:05:16 -04:00
Matt Arsenault e12c98c3dd 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


[ROCm/clr commit: 815198bec9]
2020-04-24 11:04:52 -04:00
Matt Arsenault c81f73d82b Unscreamake some cmake functions
This was already using the new lowercase style in most places.

Change-Id: I7ed04a3652c932581a2897f2fee79d79aa732f8e


[ROCm/clr commit: ec62f9b8de]
2020-04-24 11:04:21 -04:00
Matt Arsenault ca932ef38d Remove leftover cmake debug printing
Change-Id: I886b21717eadab6b4365ddaff063fbcd37300aa8


[ROCm/clr commit: 3c2e0f6155]
2020-04-24 11:03:37 -04:00
Matt Arsenault e5fb81bb55 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


[ROCm/clr commit: 83455f36c5]
2020-04-24 11:03:27 -04:00
Matt Arsenault 36c3008b33 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


[ROCm/clr commit: a36f19df51]
2020-04-24 11:02:52 -04:00
Matt Arsenault 97100bbd20 Use cmake features to set c++ version
Change-Id: I2649cdca5bc68298371f770a7a624a21db3f4137


[ROCm/clr commit: d4a447967e]
2020-04-21 16:01:30 -04:00
Matt Arsenault f4faac3cb6 Update cmake project name
Change-Id: If4bdf15ca3774148c0c415e8cd950efa310ef62f


[ROCm/clr commit: 356c3bf5b8]
2020-04-21 15:23:06 -04:00