提交線圖

407 次程式碼提交

作者 SHA1 備註 日期
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
agodavar ae465bc338 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
2020-03-04 10:07:09 -05:00
Rahul Garg 6be7537cf9 Remove deprecated HIP markers (#1876) 2020-02-28 16:47:15 +05:30
Maneesh Gupta 3b4b58bda6 bump version to 3.2 (#1898)
- Bump version to 3.2
- [ci] Enable tests on ROCm 3.1
2020-02-27 16:18:31 +05:30
Yaxun (Sam) Liu ff4479fcc7 Fix hipcc for extra -mllvm option (#1885) 2020-02-26 15:53:43 +05:30
Sarbojit2019 d81a9a712a [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.
2020-02-19 13:48:20 +05:30
Yaxun (Sam) Liu f4120043ed 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.
2020-02-17 22:49:26 +05:30
Siu Chi Chan 13052f27c2 Disabling HCC code object v3 generation by default.
Some PyTorch unit tests have regression.  Disabling cov3 to allow more
time to debug and unblock PyTorch

Change-Id: Iba7f425ef3499c20c42ec45d9152b5d27ce97d03
2020-02-14 19:39:27 -05:00
Payam 87cd9451f2 updated hipcc to include HSA path for clang builds as well
Change-Id: Icaaa68fdbe79fb16e4e9fedd420460f1479d7fe0
2020-02-13 16:48:24 -05:00
Aryan Salmanpour dfa565d76f resolve merge conflict 2020-02-10 10:30:55 -05:00
mhbliao 8343d7c9aa [hip] Cleanup compiler wrapper for HIP-Clang. (#1847) 2020-02-07 13:28:26 -08:00
Michael LIAO 59bd608bfe [hipcc] Skip warning on gfx000.
- The known target checking should skip `gfx000` as well as it won't be
  used in real compilation command formation. The avoid generating
  annoying warning on `gfx000`.
2020-02-06 17:09:14 -05:00
Siu Chi Chan 713702eebc Enable code object v3 codgen when compiling with HCC (#1836)
Change-Id: I590c05a418cc37ec247b89124cef17a7fe8b27e2
2020-02-05 20:56:33 +05:30
kpyzhov 951d7d4ba6 hipcc script: Refined device selection; added gfx1011 target. (#1821) 2020-02-04 08:56:16 +05:30
Aryan Salmanpour d805e98fcb update the hipify-perl 2020-01-31 14:36:37 -05:00
Aryan Salmanpour 75572a4175 code clean up 2020-01-31 13:08:25 -05:00
Aryan Salmanpour 6db9b782be [HIP][HIPIFY] Add some missing flags for cooperative launch and occupancy APIs 2020-01-30 15:05:53 -05:00
paulfreddy c5ed5c71a3 Changes for multiple ROCm installation (#1771)
* FBA-29, FBA-69, multiple rocm support, shared library conflicts
Changes to resolve:
1) Multiple rocm release installation support
2) Multiple rocm shared lib conflicts
3) Add the so versioning also
2020-01-21 14:17:35 +05:30
Evgeny Mankov 41beed4839 [HIPIFY] Sync with hipSPARSE
+ Update hipify-perl and doc accordingly
2020-01-13 18:34:10 +03:00