Граф коммитов

425 Коммитов

Автор SHA1 Сообщение Дата
Vlad Sytchenko e82e9355f2 Revert "Let hipcc not pass -mllvm option to HIP-Clang on Windows"
This reverts commit e796a1ed78.

Change-Id: If29906b9c63f03d6e51144f510d3a956d90935e8
2020-06-11 16:36:48 -04:00
Siu Chi Chan 32f3374af9 fix uninitialized value in hipcc
Change-Id: I90b070c491f0efc328fcf97de0e111658ec772de
2020-06-10 16:07:51 -04:00
Yaxun (Sam) Liu 0a513d8a02 Fix include path and wrapper header
Currently std::complex and some other std functions require uses to
include hip_runtime.h before any other headers to work, which is not
reliable.

changes are made in clang to fix this issue:
https://reviews.llvm.org/D81176

which requires hipcc and HIP headers to make corresponding changes.

This patch will make sure the clang change will not break
HIP/ROCclr during this transition.

After the transition is done, we can remove explicitly setting
include path for HIP-Clang and HIP header in hipcc and hip config
cmake files and rely on clang driver to set it automatically.

Change-Id: I5d226861c2560ffa6c5ab17343a43cc378048061
2020-06-09 17:37:20 -04:00
Rahul Garg 6aab5fa993 Bump version to 3.6
Change-Id: I739a7bd03a4ed102bbc7c2f60d108e20132f5423
2020-06-09 11:22:20 -04:00
Aaron En Ye Shi d93134e727 Add compiler-rt library for __fp16 and _Float16
Similar to HCC, link with compiler-rt to support __fp16 and _Float16 type conversions in ONNX models. This should resolve SWDEV-238491.

Change-Id: Iad8dcff568831719f501f562a04023326ae8036c
2020-06-03 18:53:14 +00:00
Siu Chi Chan c414c70e8f update device library path
fix device lib directory

add missing --hip-link switch for link phase

Change-Id: I4b2eeb32648ca3cec72ec1f4e3381ce1fc0a90a5
2020-06-03 14:44:23 -04:00
Christophe Paquot 4932115d6d [hip] Skip lang guess if -x <lang> is specified.
Change-Id: If5cbdd1e5d36d2d8b83f3eadd0598162691167aa
2020-05-15 17:07:40 -04:00
Payam 4638f0f11c updating envar to HIP_ROCCLR_HOME
Change-Id: Ic0bbf40638538307377e6db1a7379fb23dec8306
2020-05-14 12:59:51 -04:00
Aaron En Ye Shi 4fa2ce777a Merge "search path logic updated for extractkernel SWDEV-230929" into amd-master-next 2020-05-12 17:59:47 -04:00
Icarus Sparry 3c855b543a 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>
2020-05-11 17:30:47 -04:00
Dittakavi Satyanvesh dcf94dcd2a search path logic updated for extractkernel SWDEV-230929
Change-Id: I48d6332502774485d7ced3fee065a74f15774500
2020-05-11 02:27:40 -04:00
Icarus Sparry 9f31801831 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>
2020-05-10 18:16:48 -04:00
agodavar e069cf6511 SWDEV-234447:Fix error Use of uninitialized value in concatenation (.)
Change-Id: Ia6f8d23f100826438f152c175d10ac3096ee024e
2020-05-08 12:07:24 -04:00
Aaron Enye Shi c70a32c5a7 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
2020-05-08 13:27:36 +00:00
Aaron Enye Shi 88ce9d5a10 Fix missed VDI names in hip-on-rocclr
Change-Id: I830feb37a043656136648e92a0c6f1eaae8402d7
2020-05-07 08:37:28 -04:00
Rahul Garg 4c05fd9d4c Remove HIP_MARKER left overs due to HIP PR 2032
Change-Id: Ieae68dd3b12c92b1d6830619ca4c6ae43c400225
2020-05-06 20:26:18 -04:00
Payam dba0e72de2 name change vdi to rocclr
Change-Id: I06d198bbb4a499e153b290b73a92afed3553b252
2020-05-06 09:14:30 -04:00
Yaxun (Sam) Liu 48d89d670e Fix hipcc for -E
-E is for preprocessing only, which should be compile only.

This is required by enabling sccache.

