Graphe des révisions

419 Révisions

Auteur SHA1 Message Date
Christophe Paquot f0bd04856a [hip] Skip lang guess if -x <lang> is specified.
Change-Id: If5cbdd1e5d36d2d8b83f3eadd0598162691167aa


[ROCm/hip commit: 96704ddd00]
2020-05-15 17:07:40 -04:00
Payam e5a32d5511 updating envar to HIP_ROCCLR_HOME
Change-Id: Ic0bbf40638538307377e6db1a7379fb23dec8306


[ROCm/hip commit: 0153027fd8]
2020-05-14 12:59:51 -04:00
Aaron En Ye Shi 967c7306da Merge "search path logic updated for extractkernel SWDEV-230929" into amd-master-next
[ROCm/hip commit: da01762f1a]
2020-05-12 17:59:47 -04:00
Icarus Sparry f47f8ad6f6 Fix runtime failure on windows
Signed-off-by: Icarus Sparry <icarus.sparry@amd.com>
Change-Id: I6c991a943e04ef29eff2905becbed0038c3b8ab9
Signed-off-by: Icarus Sparry <icarus.sparry@amd.com>


[ROCm/hip commit: 64f8ff5e70]
2020-05-11 17:30:47 -04:00
Dittakavi Satyanvesh adcb645ab2 search path logic updated for extractkernel SWDEV-230929
Change-Id: I48d6332502774485d7ced3fee065a74f15774500


[ROCm/hip commit: 83f0c4402e]
2020-05-11 02:27:40 -04:00
Icarus Sparry b59442a555 Correct quoting of arguments
The hipcc script takes arguments and uses this to build up a new
command. Characters which are special to the shell need to be quoted
to prevent them being interpreted.

In particular adding
     --Wl,--enable-new-dtags -Wl,--rpath,'$ORIGIN:$ORIGIN/../lib'
to the command should pass quoted dollar signs into the resulting
string so the shell passes them on, rather than substituting the
values.

The arguments are processed in a conventional loop, but can be altered
during the course of the loop, and also by linker response files.

Tested by running
  HIPCC_VERBOSE=7 HIP_COMPILER=clang hipcc --cxxflags \
      fred.c -Wl,,--rpath,'$ORIGIN:$ORIGIN:/../lib'
and observing "-Wl,--rpath,\$ORIGIN\:\$ORIGIN\:..\/lib" in the
displayed hipcc-cmd output (and ignoring the errors due to rocm not
being installed)

Change-Id: I26b62f09ff3518cceeb85fa8823bb12a95c1c78e
Signed-off-by: Icarus Sparry <icarus.sparry@amd.com>


[ROCm/hip commit: a4f01ffca6]
2020-05-10 18:16:48 -04:00
agodavar 90ae94b334 SWDEV-234447:Fix error Use of uninitialized value in concatenation (.)
Change-Id: Ia6f8d23f100826438f152c175d10ac3096ee024e


[ROCm/hip commit: a9bc94129b]
2020-05-08 12:07:24 -04:00
Aaron Enye Shi 42b80104c0 SWDEV-234954 - Fix hipconfig on Windows
Before setting the HIP_RUNTIME and HIP_COMPILER variables, first check the environment if these are set. We should prioritize the environment settings. For windows, it will be set, and also explicitly call perl when invoking hipconfig.

Change-Id: I89ad267285239e6d8a897dc681c4af5906e7b9d8


[ROCm/hip commit: 5fbae827c2]
2020-05-08 13:27:36 +00:00
Aaron Enye Shi 995949cb64 Fix missed VDI names in hip-on-rocclr
Change-Id: I830feb37a043656136648e92a0c6f1eaae8402d7


[ROCm/hip commit: 1c1be71b63]
2020-05-07 08:37:28 -04:00
Rahul Garg 4efc743802 Remove HIP_MARKER left overs due to HIP PR 2032
Change-Id: Ieae68dd3b12c92b1d6830619ca4c6ae43c400225


[ROCm/hip commit: 819677825f]
2020-05-06 20:26:18 -04:00
Payam 0c8b343931 name change vdi to rocclr
Change-Id: I06d198bbb4a499e153b290b73a92afed3553b252


