Commit Graph

73 Commits

Author SHA1 Message Date
Luu, Jonathan 20a9e311a9 SWDEV-531400_SYMLINK remove SYMLINK (#525)
Co-authored-by: Jonathan Luu <jonatluu@amd.com>

[ROCm/clr commit: a2dafbeacf]
2025-06-26 15:53:39 -04:00
Guan, Zichuan ee91a1e94a Disable HIP_PLATFORM auto-detect if already defined (#254)
Co-authored-by: Stella Laurenzo <stellaraccident@gmail.com>

[ROCm/clr commit: 3775298655]
2025-05-05 15:37:53 -04:00
David c4afce2abc Changes needed for hipcc/hipconfig rename and cleanup
- HIPCC, on Linux, will be removing high-level perl scripts (hipcc/hipconfig) in ROCm 6.3
  - removes renaming hipcc.bin/hipconfig.bin logic

SWDEV-467478 - HIPCC Clean up Perl

Change-Id: I829e915d56b37cb2ba76bb876c6656166534f15c


[ROCm/clr commit: 05d6f75830]
2024-10-22 04:46:33 -04:00
Ioannis Assiouras 8f3e41932c SWDEV-482553 - Removed setting of BUILD_SHARED_LIBS from hip-config.cmake
Change-Id: I84eb33939d47dde1dd389741c431ee0e5955973b


[ROCm/clr commit: 0b8bc6682f]
2024-09-09 13:27:53 +01:00
Ioannis Assiouras ec3d97ab8d SWDEV-477039 - Use rocm_agent_enumerator to setup targets for static build
The amdgpu-arch tool is not supported for static build.
This commit adds changes to detect the build type during
cmake config and use the rocm_agent_enumerator for static build.

Change-Id: I8a295e01f54075507390ef540f16b28bb20237a9


[ROCm/clr commit: a02888af58]
2024-08-29 10:06:01 -04:00
Ioannis Assiouras 62573a3ec4 SWDEV-414482 - Remove cmake_minimum_required from hip-config.cmake
It currently sets an old cmake version that gives warnings with
recent versions of cmake and it is something that should not be
dictated by the config file but instead be set at the app level.

Change-Id: I3584159cafeb0bf3f6ae4929ac062dc11b3658a5


[ROCm/clr commit: 683c041a73]
2023-07-31 14:34:01 +01:00
Ioannis Assiouras af03b2c8d2 SWDEV-386069 - Added nvidia and AMD config.cmake files as part of the dev package
Change-Id: I3c9a65b287822d91407996ca59ac90051b749923


[ROCm/clr commit: d2e36bc047]
2023-06-07 04:55:52 -04:00
Ioannis Assiouras 5f30552398 wSWDEV-386069 - Allow find_package(hip) to work on nvidia platform
Change-Id: Ifadf683a6db42d4adadce92c7ebf6bd3e8d2245a


[ROCm/clr commit: 7e871698e3]
2023-05-24 14:12:22 +01:00
AravindanC 554b6efd98 SWDEV-383579 - Handling compiler-rt unrecognized error msg
Change-Id: Ia9070a575282bd263b0bb51eab1280552126c79e


[ROCm/clr commit: 82deb581cb]
2023-05-23 11:28:26 -04:00
Cordell Bloor f7a7997c66 SWDEV-346940 - Remove default AMDGPU_TARGETS
hipcc and clang++ both have logic to detect the installed hardware
and to automatically select the appropriate AMDGPU target when it is
left unspecified. When the AMDGPU_TARGETS property is initialized with
a set of default values, it results in the addition of an explicit set
of --offload-arch flags being passed. These explicit architecture flags
disable the architecture autodetection in the compiler.

The resulting behaviour from setting fixed defaults makes it unpleasant
to compile with CMake because they increase the build times for projects
unless they are overriden (as most users do not need to build for all
five default architectures). The fixed defaults are also troublesome for
users with hardware not included in the default set (e.g., gfx1011,
gfx1031, gfx1100).

A possible alternative might be to detect the architecture within
hip-config.cmake rather than running the detection logic on each
compiler invocation. However, this approach is simpler.

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


[ROCm/clr commit: e1bed6f354]
2023-05-16 16:35:09 -06:00
Ranjith Ramakrishnan ec60a2ad11 SWDEV-366831 - Use actual install path rather than using backward compatibility path
hip-config if invoked from backward compatibility path was providing package prefix directory as /opt/rocm-ver/hip.
Usage of backward compatibility path will result in error, since #warning messages are changed to #error
The change will provide the actual install path /opt/rocm-ver as package prefix directory

Change-Id: I4ac54a5ed9de01d5f40f456f20b76b60237b7d9e


[ROCm/clr commit: 9a7b2d0a88]
2023-03-02 11:37:04 -05:00
Yaxun (Sam) Liu e660f913b5 SWDEV-380145 - [GFX][CQE] Mathlibs and Blender build failed in both RT and CPL Jobs
Remove --hip-device-lib-path from hip-config.cmake
and let clang determine device lib path

Change-Id: Ice009875624692bc2895020c9577b94ddbd6840f


[ROCm/clr commit: cbb3937196]
2023-02-21 15:33:22 -05:00
AravindanC 61f59d2285 SWDEV-352878 - Remove CLANG include dependencies
Change-Id: I46bba0fdf21a3541e08ff0c465ff076d478094f9


[ROCm/clr commit: 2228383fcb]
2023-01-13 07:41:10 -08:00
Maneesh Gupta 3a7b8156a3 Revert "SWDEV-330775 - Update search path for LLVM"
This reverts commit f31b0874fd.

Reason for revert: SWDEV-368704

Change-Id: I8c38b4f40285f90f7d99145b970c2a14d051d5bb


[ROCm/clr commit: fab70a41ed]
2022-11-22 09:14:24 -05:00
Siu Chi Chan f31b0874fd SWDEV-330775 - Update search path for LLVM
ROCm's LLVM will be moved into /opt/rocm-<ver>/lib/, teach hipcc and
hipconfig about the new location.

Change-Id: Ie7f17146771aff94c684deb22148226cbb3a2895


[ROCm/clr commit: 3d15f9cbda]
2022-11-14 13:31:07 -05:00
AravindanC 7219645700 SWDEV-352878 - LLVM pkg search directly using find_dep() for CLANG Include path
Change-Id: I355e39890757be07de8b9332deca159f35039dfd


[ROCm/clr commit: c8500cd72d]
2022-10-31 09:42:47 -07:00
Ranjith Ramakrishnan 89321974f3 SWDEV-345870 - Correct HIP path for new directory layout
With file reorganization changes HIP is installed in /opt/rocm-ver
Using HIP path as /opt/rocm-ver/hip will generate warnings
Use real path with symlinks resolved, so that HIP path always points to the installed path
Removed redundant code for finding hsa header files. find_dependency to hsa-runtime should handle hsa dependency

Change-Id: Iccea3c1c7297c705244bf752f38fbff71929d64c


[ROCm/clr commit: f3394cf7a5]
2022-10-19 12:58:02 -04:00
Ranjith Ramakrishnan d1b2b89d43 SWDEV-349826 - Use get_filename_component rather than using file command to get realpath
The cmake file command with REAL_PATH option is supported from cmake version 3.19 onwards
Issue reported in cmake version 3.17. get_filename_component is supported since 3.4 onwards
The command gives REALPATH with symlinks resolved - /opt/rocm-ver/lib/cmake/hip/hip-config.cmake
So need to move four level up to get ROCM PATH
Verfied by printing the variables
Change made so that default initializaton of ROCM PATH is executed if there is no ROCM_PATH set in ENV

Change-Id: Ibfff584eeb154bd73a568a842f28143d5ed72458


[ROCm/clr commit: d60787bdb2]
2022-08-04 13:39:09 -07:00
Ranjith Ramakrishnan 57146de728 SWDEV-346857 - Find ROCM_PATH based on config file path rather than hardcoding
As per the requirements in SWDEV-287540, config files should not have hard coded /opt/rocm path
Instead of setting ROCM_PATH to /opt/rocm, used hip-config file path to find the rocm path
Validated by printing the CONFIG_PATH and is coming as/opt/rocm-ver/lib/cmake/hip/hip-config.cmake
So need four level up,with file name in the path

Change-Id: Iac01d3a0c0168138c777551165705ed56cf6c3b1


[ROCm/clr commit: f61a87ebb2]
2022-07-27 15:46:07 -04:00
Ajay 1402d33098 SWDEV-334340 - clang_rt.lib not to search in default path
Change-Id: Idf493477bbf8ddde4b7754f64f44c9c5aea008a2


[ROCm/clr commit: 7b38ee1574]
2022-06-19 22:54:03 -04:00
Satyanvesh Dittakavi 9d8d473134 SWDEV-327030 - Fix incorrect checks to find components in CMake
Change-Id: Ib7b9bd82255af897a0f82bba8049c7d41379ae96


[ROCm/clr commit: 3bdc72d6ca]
2022-06-07 04:41:52 -04:00
Ajay ac11c96cc2 SWDEV-334340 - clangRTlib detection in windows sample
Change-Id: I2bc65d32a7e8a9b31982f21a6b74e3f0a1e01688


[ROCm/clr commit: 88163bd884]
2022-05-04 20:49:20 +00:00
Ajay 5b9a94133c SWDEV-303760 - Windows: to use the HIP found using find_package(hip)
Change-Id: I8dcc0adae5decc17aff45850681c3502c9e19fae


[ROCm/clr commit: 18c4458e8c]
2022-04-05 12:01:51 -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
Siu Chi Chan 177b978f71 hip-config.cmake - resolve HIP_CLANG_ROOT when the compiler is a symlink
When the HIP compiler set to a symblink that was created outside
/opt/rocm/llvm/bin, HIP's cmake would get HIP_CLANG_ROOT incorrectly.
This teaches hip-config to get clang's real path first and use that to determine LLVM's directory.

Change-Id: I6275b67f843aff256dc72cf478e575224e0cedc3


[ROCm/clr commit: e70d7374ef]
2022-02-22 11:35:58 -05:00
Ajay 7142de77b0 SWDEV-273235 - skip clangRTlib detection in windows sample
Change-Id: I5a05479c774ce618960ae2578f46f1116b1f93ee


[ROCm/clr commit: a5ee2d2042]
2022-02-15 12:44:24 -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
cjatin fd4bf2864b SWDEV-303745 - SWDEV-307757 - SWDEV-308024 - SWDEV-308834 - Find clangrt lib using find_library
Change-Id: Ia311e9f10c59f21c271e83f09fa84eb65e95105a


[ROCm/clr commit: aef1250a41]
2021-10-27 02:08:42 -04:00
cjatin b990308648 SWDEV-303745 - Add new path of clangrt lib
Change-Id: I07fd48d3b72bad6f356976972fef0b20c487a53e


[ROCm/clr commit: 969f31da65]
2021-10-17 17:06:32 -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
Tao Sang 17a02d1ad5 SWDEV-296812 - Fix LINK_LANGUAGE issue
LINK_LANGUAGE support has some issue in CMake versions from 3.18.0 to
3.19.8 when complex libs' dependence exists. Jump to a known CMake
version 3.20.0 where the issue is fixed.

Change-Id: I3fe6dbc35a7b14baa210df297b7885df83d28178


[ROCm/clr commit: 3452a09975]
2021-07-28 11:34:38 -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
Tao Sang 42eff44f5c SWDEV-288593 - Rework "hip-config only adds compile and link options to C++"
This reverts commit b01fb5d72f.
Rework to support old cmake in order to fix mathlibs' failure.

Change-Id: I605fc633ba28df4fca95ceee83671600dd3f0b72


[ROCm/clr commit: 53b3c8a3fb]
2021-07-05 22:36:37 -04:00
Sarbojit Sarkar ded6cd3b4e SWDEV-293424 - Included gfx90a and gfx1030
Change-Id: I765890f3476f0983021dea722c4f771c51d53cd2


[ROCm/clr commit: 165d417d60]
2021-06-30 23:14:56 -04: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
Rahul Garg dd95d3d23c ROCMOPS-1956 - Push restructured code to hipamd
hipamd will have AMD's ROCCLR based HIP backend implementation

Change-Id: Id7de9634519b4ce46fca71a1b61f3d5b1e3fc459


[ROCm/clr commit: 19c84bc604]
2021-06-07 21:42:44 +00:00
Robert Maynard b35dc7a55c SWDEV-288593 - hip-config only adds compile and link options to C++
Change-Id: Iefc7c3597fc8c8864621ad6154352c9dd56a3e74


[ROCm/clr commit: 576af84864]
2021-06-03 00:18:12 -04:00
Vladislav Sytchenko 241d5bab38 SWDEV-288814 - Remove dependency on ROCclr
HIP only has a dependency on ROCclr at build time. When exporting HIP,
ROCClr is already embedded into the shared/static library. There is no
reason to search for it.

Change-Id: I8d7e8e58164e5585a1dfc9c998ecf02ca42d8aac


[ROCm/clr commit: 815e8dd2a3]
2021-06-01 17:37:30 -04:00
Sarbojit Sarkar d2e070dfd7 SWDEV-282405 - Fix for rocFFT build issue
Change-Id: I39d1823ac6ea1d61610b9ff9153a6d0e91426fc8


[ROCm/clr commit: ed83033470]
2021-04-23 01:18:56 -04:00
Tao Sang 5f3a3bac53 SWDEV-274915 - Prevent repeatedly linking dependence
Some upstream will load hip multiple times thus Rocclr static lib  will
be linked to hip::amdhip64 many times. This will bring some unexpected
issues such as in hipBLAS. The patch prevents his happening.

Change-Id: I6bb27659f74371dae6e59c59fd6bb2022cc062ff


[ROCm/clr commit: f65348cfbe]
2021-03-02 17:33:52 -05:00
Tao Sang 2a6f45533d SWDEV-270973 - Add missing copyright headers
Change-Id: I6bb27650f74372dae6e29c79fd6bb2022cc062fe


[ROCm/clr commit: 4048db950c]
2021-03-01 19:46:24 -05:00
Aaron En Ye Shi 04eff63247 SWDEV-263964 - Add Windows CMake find_package(hip)
Modify hip-config.cmake to support building on Windows
using CMake's find_package(hip). Windows CMake will work
with Ninja Generator and inheritEnvironments clang_cl_x64.

Change-Id: I03d76b5f8d695ce50ecaacb449e4eb1c1ca49700


[ROCm/clr commit: db43d7a3ac]
2021-01-25 12:52:46 -05:00
Tao Sang 61db7b8ad0 SWDEV-257056 - Fix cyclic dependence of hip/rocclr libs
Solve upstream building failure due to the cyclic dependence.

Change-Id: Ibf34c789d5bd4278adcedba1d6e057639c258488


[ROCm/clr commit: 8cf28aa5b3]
2021-01-21 13:00:22 -05:00
Tao Sang 52954de0eb Fix building mathlibs failure
Add back
__HIP_PLATFORM_HCC__
__HIP_PLATFORM_NVCC__

Change-Id: I1ae48678eafd849d6c25bcb204c1724b026be22f


[ROCm/clr commit: 8fc1ff7d4f]
2021-01-14 14:03:15 -05:00
Tao Sang eeb275d643 Remove hip-hcc codes: Part four
Remove __HCC__, __HCC_ONLY__, __HCC_CPP__, __HCC_C__,
__HCC_OR_HIP_CLANG__, __HIP_ROCclr__ and their guarded codes.

Remove Hcc codes from directed_tests and samples.

Remove __HIP_PLATFORM_HCC__ and __HIP_PLATFORM_NVCC__ from
some files where they are not necessary.

Add deprecation notice.

Change-Id: I1ae467eafd749d6c25bca204c1724b026be21fce


[ROCm/clr commit: d504a761ad]
2021-01-08 10:53:34 -05:00
Tao Sang 2c1c9f78d6 Remove hip-hcc codes: Part three
1.Rename include/hip/hcc_detail/ as include/hip/amd_detail/

2.Rename include/hip/nvcc_detail/ as include/hip/nvidia_detail/

3.Create __HIP_PLATFORM_AMD__ to replace __HIP_PLATFORM_HCC__

4.Create __HIP_PLATFORM_NVIDIA__ to replace __HIP_PLATFORM_NVCC__

After hcc_detail, nvcc_detail, __HIP_PLATFORM_HCC__ and __HIP_PLATFORM_NVCC__
have been removed from upstream, they will be removed from hip runtime.

Change-Id: I1ae457effd739d6c25bca203c1724b026be21fce


[ROCm/clr commit: 8a2b0b7424]
2021-01-05 10:39:31 -05:00
Sarbojit Sarkar e2171447ff SWDEV-262810: skip duplicate compile flag inclusion
Change-Id: I02ebfb3cbaf6ec25819de0c4952795c6cc949e4d


[ROCm/clr commit: 567a95b4e4]
2020-12-20 23:26:55 -05:00
Konstantin Zhuravlyov 1b1b2998ad SWDEV-198415 - Implement Target ID Proposal
Changes from Jatin Chaudhary, Tony Tye

Change-Id: I14904920ad2356ae2098cf827b83613089d33962


[ROCm/clr commit: 73fb01cb3a]
2020-11-10 13:31:43 -05:00
Tao Sang d8e8f2c833 Make directed_test support static libs
1.Make directed_test apps linked against static libs
    of hip, rocclr, rocr, roct and amd_comgr.
    2.Remove custom_target amdhip64_static_combiner.
    3.Support EXCLUDE_HIP_LIB_TYPE <static|shared>.
    4.Simplify argument list parsing.
    5.Install rocclr when rocm is installed.
    6.Fix some original small bugs.

Revert "Revert "Make directed_test support static libs""
This reverts commit f1cc6bef64.

Change-Id: I918eeae94487e5e2ff5bfde083667ac65fb6e702


[ROCm/clr commit: 6db4976759]
2020-10-26 12:39:58 -04:00
agodavar 9132d92ccd cmake hip-rocclr as default build,change HIP_PLATFORM to amd|nvidia
Change-Id: I59d2e15b297b6ca2d5eee1a6dee642bdb01a3839


[ROCm/clr commit: 8717a78bf7]
2020-10-21 07:26:14 -04:00