Commit graph

812 Commits

Autor SHA1 Nachricht Datum
Sarbojit2019 3bfff0a23d Enabled gcc for hip host code (#1214)
* Enabled gcc for hip host code

* Adding tests for hip code + (gcc & g++), without kernels

* Excluding nvcc platforms for gcc and g++ tests + Addressing review comments

* minor code clean-up

* Add rocm include path

* Added relative path for library

* Hiding non supported functions for gcc

* Incorporating review comments
2019-08-05 09:51:36 +00:00
Evgeny Mankov 25075729f9 [HIPIFY][fix][#211] Taking into account include guard controlling macro
...while including HIP main header file, which is inserted now after #indef controlling macro, or after #pragma once, if it's occurred earlier.

+ Add a couple of unit tests.
ToDo: Check backward compatibility on older clang versions.
2019-08-02 16:46:45 +03:00
wkwchau aaec4f73a6 Added CooperativeLaunch and CooperativeMultiDeviceLaunch flag and property for hipDeviceGetAttribute() and hipGetDeviceProperties() (#1247) 2019-08-02 10:00:25 +00:00
wkwchau e7447d5809 Added query of hipDeviceAttributeHdpMemFlushCntl and hipDeviceAttribu… (#1238)
* Added query of hipDeviceAttributeHdpMemFlushCntl and hipDeviceAttributeHdpRegFlushCntl

* Added NVCC blocker for the hip*FlushCntl test cases
2019-08-01 16:03:35 +00:00
Maneesh Gupta 79358e086a Merge pull request #1276 from vsytch/SWDEV-197675
[hip][tests] Don't use a hardcoded warp size, since it can be dynamically changed.…
2019-08-01 08:59:43 +00:00
wkwchau 4b18b321f7 Added support of hipOccupancyMaxActiveBlocksPerMultiprocessor & hipOc… (#1240)
* Added support of hipOccupancyMaxActiveBlocksPerMultiprocessor & hipOccupancyMaxActiveBlocksPerMultiprocessorWithFlags APIs

* Taking into account of SGPR usage to determine the max active blocks in hipOccupancyMaxActiveBlocksPerMultiprocessor()
2019-08-01 08:58:48 +00:00
Vladislav Sytchenko fd3b626386 Don't use a hardcoded warp size, since it can be dynamically changed. Query it from the runtime instead. 2019-07-31 17:04:31 -04:00
Rahul Garg 0517c30507 Add HIP init in hipFuncGetAttributes (#1262)
* Add HIP init in hipFuncGetAttributes

* [dtest]Remove explicit hip init call in hipFuncGetAttributes dtest
2019-07-31 15:42:08 +00:00
ansurya 0f0b60f57d Testcase to validate signed/unsigned char,short as normalized float (#1267)
* Testcase to validate signed/unsigned char,short as normalized float

* corrected test_common.cpp file path
2019-07-31 05:02:35 +00:00
Aryan Salmanpour f3c4952f80 [hip][tests] add a unit test for using hipExtLaunchMultiKernelMultiDevice API (#1250) 2019-07-24 07:57:39 +00:00
Aaron Enye Shi b754de37c1 Add GFX908 specific changes to HIP (#1229)
* Add GFX908 specific for HIP

* Fix missing __halfTest in hipTestNativeHalf
2019-07-24 07:51:17 +00:00
Maneesh Gupta 75abc65e12 [dtests] Fix complex_loading_behavior.cpp build issues on nvcc path (#1242) 2019-07-24 07:49:39 +00:00
Aaron Enye Shi 0de4caa085 Fix hipMemcpy-size test running out of Host Mem (#1224)
* Fix hipMemcpy-size test running out of Host Mem

The hipMemcpy-size uses a maxElem calculated from the total GPU mem /8. Then it will allocate 4 times that amount of host memory. This tests begins failing when there is not enough host memory, such as on systems with 32GB GPU mem, and 16GB RAM. This fixes the test if not enough host memory is available on the system.

* Add windows support to hipMemcpy-size fix

* avoid linking extra libs for windows

* HIPMemcpy-size Remove freeCPU including swap
2019-07-24 07:49:20 +00:00
Maneesh Gupta 888ccbc205 [hit] Workaround for %cc and %cxx mappings. (#1233)
* [hit] Workaround for %cc and %cxx mappings.

HIP CMakeLists.txt modifies CMAKE_C_COMPILER and CMAKE_CXX_COMPILER.
This messes up any dtests that want to test against cc/c++.

So hardcode %cc to /usr/bin/cc and %cxx to /usr/bin/c++ for now till
we come up with a better solution.

Change-Id: I7dce93ce8360191e612a94e3a735e5612ac27ab5

* [hit] Add auto-variable %hip-path to syntax for BUILD_CMD

Change-Id: Id097a183fbce2b2c9691d0180d3304dd17a4e016
2019-07-19 04:45:56 +00:00
ansurya fa4d6b353a [HIP][Tests] Added new testcases for Module API (#1150)
* [HIP][tests] New testcases for module api

* [HIP][Tests]Support for CUDA devices

* Updated tests as per latest master & test GetGlobal to work on all platforms
2019-07-19 04:45:20 +00:00
ansurya 8e496c09d9 Add Max Texture 1D,2D,3D device properties (#1226)
* Add Max Texture 1D,2D,3D device properties

* Corrected testcase to use enums defined in hipDeviceAttribute_t

* Added texture 1D,2D and 3D support for NVIDIA path
2019-07-18 03:18:50 +00:00
Maneesh Gupta 8a28afeb84 [dtests] Fix typo in hipAPIStreamDisable.cpp (#1227)
Change-Id: Ib88a6be49ba192578129bb88ad09817839981398
2019-07-17 07:28:38 +00:00
Maneesh Gupta f7bb4f233c [dtests] Temporarily disable failing tests (#1218)
Change-Id: I7bb36a964c635bfbdf67484f3454d8fff7168eb2
2019-07-17 07:28:21 +00:00
Evgeny Mankov 7a87fc6c04 Merge pull request #1220 from emankov/master
[HIP][HIPIFY] Split HIP_ARRAY_DESCRIPTOR struct to HIP_ARRAY_DESCRIPTOR and HIP_ARRAY3D_DESCRIPTOR
2019-07-16 18:15:44 +03:00
kpyzhov e6a8d1daee Added gfx906 kernel binary to the HIPFB file for hipModule test. (#1215) 2019-07-12 03:13:45 +00:00
Evgeny Mankov c7117df91b [HIP][HIPIFY] Split HIP_ARRAY_DESCRIPTOR struct to HIP_ARRAY_DESCRIPTOR and HIP_ARRAY3D_DESCRIPTOR
[Reason] To be compatible with CUDA [#1133]

Update HIP code, hipify-clang, tests and docs

[TODO] Add support of the corresponding functions on nvcc fallback path
2019-07-11 14:58:16 +03:00
Yaxun (Sam) Liu 85c3b903df Add __hip_pinned_shadow__ for hip-clang and fix texture reference tests (#1200) 2019-07-03 08:51:59 +00:00
Alex Voicu 67abac1365 Put 3-wide vector types on a ketogenic diet. (#1180)
* Put 3-wide vector types on a ketogenic diet.

* Remove needless include.

* Do not be narrow-minded.

* Do not be narrow-minded.

* Put the C people on a diet too.
2019-06-25 06:32:09 +05:30
wkwchau d492f1fd6b Implement the hipOccupancyMaxPotentialBlockSize function (#1162)
* Implement the hipOccupancyMaxPotentialBlockSize function

* Replaced hipGetDeviceProperties() call by ihipGetDeviceProperties() in ihipOccupancyMaxPotentialBlockSize()

* Add test for hipOccupancyMaxPotentialBlockSize in Module API

* Added extern declaration for ihipGetDeviceProperties() to be accessed inside ihipOccupancyMaxPotentialBlockSize()

* fixed hipOccupancyMaxPotentialBlockSize test build issue

* Fix hipOccupancyMaxPotentialBlockSize dtest

* Add BUILD_CMD in hipOccupancyMaxPotentialBlockSize dtest

* Revert "Add BUILD_CMD in hipOccupancyMaxPotentialBlockSize dtest"

This reverts commit 0480ff56f1441fc515d2c26ce33783e303423938.

* Disable hipOccupancyMaxPotentialBlockSize dtest on NVCC

* move extern declaration of ihipGetDeviceProperties to hip_module.cpp

* Update the limiation of 32 wavefronts per CU and 800/512 SGPRs for VI/pre-VI chips to calculate the occupancy
2019-06-20 05:58:29 +05:30
Maneesh Gupta bd4d1838f2 [dtests] Temporarily disable hiprtc tests
Change-Id: I87c0c01837e7b59b11d99fb94d679a765f914da5
2019-05-31 16:39:33 +05:30
Maneesh Gupta 35aac8e8ce Merge pull request #1124 from kpyzhov/hipModule-test
Updated kernel binary file for hipModule test.
2019-05-24 14:16:03 +05:30
Maneesh Gupta d840268636 Merge pull request #1121 from kpyzhov/hipStreamSync2-test
Disable hipStreamSync2 test for hip-clang.
2019-05-24 14:15:54 +05:30
Evgeny Mankov c7a2b4e492 [HIPIFY] Add device texture fetch functions support
+ Add a corresponding reverse engineered sample tex2dKernel with texture template
2019-05-23 12:47:08 +03:00
Konstantin Pyzhov a8b07ada2f Updated kernel binary file for hipModule test. 2019-05-21 13:21:48 -04:00
Evgeny Mankov 29d8e10112 [HIPIFY][tests] Add reverse engineered HIP sample "peer2peer"
+ Fix typo in sample "stream"
2019-05-20 17:16:11 +03:00
Konstantin Pyzhov 7cbaa5082b Disable hipStreamSync2 test for hip-clang. 2019-05-20 02:13:30 -04:00
Evgeny Mankov 390db35dfb Merge pull request #1115 from emankov/master
[HIPIFY][cuDNN] Add cudnnGetFilter4dDescriptor support
2019-05-16 16:39:34 +03:00
Evgeny Mankov aed2affda2 [HIPIFY][cuDNN] Add cudnnGetFilter4dDescriptor support
+ Update cudnn_convolution_forward test accordingly
2019-05-16 16:36:23 +03:00
Alex Voicu ccfb764a59 Add HIPRTC, glorious ersatz for NVRTC (#1097)
* Add ersatz for NVRTC.

* Fix extraneous paren and use correct namespace.

* Use lowerCamelCase (yuck, yuck) consistently.

* Link against FS when building hiprtc lib.

* Correctly mark Manipulators. Fix dual compile.

* Add unit tests. Extend HIT to accept linker options.

* Make sure the HIPRTC library is installed.

* Better logging. Try to auto-detect the target.

* Stop specifying the target explicitly.

* Add missing flavour of `hipModuleLaunchKernel`.

* Program was already destroyed.

* Don't use `--genco`. Fix mangled name trimming.

* Fix HIPRTC breakage due to upstream noise.

* [dtests] Replace RUN -> TEST in hiprtc tests

Change-Id: Ie499e92dfe4e5c94634b1c2b76cf52d241bcfea3

* [hit] Set HIP_PATH to HIP_ROOT_DIR for all tests

Change-Id: Ib0ad1f99bc71c03e363e055dd508a7a4a210680a
2019-05-16 18:28:54 +05:30
Evgeny Mankov 64eeeca6ce [HIPIFY][tests] Add reverse engineered HIP sample "stream"
+ Add additional checks for extern __shared__ due to [#1109]
2019-05-15 20:17:03 +03:00
Evgeny Mankov fa3dda9107 [HIPIFY][fix][#1109] Do not preserve extern __shared__ for IncompleteArrayType
+ Update tests accordingly
2019-05-15 20:05:56 +03:00
Konstantin Pyzhov c8f92bebf3 Upload pre-built kernel binary for hipModule test. 2019-05-15 07:19:40 -04:00
Evgeny Mankov d74d03aa74 [HIPIFY][tests] Add reverse engineered HIP sample Profiler
+ Add missing cuda_profiler_api.h to hip/hip_profile.h transformation.
NOTE: HIP Profiler API is under development. This is NOT WORKING example.
TODO: Find out a way to generate HIP_SCOPED_MARKER, HIP_BEGIN_MARKER, HIP_END_MARKER, declared in hip/hip_profile.h in particular place (signatures are to obtain).
2019-05-14 16:43:44 +03:00
Evgeny Mankov 3bc3b61fb4 [HIPIFY][tests] Add reverse engineered HIP sample hipEvent 2019-05-13 22:12:43 +03:00
emankov 4b861bca39 [HIPIFY][tests] Add reverse engineered HIP sample MatrixTranspose 2019-05-13 19:37:18 +03:00
Maneesh Gupta 88abfde2f8 [dtests] Fix hipModule test for nvcc path
Change-Id: If918b87b848a825242e06b0d552a7be188a1c4b6
2019-05-09 18:17:19 +05:30
Maneesh Gupta eb637766b9 [dtests] Add complex_loading_behavior test
Change-Id: Iadf135cb727a1a3761abef20336d652b159c7dcd
2019-05-09 18:03:42 +05:30
Maneesh Gupta 79843f3b12 [dtests] Add hipModule test to unit tests
Change-Id: I1dac38f8580265e2e9c82d88e4f070a2ff87f60b
2019-05-09 11:36:46 +05:30
Maneesh Gupta 49a2d785d0 [hit] Add support for BUILD_CMD 2019-05-09 11:36:26 +05:30
Maneesh Gupta 622ea32964 [hit] Remove CUSTOM_CMD
Change-Id: Ia156fe6aab9cfcc11284823ea5131e33eaf962bc
2019-05-09 09:59:18 +05:30
Maneesh Gupta 9f2d1453fb [hit] Rename RUN -> TEST & RUN_NAMED -> TEST_NAMED
Change-Id: I75e24f15129973cee15fc9dac65d678bd2172074
2019-05-09 09:59:18 +05:30
Maneesh Gupta f931152280 Merge pull request #1075 from mhbliao/hliao/master/test_fix2
[test] Add device variant of `std::declval`.
2019-05-07 16:15:01 +05:30
Maneesh Gupta 1d4941e487 Merge pull request #1074 from mhbliao/hliao/master/test_fix
[test] Use explicit cast for address space cast.
2019-05-07 16:09:15 +05:30
Maneesh Gupta 98ab402fcb Merge pull request #1073 from kpyzhov/multi-thread-device-test
hipMultiThreadDevice test: Reduced maximum number of created HIP stre…
2019-05-07 16:08:37 +05:30
Maneesh Gupta fea21dc6d5 Merge pull request #1072 from kpyzhov/master
Refined hipSetDevice test.
2019-05-07 16:07:36 +05:30