Commit Graph

294 Commits

Author SHA1 Message Date
Satyanvesh Dittakavi 53dcdf2b46 SWDEV-393060 - Address directed tests build failures with CLR
Change-Id: I76b93ee073d21ec5fae0db5a129ada89f750855d


[ROCm/clr commit: a3104c60e1]
2023-04-14 03:53:51 -04:00
Ajay 369f587081 SWDEV-393406 - hip catch/directed tests on nvidia
fix the duplicate symbolic link issue

Change-Id: I472dfba80263d0f1d275d8e149007322c8af3f7c


[ROCm/clr commit: e5a300f892]
2023-04-10 19:54:23 +00:00
Ajay 4eaa9fa01a SWDEV-361630 - clr to be able to build hip directed tests
Change-Id: I85b45c52573683a963ac2b4ee0ec7c79653ecc4d


[ROCm/clr commit: 5e9545fdfd]
2023-04-07 14:21:34 -04:00
Ranjith Ramakrishnan c1be6ffca3 SWDEV-351540 - ASAN packaging for hip
Package ASAN libraries and license file
Suffix "asan" added to package name

Change-Id: Ia02bb55be0bd415dbd372b39ce884c38d8c3dcbf


[ROCm/clr commit: 267b342523]
2023-04-07 11:54:48 +00:00
Rahul Garg b02b0b13f0 SWDEV-379678 - Remove catch build option
Change-Id: Idedf5e61da1e6c7fbdd9a65e57220875a3b24112


[ROCm/clr commit: 118e7144f8]
2023-01-30 11:04:03 -05:00
Maneesh Gupta a2a134968c SWDEV-1 - Use VERSION file instead of hipvars.pm for versioning
Change-Id: I9974aec388c9a89f4ed79a974dea99ec1e8257b8


[ROCm/clr commit: e0516a6984]
2023-01-18 02:39:12 -05:00
Satyanvesh Dittakavi e960c639b7 SWDEV-344342 - Expose hiprtc target via cmake config interface
Change-Id: I1f19c4792665b078c2799c0c3c9e2d5b28c906de


[ROCm/clr commit: ab112eaf1d]
2022-08-25 00:29:23 -04:00
Ranjith Ramakrishnan a2b9eb12d4 SWDEV-353137 - Fix for incorrect library path for hiprtc
Hiprtc related libraries are duplicated when installed from build directory
This happens when cmake install libdir is set with lib64 as default and using hard code path "lib" for LIBRARY_DESTINATION
Replaced "lib" with cmake install libdir
Removed the default setting of libdir in source code and its should be controlled via build argument

Change-Id: Icac55eac9427a5088903d01942e6bfd5263a6fc0


[ROCm/clr commit: ba04f95771]
2022-08-23 12:19:06 -04:00
Ranjith Ramakrishnan 96e042b340 SWDEV-345579 - Fix the installation path of FindHIP
The path variable was used incorrectly and this is causing issue in spack build

Change-Id: I34890577f1403d0d5efcba80d417ad5f9720aa6e


[ROCm/clr commit: d65aaf2f78]
2022-07-11 14:40:43 -04:00
Ranjith Ramakrishnan eea147de6e SWDEV-344894 - Remove workaround code to strip the destination directory hip
HIP build scripts updated, so that cmake install prefix and cpack packaging prefix doesn't have destination directory hip
The workaround in source code is not at all required.

Depends-On: I6775407b4bfec84b6b911d333f3725c310539bfc
Change-Id: Ic1f5e170690d6dba0fec493143dea390c435cd42


[ROCm/clr commit: db6eaa35aa]
2022-07-11 13:00:44 -04:00
Jeremy Newton 45f1f89a97 SWDEV-335990 - Use GNUInstallDirs
This is attempt two of a5b6de5037

GNUInstallDirs is used to allow the user to customize the install paths
of HIP, rather than using hardcoded locations.

See documentation for more information:
https://cmake.org/cmake/help/latest/module/GNUInstallDirs.html

Note that libdir must be overriden to "lib" before including
GNUInstallDirs, because by default, cmake tries to detect the libdir
path, but ROCm packaging would like to use lib by default for all
targets. This does not stop the user (or distros) from overriding.