[ROCm/hip commit: c5f76c3de3]
2020-05-06 09:14:30 -04:00
Yaxun (Sam) Liu 719c847ccf Fix hipcc for -E
-E is for preprocessing only, which should be compile only.

This is required by enabling sccache.

Change-Id: Ia0a0acb6a04abd03a9cb5b3c13cf7446837f37b4


[ROCm/hip commit: 09bcd2e378]
2020-05-05 14:30:25 -04:00
Aaron Enye Shi 1a3f036478 Add __HIP_VDI__ to hipconfig host flags for VDI
Change-Id: Ia9582f2d51b50cbe151b4866ffbfc9514825f613


[ROCm/hip commit: 43c3c89467]
2020-05-04 20:03:07 +00:00
Aaron En Ye Shi 9dda8e0a31 Merge "find_package(hip) changes for clang" into amd-master-next
[ROCm/hip commit: 48b8bfc6b3]
2020-05-04 10:19:51 -04:00
agodavar 41a1bb6733 find_package(hip) changes for clang
Change-Id: I9dc1be1dd5f9424e26ebcd2961207e1c4467550f


[ROCm/hip commit: 1468982f8a]
2020-05-01 20:48:32 +00:00
Aaron Enye Shi 318a527d31 Update hipcc to use HIP_COMPILER variable
This will update the hipcc script so that it will use HIP_PLATFORM, HIP_COMPILER, and HIP_RUNTIME variables correctly based on updated hipconfig file.

Removing HIP_PLATFORM=clang, only use hcc and nvcc for now. HIP_PLATFORM should eventually switch to amd or nvcc.

Change-Id: Ie527d07a1add974cc3aab8e9f61b0518147d7602


[ROCm/hip commit: 2de1129510]
2020-04-30 15:31:20 -04:00
Aaron Enye Shi d9bb1fd770 Update hipconfig to support HIP-Clang
Add support for hipconfig to display details on HIP-Clang compiler and update HIP_COMPILER and HIP_RUNTIME to include clang and rocclr. Also, add hipcc flags --cxxflags and --ldflags to support HCC users who used hccconfig flags.

Change-Id: Ib12d81a4ff59d34fb000626836b1adb10be3ac61


[ROCm/hip commit: afc9b546fb]
2020-04-27 11:44:53 -04:00
Yaxun (Sam) Liu 98032a796a Let hipcc treats .cpp files as C++ files for HIP-Clang
This change is required by rocBLAS and rocFFT for OpenMP issue
since cmake needs to treat .cpp file as C++ program to detect
OpenMP support.

This is to match nvcc behavior, speed up compilation of C++
programs, and fix some compilation issue where C++ programs
are compiled as HIP programs.

Currently it is controlled by an environment variable
HIP_COMPILE_CXX_AS_HIP. By default it is 1, where
hipcc treats .cpp files as HIP programs. If it is
set to 0, hipcc will treat .cpp files as C++ programs.
This is because some math libraries are still not
ready for the change, however rocBLAS and rocFFT
require this feature for OpenMP, therefore put it
under an environment variable so that rocBLAS
and rocFFT can use it.

Change-Id: I56a51e27079df850ee39d4217fb647c22d79f612


[ROCm/hip commit: 9c5a7226b2]
2020-04-27 11:43:05 -04:00
root 2061d19165 Merge master into amd-master-next
Change-Id: I3fc1dc0c860d627053537581e75561e8a7efe327