Change-Id: Ia0a0acb6a04abd03a9cb5b3c13cf7446837f37b4
2020-05-05 14:30:25 -04:00
Aaron Enye Shi eb42a165b4 Add __HIP_VDI__ to hipconfig host flags for VDI
Change-Id: Ia9582f2d51b50cbe151b4866ffbfc9514825f613
2020-05-04 20:03:07 +00:00
Aaron En Ye Shi a131af098a Merge "find_package(hip) changes for clang" into amd-master-next 2020-05-04 10:19:51 -04:00
agodavar ce8a5af666 find_package(hip) changes for clang
Change-Id: I9dc1be1dd5f9424e26ebcd2961207e1c4467550f
2020-05-01 20:48:32 +00:00
Aaron Enye Shi c729d52681 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
2020-04-30 15:31:20 -04:00
Aaron Enye Shi 2df5d92240 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
2020-04-27 11:44:53 -04:00
Yaxun (Sam) Liu 4e7b1cdbd2 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
2020-04-27 11:43:05 -04:00
root b5031f39b1 Merge master into amd-master-next
Change-Id: I3fc1dc0c860d627053537581e75561e8a7efe327
2020-04-26 22:19:37 +00:00
Aaron Enye Shi 17e439e572 extractkernel obj dump args to use double dashes (#2034)
More recent llvm-objdump has changed disassemble and mcpu arguments to require double dashes.
2020-04-23 21:51:33 +05:30
Maneesh Gupta f2e1118d7a Merge in the rocclr based hip runtime (#2032)
* Merge master-next changes in master (include vdi development in master branch)
2020-04-23 09:12:06 -07:00
Tao Sang 32130f8ec3 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
2020-04-20 15:37:02 -04:00
Tao Sang a6c6f51926 Revert "Solve issues with hip-vdi runtime static lib"
This reverts commit 5210ee6ca5.

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
2020-04-17 10:13:08 -05:00
Siu Chi Chan 2634c8fe74 moving the extractkernel tool from hcc to hip (#1644) 2020-04-17 10:31:06 +05:30
Tao Sang 5210ee6ca5 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
2020-04-15 13:46:36 -04:00
Evgeny Mankov f2205827bb [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
2020-04-10 19:36:43 +03:00
Maneesh Gupta 0ea6697192 Merge branch 'amd-master' into amd-master-next
Change-Id: I3094c15008093f2072bcd38aca4ea90aeae2d97b
2020-04-09 06:31:00 -04:00
Rahul Garg c09c4cd239 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
2020-04-06 15:39:10 +05:30
Reshabh Sharma 36f24a40e5 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
2020-03-31 16:13:43 -04:00
Michael LIAO 64bbce8e73 [hipcc] Remove the previous workaround.
Change-Id: Ie1c2aa21689bc343c10fd4b699546cf500ced5b2
2020-03-30 10:18:47 -04:00
Yaxun (Sam) Liu 2198aead38 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
2020-03-25 14:41:27 -07:00
Yaxun (Sam) Liu 31d9ea89f1 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.
2020-03-19 16:16:31 +05:30
Evgeny Mankov 758b3864b7 [HIPIFY][perl] Fix missed sync with hipify-clang 2020-03-18 14:24:02 +03:00
Evgeny Mankov 126ebadcc6 [HIPIFY][SPARSE] sync with hipSPARSE's "added csrsm2" (#83)
+ https://github.com/ROCmSoftwarePlatform/hipSPARSE/pull/83
+ Update doc and hipify-perl accordingly
2020-03-18 13:44:50 +03:00
Evgeny Mankov baa0c68ab4 [HIPIFY][SPARSE] sync with hipSPARSE
+ Update doc and hipify-perl accordingly
2020-03-18 13:07:46 +03:00
Yaxun (Sam) Liu 0307ae4c9a 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.
2020-03-18 11:20:21 +05:30
Reshabh Sharma 59b8dabbd0 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
2020-03-17 14:02:14 +05:30
Reshabh Sharma 4a9793e2e2 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.
2020-03-17 14:01:33 +05:30
Yaxun (Sam) Liu 6b1956d139 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
2020-03-17 14:00:20 +05:30
Sameer Sahasrabuddhe d48738856c 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
2020-03-16 04:00:39 -04:00
Yaxun (Sam) Liu e796a1ed78 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
2020-03-10 13:07:26 -04:00
Vladislav Sytchenko cd76eb7486 Add hipDrvMemcpy3D.
This is the equivalent of cuMemcpy3D.

Change-Id: Ib2e06dbd6f5093c931cdfd36c87617f32acffc2d
2020-03-09 16:11:25 -04:00
Sameer Sahasrabuddhe 2c3dfdda41 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.
2020-03-09 09:40:05 +05:30
Lad, Aditya e7fdb3d796 Merge branch 'master' into amd-master-next
Conflicts:
	CMakeLists.txt
	tests/src/texture/simpleTexture2DLayered.cpp
	tests/src/texture/simpleTexture3D.cpp

Change-Id: I4aa4754d391b5f37ddf15fa0bcfc84d9da020119
2020-03-06 14:10:44 -05:00