Also note this change does no take into account the changes needed to
non-cmake files, such as perl scripts, so not all paths combinations are
necessarily functional.

Signed-off-by: Jeremy Newton <Jeremy.Newton@amd.com>
Change-Id: I521c44dc34404b136141682c2777257b23ffa6e8


[ROCm/clr commit: 112b6370a5]
2022-06-15 13:14:47 -04:00
Aakash Sudhanwa d23814bc40 Revert "SWDEV-335990 - Use GNUInstallDirs"
This reverts commit a5b6de5037.

Reason for revert: <Breaking all the staging builds. this is breaking components which are using find_package(HIP)>

Change-Id: Ic7340fb461a5efdd170a0988731e0885538a11d6


[ROCm/clr commit: 43c650cf48]
2022-06-07 18:18:06 -04:00
Jeremy Newton a5b6de5037 SWDEV-335990 - Use GNUInstallDirs
GNUInstallDirs is used to allow the user to customize the install paths
of HIP, rather than using hardcoded locations.

See documentation for more information:
https://cmake.org/cmake/help/latest/module/GNUInstallDirs.html

Note that libdir must be overriden to "lib" before including
GNUInstallDirs, because by default, cmake tries to detect the libdir
path, but ROCm packaging would like to use lib by default for all
targets. This does not stop the user (or distros) from overriding.

Also note this change does no take into account the changes needed to
non-cmake files, such as perl scripts, so not all paths combinations are
necessarily functional.

Signed-off-by: Jeremy Newton <Jeremy.Newton@amd.com>
Change-Id: Iae80f47c47ea0a74fc1c221b6eea82b557601394


[ROCm/clr commit: bf4df229c9]
2022-06-06 23:43:05 -04:00
Cordell Bloor 2e0b90e818 SWDEV-335902 - Fix HIP when Git info unavailable
Prior to this change, when Git_FOUND was false, HIP_VERSION_BUILD_ID
would be undefined in the CMake code. The value of HIP_VERSION_BUILD_ID
in <hip/hip_version.h> is taken from the CMake variable, so it was being
defined as nothing in those cases. That would cause compilation failures,
as src/hip_global.cpp contains the function:

    size_t amd_dbgapi_get_build_id() {
      return HIP_VERSION_BUILD_ID;
    }

which would become

    size_t amd_dbgapi_get_build_id() {
      return ;
    }

after preprocessing. To prevent this, we can define the version
information to a default value when Git is not found.

A related problem was reported by Harmen Stoppels in
https://github.com/ROCm-Developer-Tools/HIP/pull/2218. When Git
is not available (or if the library is being built from a tarball),
the HIP_VERSION_GITHASH is not defined. This causes trouble because
HIP_LIB_VERSION_STRING is defined as "X.Y.Z-${HIP_VERSION_GITHASH}"
and therefore becomes "X.Y.Z-".

The incomplete version string becomes a problem when it is appended
to the shared library file name. File names that end with '-' confuse
the linker. They cause strange errors when attempting to link to the
HIP library. This problem can be prevented by dropping the trailing
dash and using "X.Y.Z" as the version string when HIP_VERSION_GITHASH
is not defined.

Change-Id: I6e290c1f1b603ba30c9ded885e125d9ca9a2e688
Signed-off-by: Cordell Bloor <Cordell.Bloor@amd.com>


[ROCm/clr commit: 9c450d6f66]
2022-05-09 13:44:09 -04:00
Joseph Greathouse 693fa73f53 SWDEV-332811 - Clean up and extend HIP unsafe atomic add
Update HIP's unsafeAtomicAdd to:
 - Compile properly even when not compiling for gfx90a
 - Fall back to safe atomic add on non-gfx90a architectures
 - use flat atomic add for FP64 on gfx90a, instead of dynamically
   checking memory spaces.

In addition, when the compiler is passed -munsafe-fp-atomics, it
will define __AMDGCN_UNSAFE_FP_ATOMICS__. When this happens, the
compiler is requesting that the HIP headers force all HIP
atomicAdd() calls on floats or doubles to use their unsafe versions.

This patch thus causes unsafeAtomicAdd() calls when that define
is seen. This call to unsafeAtomicAdd() is also done for atomicSub(),
since that calls atomicAdd underneath. This is not done for
system-scope atomicAdd because, on gfx90a, system-scope atomic FP
add instructions would need to target fine-grained memory, which is
always unsafe.

