Commit gráf

533 Commit-ok

Szerző SHA1 Üzenet Dátum
Reshabh Sharma 7bcfdf017d 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 bbbb8bf1e6 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 7aa9611689 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 64cd527335 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 92af5e4375 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 ecd7c99b49 Add hipDrvMemcpy3D.
This is the equivalent of cuMemcpy3D.

Change-Id: Ib2e06dbd6f5093c931cdfd36c87617f32acffc2d
2020-03-09 16:11:25 -04:00
Sameer Sahasrabuddhe 09130b3b92 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 d80edf9541 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 3479847d16 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 6c5fa32815 Remove deprecated HIP markers (#1876) 2020-02-28 16:47:15 +05:30
Maneesh Gupta 71e1f87f7e 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 69404d8e78 Fix hipcc for extra -mllvm option (#1885) 2020-02-26 15:53:43 +05:30
Sarbojit2019 c1a70707e0 [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 92cc29ae2b 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 f2ab87d872 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 b95968187b updated hipcc to include HSA path for clang builds as well
Change-Id: Icaaa68fdbe79fb16e4e9fedd420460f1479d7fe0
2020-02-13 16:48:24 -05:00
Aryan Salmanpour 874b201ee2 resolve merge conflict 2020-02-10 10:30:55 -05:00
mhbliao a01b262660 [hip] Cleanup compiler wrapper for HIP-Clang. (#1847) 2020-02-07 13:28:26 -08:00
Michael LIAO 66678b0170 [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 93e62401c7 Enable code object v3 codgen when compiling with HCC (#1836)
Change-Id: I590c05a418cc37ec247b89124cef17a7fe8b27e2
2020-02-05 20:56:33 +05:30
kpyzhov af118b98d2 hipcc script: Refined device selection; added gfx1011 target. (#1821) 2020-02-04 08:56:16 +05:30
Aryan Salmanpour 5c03a003c3 update the hipify-perl 2020-01-31 14:36:37 -05:00
Aryan Salmanpour c8137263d6 code clean up 2020-01-31 13:08:25 -05:00
Aryan Salmanpour 6e867eacb6 [HIP][HIPIFY] Add some missing flags for cooperative launch and occupancy APIs 2020-01-30 15:05:53 -05:00
paulfreddy 3bc69394d0 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 d7f8654487 [HIPIFY] Sync with hipSPARSE
+ Update hipify-perl and doc accordingly
2020-01-13 18:34:10 +03:00
Rahul Garg f3cafd5855 Fix hipcc warning related to hipVersion (#1767)
* Fix hipcc warning related to hipVersion
* Rename hipVersion.h to hip_version.h
* Remove HIP_VERSION splitting
* Update .gitignore
- Ignore generated include/hip/hip_version.h
- Removed some stale entries
- Added executables from samples/1_Utils/*/ for consistency with bin/ entries.
2020-01-06 12:33:23 +05:30
Evgeny Mankov 0dadb23327 Merge pull request #1759 from emankov/master
[HIP] Unify hipError_t (Step 2)
2019-12-30 19:21:09 +03:00
Sarbojit2019 aa4aea0754 Change to generate hipVersion.h (#1726)
HIP_VERSION_MAJOR, HIP_VERSION_MINOR, HIP_VERSION_PATCH and HIP_VERSION pre-processor macros are now defined in hipVersion.h instead of being set by hipcc.
2019-12-30 12:44:24 +05:30
Evgeny Mankov dbad4d9b7f [HIP] Unify hipError_t (Step 2)
Step 2. Make a few hipError codes deprecated
Update hipify-clang, hipify-perl, docs and samples accordingly
2019-12-22 02:05:31 +03:00
Maneesh Gupta 18c1003469 bump version to 3.1 (#1756)
* Bump version to 3.1

* [ci] Enable tests on ROCm 3.0
2019-12-20 12:10:25 -08:00
Evgeny Mankov 3b00057922 [HIPIFY] Revise HIP runtime
+ hipMemAllocHost is deprecated, use hipHostMalloc instead
+ hipMemAllocManaged -> hipMallocManaged
+ hipFreeHost -> hipHostFree
+ cudaMemset3D(Async) -> hipMemset3D(Async)
+ update docs and hipify-perl accordingly
2019-12-16 20:09:55 +03:00
Evgeny Mankov 396a8a7a00 [HIPIFY][BLAS] Sync with cuBlas/rocblas/hipBlas 2019-12-12 19:52:18 +03:00
Evgeny Mankov ec9b6a95a3 [HIPIFY] CUDA 10.2 (functions only)
+ Both Driver API and RT API are supported and synced with each other
+ Update *.md docs and hipify-perl accordingly
+ Add new conversion type "virtual_memory", introduced in Dirver API
2019-12-04 18:37:31 +03:00
Evgeny Mankov e3c3c6d86e [HIPIFY] CUDA 10.2 fp_16 support 2019-12-04 13:27:46 +03:00
Evgeny Mankov 5a03e8ccb9 [HIPIFY] CUDA 10.2 support (data types only)
+ Both Driver API and RT API are supported and synced with each other
+ Update *.md docs and hipify-perl accordingly
2019-12-04 12:25:20 +03:00
Evgeny Mankov d33dd71ed3 [HIPIFY] Sync cudaError/CUresult between CUDA Driver API/CUDA RT API/HIP
+ Update *.md docs and hipify-perl accordingly

[Reason]
Starting with CUDA 10.1 all error codes are merged between Driver and RT APIs

[ToDo]
Do the same merge in HIP API as there is no need in distinguishing return codes by API
2019-11-29 19:29:11 +03:00
Maneesh Gupta dae8630592 Bump version to 3.0 (#1648)
Change-Id: Id1e6eb222080a339af938212e74a52c39c305eab
2019-11-10 20:23:58 -08:00
Evgeny Mankov c48fdefee8 [HIPIFY][CUB][#1460][perl] Add "cub::" namespace prefix support in hipify-perl as well 2019-11-01 14:34:18 +03:00
Evgeny Mankov 315a10a59d [HIPIFY] cudaMemcpy2DFromArray(Async) support 2019-10-29 19:12:42 +03:00
Evgeny Mankov 6f88c81a78 [HIPIFY][#1569] Fix 2019-10-22 11:08:37 +03:00
Evgeny Mankov b08f29a6fa [HIPIFY][perl] Support of 'using namespace cub' 2019-10-21 17:15:05 +03:00
Rahul Garg 1fd16d7601 Merge pull request #1550 from yxsamliu/new-launch
Add -fhip-new-launch-api to hipcc for HIP/VDI
2019-10-17 19:07:32 -07:00
Rahul Garg 5f37f3174a Revert "hipcc defaults to code object v3 (#1298)"
This reverts commit d39a2a0749.
2019-10-17 13:27:28 -04:00
kpyzhov 596bf4e326 [hipcc] Temporary add -D_OPENMP to clang options to workaround cmake issue (#1540)
* Temporary add -D_OPENMP to clang options in hipcc to allow using CMake OpenMP detection with hip-clang (until updated CMake version is available).
2019-10-16 10:51:28 +05:30
Yaxun (Sam) Liu 4d5cb8351c Add -fhip-new-launch-api to hipcc for HIP/VDI 2019-10-15 21:47:33 -04:00
Evgeny Mankov 277d3b8369 [HIPIFY][CUB] Initial support (hipify-clang only)
+ Add one matcher (will be more)
+ Update Maps and Statistics
+ Add cub_01.cu unit test
+ Update lit harness to support standalone CUB
+ Update README.md
+ Update hipify-perl (only CUB header is supported for now)

[IMPORTANT]
clang (and hipify-clang) works correctly only with official NVLabs version on GitHub.
Compilation of CUB from official CUDA release has conflicts with THRUST.
Thus, to compile CUB sources, option "-I" should be specified to the cloned CUB from NVLAB on GitHub.
2019-10-14 11:55:55 +03:00
Evgeny Mankov 876af8f381 [HIPIFY][perl] Add "important" notice
# IMPORTANT: Do not change this file manually: it is generated by hipify-clang --perl
2019-10-10 18:25:26 +03:00
srinivamd 908e14d176 remove dependencies on /opt/rocm path (#1379)
* remove hard coded dependencies on /opt/rocm path
2019-10-10 19:56:55 +05:30
Evgeny Mankov 3286ffdfc0 [HIPIFY][#1487][fix] Translate correctly kernel names prefixed with namespace
+ Modify CUDA2HIP_perl for the fix
+ Add ns_kernel_launch.cu test
+ Update hipify-perl by hipify-clang -perl
2019-10-08 15:58:48 +03:00