[ROCm/hip commit: 2689246de6]
2020-04-26 22:19:37 +00:00
Aaron Enye Shi aaffb776d5 extractkernel obj dump args to use double dashes (#2034)
More recent llvm-objdump has changed disassemble and mcpu arguments to require double dashes.

[ROCm/hip commit: a2768ea554]
2020-04-23 21:51:33 +05:30
Maneesh Gupta 8e137a6ec1 Merge in the rocclr based hip runtime (#2032)
* Merge master-next changes in master (include vdi development in master branch)



[ROCm/hip commit: a0b5dfd625]
2020-04-23 09:12:06 -07:00
Tao Sang 6406087713 Solve issues with hip-vdi runtime static lib
1.Combine libamdhip64_static_base.a and libamdvdi_static.a into libamdhip64_static.a.
2.Let hipcc use -use-staticlib to link libamdhip64_static.a.
3.Add some samples for static lib.
4.Fix compiling failure of code object.

Change-Id: Ic8c95228eb139058da8b5d66ba8439486154ca6f


[ROCm/hip commit: da27fd2b09]
2020-04-20 15:37:02 -04:00
Tao Sang d4a364b8c6 Revert "Solve issues with hip-vdi runtime static lib"
This reverts commit 8a42ac4d03.

Reason for revert: It is causing dkms-no-npi-hipclang broken.
It is top priority to maintain dkms-no-npi-hipclang build, otherwise we lose track of regression analysis.
So revert the change for now and recommit it after fixing it.

 

Change-Id: Ia5136e888baecb6148c6c18eedbf37066fcb1eaa


[ROCm/hip commit: f246761dee]
2020-04-17 10:13:08 -05:00
Siu Chi Chan b54736160e moving the extractkernel tool from hcc to hip (#1644)
[ROCm/hip commit: 0ccb7f08a5]
2020-04-17 10:31:06 +05:30
Tao Sang 8a42ac4d03 Solve issues with hip-vdi runtime static lib
1.Combine libamdhip64_static_base.a and libamdvdi_static.a into libamdhip64_static.a.
2.Let hipcc use -use-staticlib to link libamdhip64_static.a.
3.Add some samples for static lib.
4.Fix compiling failure of code object.
Change-Id: Ia2333622a8d05639b90974c4c5d3d85654ba0138


[ROCm/hip commit: 4c2ab3f41e]
2020-04-15 13:46:36 -04:00
Evgeny Mankov f2b79bc349 [HIP][SPARSE] sync with HIPIFY's #95 and #96
Based on:
  https://github.com/ROCm-Developer-Tools/HIPIFY/pull/95
  https://github.com/ROCm-Developer-Tools/HIPIFY/pull/96
Update hipify-perl and CUSPARSE_API_supported_by_HIP.md accordingly


[ROCm/hip commit: a01e2c7d03]
2020-04-10 19:36:43 +03:00
Maneesh Gupta 4e1f6f2a0e Merge branch 'amd-master' into amd-master-next
Change-Id: I3094c15008093f2072bcd38aca4ea90aeae2d97b


[ROCm/hip commit: 2af31479e2]
2020-04-09 06:31:00 -04:00
Rahul Garg 6fe5c52518 Bump version to 3.5 (#1993)
* Switch CI testing from rocm-3.1.x to rocm-3.3.x
* Update hcc workweek for cooperative view
* bump version to 3.5

[ROCm/hip commit: 59afcb1091]
2020-04-06 15:39:10 +05:30
Reshabh Sharma 264082869c Output file name should not change flags picked for compiler (#1938)
Fixes SWDEV-207362,

The output file name should not contribute to picking up the right flags for the compiler. This fix solves issues when the output has conflicting extensions which confuses hipcc to treat them as the source files and add the required flags for them.

PS: Output file refers to the file followed by -o

Change-Id: I1095966c11143ad73e81fabc35b4e9de5d3afada
Example: hipcc test.o -o test.hip will add the flags for .hip compilation ignoring the fact that it is an output file


[ROCm/hip commit: bb62f8553f]
2020-03-31 16:13:43 -04:00
Michael LIAO 9a2e585762 [hipcc] Remove the previous workaround.
Change-Id: Ie1c2aa21689bc343c10fd4b699546cf500ced5b2


[ROCm/hip commit: f1566f6dc5]
2020-03-30 10:18:47 -04:00
Yaxun (Sam) Liu 069cca494a Add option --hipcc-func-supp for function support (#1957)
By default hipcc passes -mllvm options to let HIP-Clang inline all device functions.

--hipcc-func-supp enables function support and disables inline all.

--hipcc-no-func-supp disable function support and enables inline all.

This is a temporary solution to match HCC behavior for performance.

This option is mainly for debugging purpose.

Change-Id: I0c44ac1812bb3cea5c3e5b6e14ebaa45919236f6

[ROCm/hip commit: 3bef4e60ad]
2020-03-25 14:41:27 -07:00
Yaxun (Sam) Liu 89cf7e2c4d Let hipcc treat .c program as C program (#1945)
nvcc treats .c program as C program and .cpp program as C++ program.

Currently hipcc treats .c and .cpp programs as HIP programs.

It is desirable to let hipcc behave like nvcc.

Currently it is not feasible to let hipcc treat .cpp programs as C++ program
since there are too many HIP applications use .cpp as extension for HIP programs.
However we should be able let hipcc treat .c program C program since there
are few applications use .c as extensioin for HIP programs.

[ROCm/hip commit: 28db1e4383]
2020-03-19 16:16:31 +05:30
Evgeny Mankov 4bd8b4d462 [HIPIFY][perl] Fix missed sync with hipify-clang
[ROCm/hip commit: c9672b8de5]
2020-03-18 14:24:02 +03:00
Evgeny Mankov ebf3416037 [HIPIFY][SPARSE] sync with hipSPARSE's "added csrsm2" (#83)
+ https://github.com/ROCmSoftwarePlatform/hipSPARSE/pull/83
+ Update doc and hipify-perl accordingly


[ROCm/hip commit: 234eae9e92]
2020-03-18 13:44:50 +03:00
Evgeny Mankov e44184131f [HIPIFY][SPARSE] sync with hipSPARSE
+ Update doc and hipify-perl accordingly


[ROCm/hip commit: 5f6c8fa535]
2020-03-18 13:07:46 +03:00
Yaxun (Sam) Liu e05e7d063e Workaround for libc++ include path for HIP-Clang (#1917)
HIP-Clang cuda_wrapper headers require clang include path before standard C++ include path.
However libc++ include path requires to be before clang include path.
To workaround this, we pass -isystem with the parent directory of clang include
path instead of the clang include path itself.

[ROCm/hip commit: 08d9759eba]
2020-03-18 11:20:21 +05:30
Reshabh Sharma 8268ddab28 Output file name should not change flags picked for compiler (#1938)
Fixes SWDEV-207362,

The output file name should not contribute to picking up the right flags for the compiler. This fix solves issues when the output has conflicting extensions which confuses hipcc to treat them as the source files and add the required flags for them.

PS: Output file refers to the file followed by -o

Example: hipcc test.o -o test.hip will add the flags for .hip compilation ignoring the fact that it is an output file

[ROCm/hip commit: 7bcfdf017d]
2020-03-17 14:02:14 +05:30
Reshabh Sharma 72160882ca Don't force compiler to treat libhip_hcc.so as a text file (#1931)
Fixes SWDEV-226025,

Right now -x c++ can come before libhip_hcc.so which forces the compiler to treat libhip_hcc.so as a text file and generates a lot of gibberish unicode. This PR changes the order of flags ensuring that -x c++ and similar flags come after libhip_hcc.so
Hopefully, this will not have any negative side effect.

[ROCm/hip commit: bbbb8bf1e6]
2020-03-17 14:01:33 +05:30
Yaxun (Sam) Liu 20191a4057 Let hipcc not pass -mllvm option to HIP-Clang on Windows (#1924)
Currently there is a clang bug on Windows causing duplicate -mllvm options in clang -cc1.

Tempoarily disable -mllvm options for HIP-Clang on Windows until the bug is fixed.

Change-Id: I3a4393ba7745989398dc6c6001722837dad18704

[ROCm/hip commit: 7aa9611689]
2020-03-17 14:00:20 +05:30
Sameer Sahasrabuddhe be216b9ab6 SWDEV-204784: separate printf declaration for vdi/clang
There are now two implementations of printf in HIP:

1. The implemenation for HCC is controlled by the HC_FEATURE_PRINTF
   macro, and it works only with the HCC compiler used in combination
   with the HCC runtime.

2. The implementation for hip-clang requires the VDI runtime, and is
   always enabled with that combination.

Change-Id: Ibaeda7900ffe2ce602ca0094aafed0f1147ac2b6


[ROCm/hip commit: 64cd527335]
2020-03-16 04:00:39 -04:00
Yaxun (Sam) Liu 9683880363 Let hipcc not pass -mllvm option to HIP-Clang on Windows
Currently there is a clang bug on Windows causing duplicate -mllvm options in clang -cc1.

Tempoarily disable -mllvm options for HIP-Clang on Windows until the bug is fixed.

Change-Id: I3a4393ba7745989398dc6c6001722837dad18704


[ROCm/hip commit: 92af5e4375]
2020-03-10 13:07:26 -04:00
Vladislav Sytchenko 88ae7337b3 Add hipDrvMemcpy3D.
This is the equivalent of cuMemcpy3D.

Change-Id: Ib2e06dbd6f5093c931cdfd36c87617f32acffc2d


[ROCm/hip commit: ecd7c99b49]
2020-03-09 16:11:25 -04:00
Sameer Sahasrabuddhe 07abb2d633 separate printf declaration for vdi/clang
There are now two implementations of printf in HIP:

1. The implemenation for HCC is controlled by the HC_FEATURE_PRINTF
   macro, and it works only with the HCC compiler used in combination
   with the HCC runtime.

2. The implementation for hip-clang requires the VDI runtime, and is
   always enabled with that combination.


[ROCm/hip commit: 09130b3b92]
2020-03-09 09:40:05 +05:30
Lad, Aditya 044a1924ba Merge branch 'master' into amd-master-next
Conflicts:
	CMakeLists.txt
	tests/src/texture/simpleTexture2DLayered.cpp
	tests/src/texture/simpleTexture3D.cpp

Change-Id: I4aa4754d391b5f37ddf15fa0bcfc84d9da020119


[ROCm/hip commit: d80edf9541]
2020-03-06 14:10:44 -05:00
agodavar 428d4842ae Enable tests hipTestDeviceSymbol,hipTestConstant and p2p_copy_coherency on hip-vdi
SWDEV-225266: [HIP-VDI] HIP-VDI disabled tests (p2p_copy_coherency.cpp)
SWDEV-225388: hipTestDeviceSymbol.cpp & hipTestConstant.cpp failed to build on hip-vdi

For hipTestDeviceSymbol.cpp & hipTestConstant.cpp tests:
Currently "__HIP_VDI__" flag is enabled in CMakeLists.txt, but when application is compiled with hipcc,  
__HIP_VDI__ is not defined to differentiate if compiled for VDI/HCC for headers.

For ./src/runtimeApi/memory/p2p_copy_coherency.cpp:
Fixed compilation issue to include only when compile for HCC runtime "<hc_am.hpp> not found"
Currently test is disabled to run on all platforms. When validated on multi-GPU machine,
memcpy between multiple GPUs via GPU synchronization is not working on hcc and vdi path.
Need to validate on nvidia machine to know if test is valid. Disabled GPU synchronization test for now.

For ./src/runtimeApi/module/hipModuleTexture2dDrv.cpp:
updated test to generate tex2d_kernel.code object in build directory. Currently ctest looks for it in build directory.

Change-Id: I629d395a919c2440d921422716944c7940ed6010


[ROCm/hip commit: 3479847d16]
2020-03-04 10:07:09 -05:00
Rahul Garg c34c9a4b4d Remove deprecated HIP markers (#1876)
[ROCm/hip commit: 6c5fa32815]
2020-02-28 16:47:15 +05:30
Maneesh Gupta b499822842 bump version to 3.2 (#1898)
- Bump version to 3.2
- [ci] Enable tests on ROCm 3.1

[ROCm/hip commit: 71e1f87f7e]
2020-02-27 16:18:31 +05:30
Yaxun (Sam) Liu 3067349909 Fix hipcc for extra -mllvm option (#1885)
[ROCm/hip commit: 69404d8e78]
2020-02-26 15:53:43 +05:30
Sarbojit2019 9a5658146d [HIPIFY] Add back missing execute permission to hipify-perl (#1881)
hipify-perl script lost its executable permission hence "samples/0_Intro/square" was failing. Fixes SWDEV 223433.

[ROCm/hip commit: c1a70707e0]
2020-02-19 13:48:20 +05:30
Yaxun (Sam) Liu 32297229da Let HIP-Clang inline all functions by default (#1875)
This is a quick workaround to match HCC behavior for performance since inlining usually
results in more optimization opportunities therefore better performance.

We will fine tuning inline threashold later.

[ROCm/hip commit: 92cc29ae2b]
2020-02-17 22:49:26 +05:30