This patch also creates safeAtomicAdd() functions for float and double.
These functions will create a standalone safe atomic, even when the
application is compiled with -munsafe-fp-atomics.

Finally, this patch adds wrappers in the Nvidia path of HIP so that
these HIP functions call through to atomicAdd there as well.

Change-Id: I8af0621d3d28ea30c9278bfeea7393d03bbdac6d


[ROCm/clr commit: f68149eafd]
2022-04-29 07:19:58 -04:00
Ajay 5dc89b596f SWDEV-320512 - hipcc.bin installation should be moved out of packaging
Change-Id: I8e37b47f43a7c6579b68a7dd1db1a3d05976fa9d


[ROCm/clr commit: b5d9d61f5d]
2022-03-31 17:52:39 -04:00
Ashutosh Mishra c938c1a341 SWDEV-329093 - correcting RPATH for lamdhip64.so
Change-Id: Ifd0fca732e8030edd6dc74d22b32bb75514c9258


[ROCm/clr commit: 106399f0fd]
2022-03-23 22:15:57 -04:00
Ranjith Ramakrishnan 8d7abecaa8 File Reorganization: Strip destination name hip from cmake and cpack install prefix path
Flat folder structure requires hip to be installed in /opt/rocm and this need a change in build script
This patch is a workaround, till build scripts changes for flat folder structure are merged and will be removed once build script changes are merged to amd-master

Change-Id: Ib6f51b9d4e89afcc954a5d96595ce471cf7bd67a


[ROCm/clr commit: ef32ae6ada]
2022-03-23 12:47:56 -04:00
Ranjith Ramakrishnan e16ae717da SWDEV-291455 - File reorganization with backward compatibility
HIP installed in /opt/rocm
Wrapper header file in /opt/rocm/hip/include
Soft link for cmake and library files in /opt/rocm/hip

Depends-On: I30adccf7e6241dae12270156602d4b033ea99d93
Change-Id: If70b61020fa3ee85bf49171c842837da05191a48


[ROCm/clr commit: 4bcccb60c9]
2022-03-18 13:52:29 -04:00
cjatin added78cbc SWDEV-308763 - Make hiprtc a separate lib and rewrite it using comgr
Change-Id: I28ac50ec897accb2a2b4590d3c25965d907426fb


[ROCm/clr commit: e6c0086d1c]
2022-03-03 02:34:02 -05:00
Ajay 61905bdb9f SWDEV-320586 - rpath to use cmake_prefix_path for install/lib/libamdhip64
Change-Id: I70c4f66d27c29e874275be6e594dc7d22491054d


[ROCm/clr commit: c792ff7bfc]
2022-02-04 11:58:42 -05:00
Freddy Paul 3b13118ea8 hip:Switch to component based packaging.
Current way of packaging using custom command for each pacakge
is not helping to enable debug symbols.Debug symbols package
creation fail due to missing parameters from the build stage.
With the new approach all the parameters at build stage will be
inheritted by sub-cmake files and hence enables debug-symbols
package creation.

Change-Id: I933710ad4b67d913c011539ac9e51686604300f6


[ROCm/clr commit: a01b481e45]
2022-01-31 13:36:48 -05:00
Konstantin Zhuravlyov 120f578338 hipcc.bin and hipconfig.bin packaging updates:
- revert ad86c8a225
  - package hipcc.bin and hipconfig.bin in hip-devel

Change-Id: Iadfd2f64780b7ee2dce677436a7882d7fca74fb3


[ROCm/clr commit: d7ec25785d]
2022-01-21 09:51:50 -05:00
ajay a4e46d09e2 SWDEV-314307 - hipStreamWaitEvent to wait on remote IPC events
Change-Id: Id97524ae9bc86d38376af2b0240f10d0dd5cc584


[ROCm/clr commit: bafc5bb30f]
2022-01-19 20:10:02 +00:00
Ajay 277110a7d0 SWDEV-1 - hip change for hip Debug option in Windows
Change-Id: Ied0005d8373868c0e351bb981ea0a9ea90b1d4b7


[ROCm/clr commit: 57f768f9f5]
2022-01-14 01:49:55 +00:00
Aakanksha ad86c8a225 Package hipcc binaries
(hipcc.bin and hipconfig.bin)

Change-Id: Ib13cbc5fb33ffd03c5fada46f13875bd5ac47800


[ROCm/clr commit: f313c2ea80]
2021-12-20 23:07:45 +00:00
Ajay f00e0a2df4 SWDEV-273235 - Linux: catch2 test packaging
Change-Id: I5b4e44b367d9310a66ea70c31c3e15ad45589166


[ROCm/clr commit: 9ed0c29bb6]
2021-12-09 17:51:25 -05:00
anusha GodavarthySurya 7cac13e36e SWDEV-305766 - Added new debug APIs to get build information
Change-Id: Ibbf0c010cd8f7e6e659f2c4ba932cc8436574431


[ROCm/clr commit: e90cb3b07b]
2021-12-02 12:20:51 -05:00
Jatin Chaudhary 5faf5c3b64 ROCMOPS-2659 - Add HIP_PATH to current binary directory
Change-Id: I2b91f10d620cef951c7832b2ee138f4981b40570


[ROCm/clr commit: aa6538079d]
2021-11-26 03:31:10 -05:00
Rahul Garg 9428d4e8a0 Revert "SWDEV-296926 - hipamd cmake file change to build hip/src"
This reverts commit fa7ff8bb08.

Reason for revert: Fix for SWDEV-312654

Change-Id: I45bef538273431e0dd5d85cf889a7c769c87af73


[ROCm/clr commit: 2472abf589]
2021-11-23 12:24:38 -05:00
Rahul Garg 417851d666 SWDEV-289558 - Generate hip-config.cmake on Windows
Change-Id: I00b553bcba596e882573b99cfb6894c310cf7c2a


[ROCm/clr commit: bcfac99cea]
2021-11-15 20:58:13 -05:00
Ajay fa7ff8bb08 SWDEV-296926 - hipamd cmake file change to build hip/src
Change-Id: Ie40a8250a7843f174b322f3e179835961f4e7cac


[ROCm/clr commit: 5f254dc780]
2021-10-22 12:57:51 -04:00
anusha GodavarthySurya 4a7b23b848 SWDEV-287830 - Remove hardcoding of /opt/rocm path
Change-Id: I3b654f46d8867651734804f19a4456e17ada740d


[ROCm/clr commit: 63cd524f1d]
2021-10-05 07:38:01 -04:00
David Salinas c6063fe27b SWDEV-294828 - Move roc-obj binaries from hip to hipamd
SWDEV-280149 - roc-obj-ls/roc-obj-extract don't extract all kernel code

Change-Id: Ibe8aff5ff02fced4d9034740da72d3aa8d67c6ae


[ROCm/clr commit: 64cbd7951d]
2021-09-02 01:12:38 -04:00
Rahul Garg f55e3f39d4 SWDEV-295859 Update HIP_VERSION
Change-Id: Ibc4ce0d87360b3a25f7a313fc4dcc05e57b4f5f4


[ROCm/clr commit: dab4457c14]
2021-08-31 05:25:43 +00:00
anusha GodavarthySurya fb441e0062 SWDEV-297541 - Fix static lib package generation
Change-Id: Ie39cbe6d8a2cda659902f878ff69b45b93f41981


[ROCm/clr commit: b43badaba7]
2021-08-25 00:51:32 -04:00
anusha GodavarthySurya 6ee2e39b4b SWDEV-287884 - [HIP] Package Versioning
Change-Id: I4a4d96f947a67713036437ed525359fd422fefe2


[ROCm/clr commit: 4bcca82634]
2021-08-19 06:15:44 -04:00
kjayapra-amd 31213b7ea5 SWDEV-282289 - Do not compare Pre-processor directive with string.
Change-Id: I9cd76c57a5cdea8059f69cc56ba9dca278b4d04c


[ROCm/clr commit: bf677f91af]
2021-07-29 06:55:42 -04:00
Anusha GodavarthySurya 4c1f84b6ec SWDEV-287869 - [HIP] Package rename
Change-Id: Ic4ddece01bfc34d586cfaba3193c56ce0540626d


[ROCm/clr commit: 50e57158eb]
2021-07-29 05:55:44 -04:00
kjayapra-amd d579eb9104 SWDEV-282289 - Use preprocessor directive for atomicAdd to support backward compatibility.
Change-Id: I73f058040afaa782bf6a491b8761a040fbd5b571


[ROCm/clr commit: a8e0ab621e]
2021-07-19 10:46:01 -04:00
agunashe fae697b4d6 SWDEV-293742 - Update copyrights end year for hipamd
Change-Id: I08f620f84563a9214b59f1b943ed091b67229eab


[ROCm/clr commit: d9d9e81acb]
2021-07-09 12:08:39 -04:00
Vladislav Sytchenko e682f34917 SWDEV-273235 - Support versioning on Windows
Switch to using Perl for converting the Unix timestamp into a human
readable date. Perl is required anyway to run hipconfig, so this
solution should be relatively platform independent.

Change-Id: I2b09468d25daf574c74cebcac4f29d9aba5f18fb


[ROCm/clr commit: c094ba97c6]
2021-07-09 11:38:50 -04:00
Anusha GodavarthySurya b8992c8021 SWDEV-293455 - Fix nvidia build failure on CI
Change-Id: I3fac79c601ba846c6b7d8e5a3b21fdfdf2931c90


[ROCm/clr commit: 942703dfc4]
2021-06-30 02:55:53 -07:00
Anusha GodavarthySurya f3cc7d9db0 SWDEV-290637 - Migrate cmake build from hip to hipamd
Change-Id: I605fc633ba18df4fca95ceee83670600dd3f0b71


[ROCm/clr commit: e420815e75]
2021-06-28 06:23:33 -04:00
Aaron En Ye Shi 791087a6b8 SWDEV-286884 - Add CMake hiprtc-builtins library generation part 1
Add the CMake support for generating the hiprtc-builtins
library. Replaces the previous execution of shell script.
For backwards compatibility, link hiprtc pre-processed
object to amdhip64, and support versioning in name.
Add libcmt.lib to Windows link step, due to manually
generated .obj from llvm-mc.

Change-Id: I267be3cf4b241840b35f7f27a0b8659530108b0e


[ROCm/clr commit: c42308e2e5]
2021-06-24 14:34:47 +00:00
Vladislav Sytchenko 2618d65ffb SWDEV-273235 - Allow overwriting HIP_LLVM_ROOT
Change-Id: I1ae89d97671fff0f2d8968313501893fecc5093c


[ROCm/clr commit: 44e8b72267]
2021-06-21 11:19:16 -04:00
Christophe Paquot db81554097 SWDEV-281658 - Fix the gen-prof-api-str-header target
There is no OUTPUT_FILE option for add_custom_command (it is an option
for execute_process). Instead, redirect stdout to the output file.

Change-Id: Ic649bc6c4f709c3c42166500a72fce5014690a47


[ROCm/clr commit: f3a54f0823]
2021-06-18 09:57:02 -04:00
pghafari 0a07a3bd2f SWDEV-245531 - GLInterop: Add Buffer Interop support
Change-Id: Ic32e1f3f985505b9310d2d2bc85b1e10b4166145


[ROCm/clr commit: 8d3542e7d9]
2021-06-16 06:02:24 -04:00
Vladislav Sytchenko 8c35b3ec56 SWDEV-289854 - Revert to using hardcoded library destination
Current packaging assumes that HIP runtime will always be installed in
/opt/rocm/lib. This is false to assume, because some distros like CentOS
will use the lib64 directory instead of lib. Relying on CMake to choose
the library directory for us will default in that case to lib64. Hence
there will be a mismatch between where HIP is installed and where CMake
thinks it is.

Change-Id: I46e405b25bda987e74b095fcb41319f8a504ae41


[ROCm/clr commit: 52ff66f4fc]
2021-06-14 04:20:31 -04:00
Vladislav Sytchenko f1c64a7ace SWDEV-288707 - Fix build
Currently build is only passing because amdhip64 is being built with
headers from /opt/rocm/include. It should be using the headers from
the hipamd project.

Change-Id: I27cb64b460547ef281d368322afac376fa49db51


[ROCm/clr commit: 37be0e449a]
2021-06-11 13:29:36 -04:00