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

852 Коммитов

Автор SHA1 Сообщение Дата
Evgeny Mankov 3444834e3a [HIPIFY][tests] Exclude tests for the libs, which are not defined in cmake command line
+ affects cuDNN and CUB tests, paths to libraries of which are defined by CUDA_DNN_ROOT_DIR and CUDA_CUB_ROOT_DIR
+ Warn about excluding and why, for instance:
  "WARN: cuDNN tests are excluded due to unset CUDA_DNN_ROOT_DIR"
2019-10-15 14:20:23 +03:00
Evgeny Mankov 92fb5a3a94 [HIPIFY][CUB] Add missing unit test 2019-10-14 12:03:20 +03: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
Jatin Chaudhary 32eb6d3bec Re enable test RTC (#1516)
Adding target resolution in hiprtc tests and reenable them.
2019-10-10 19:59:55 +05:30
ansurya 87834500b9 Fix for directed tests failure (#1511)
directed_tests/runtimeApi/module/hipLaunchCooperativeKernel.tst - Disabling test temporarily until driver support is available.
directed_tests/runtimeApi/memory/hipArray.tst - Disabling test temporarily to reimplement it correctly.
2019-10-10 19:58:41 +05:30
Evgeny Mankov 88cb3504ff [HIPIFY][test] Update allocators.cu test 2019-10-10 17:20:41 +03:00
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
ansurya ba9c6e13e4 Added new Memory API's (#1399)
Added new memory API's hipMemAllocPitch, hipMemAllocHost, hipMemsetD16, hipMemsetD16Async, hipMemsetD8Async
Modified to support all scenarios hipMemcpyParam2DAsync, hipMemcpyParam2D.
2019-10-04 13:36:31 +05:30
Evgeny Mankov 6bb9913e8a [HIPIFY] Return to wrapping with HIP_KERNEL_NAME(...) macro of a template instantiation kernel launch
[REASON]

1. hip-clang is fine with the templated kernel launch, brackets are unneeded: HIP_KERNEL_NAME(...) __VA_ARGS__
2. HCC is not, thus: HIP_KERNEL_NAME(...) (__VA_ARGS__)

[TODO] Clean-up entirely kernel name wrapping when HCC is finally obsolete.

+ Update perl generation, hipify-perl, and affected tests accordingly.
2019-10-02 16:01:07 +03:00
Evgeny Mankov 108992428d Merge pull request #1492 from emankov/master
[HIPIFY][#1490][fix] Populate the list of supported device atomic functions
2019-10-01 14:00:07 +03:00
Evgeny Mankov b5f17e8ff0 [HIPIFY][#1490][fix] Populate the list of supported device atomic functions
+ Update hipify-perl accordingly
+ Add atomics.cu test on all atomics
2019-10-01 13:57:46 +03:00
Sarbojit2019 cde5119c9e [dtests] Separated C macros from CPP header file (#1429)
* Separated C macros from CPP header file

* Updated review comment
2019-10-01 12:38:32 +05:30
Yaxun (Sam) Liu 56193a7828 Fix cast of __half for HIP-clang (#1475) 2019-09-30 10:40:42 +05:30
AlexBinXie b3e6ba50c3 [hip] Added gfx803,gfx1010,gfx1012 kernel binary hipModule test. (#1444)
This is to address hipModule test seg fault in GFX1010
2019-09-30 10:38:37 +05:30
Evgeny Mankov 9d1d4b78e3 [HIPIFY][#1439] Add reinterpret_cast to args of some functions
+ Perl part of [#1458]
+ Affected functions: hipFuncSetCacheConfig, hipFuncGetAttributes
+ Implement function generateHostFunctions() in hipify-clang for that purposes
+ Update hipify-perl accordingly
2019-09-25 18:53:17 +03:00
Evgeny Mankov dd6a92afb7 [HIPIFY][#1439] Add reinterpret_cast to args of some functions
+ Affected functions: hipFuncSetCacheConfig, hipFuncGetAttributes
+ Add a corresponding Matcher cudaReinterpretCastArgFuncCall
+ Add reinterpret_cast.cu test

TODO: Do the same for hipify-perl
2019-09-24 09:44:17 +03:00
Evgeny Mankov 3722d5b4b9 [HIPIFY][#1435] Add HIP_SYMBOL wrapper to the templated Device Symbol argument of the following functions:
cudaMemcpyToSymbol, cudaMemcpyToSymbolAsync, cudaGetSymbolSize, cudaGetSymbolAddress, cudaMemcpyFromSymbol, cudaMemcpyFromSymbolAsync

+ Add a corresponding cudaSymbolFuncCall matcher.
+ Add device_symbols.cu test for the above 6 functions, update existed.
+ Fix dim3() type cast issue, update affected tests.

TODO: Do the same in hipify-perl
2019-09-19 19:33:42 +03:00
Evgeny Mankov 4f59ec25fe [HIPIFY][perl][fix] Treat ::device_function as a device function
+ Do not treat somenamespace::device_function_name as a device function
+ Fix generation of warnUnsupportedDeviceFunctions function in hipify-clang
+ Update hipify-perl based on hipify-clang -perl generation
+ Update device test math_functions.cu for hipify-perl

[Restrictions]
- hipify-perl is yet unable to handle function declarations in user namespaces
- hipify-perl is yet unable to handle using directive
2019-09-16 17:36:55 +03:00
AlexBinXie 5ed1f3e2c8 [hip]Skip test when hipHostMallocCoherent is not supported by implementation (#1380) 2019-09-16 08:31:43 +00:00
ansurya ceb734b917 Added new device attributes (#1377)
* Added new device attributes

* updated comment

* updated with new device attributes supported
2019-09-16 08:31:30 +00:00
Aryan Salmanpour 48880a017e [hip][tests] add a unit test for testing hipLaunchCooperativeKernel (#1361)
* [hip][tests] add a unit test for testing hipLaunchCooperativeKernel

* use __ockl_grid_sync function

* remove already defined __ockl_grid_sync function

* use sync function for grid synchronization
2019-09-16 08:31:09 +00:00
Evgeny Mankov 56ab105e9d [HIPIFY][#1400] Fix Template Instantiation kernel launch (clang & perl)
+ Enclose template instantiation kernel calls into round brackets, leave regular kernel names unchanged (hipify-perl doesn't handle cases with macros).
+ Fix corresponding tests.

PS. hipify-perl couldn't handle correctly the following cases due to macros expansion disability, thus hipify-clang should be used instead:

#define KERNEL_NAME_MACRO axpy<float>
#define KERNEL_CALL_MACRO axpy<float><<<1, 2>>>
#define KERNEL_ARG_LIST_MACRO a, x, y

// CUDA:
KERNEL_NAME_MACRO<<<1, 2>>>(KERNEL_ARG_LIST_MACRO);
KERNEL_CALL_MACRO(KERNEL_ARG_LIST_MACRO);

// hipify-perl:
hipLaunchKernelGGL(KERNEL_NAME_MACRO, dim3(1), dim3(2), 0, 0, KERNEL_ARG_LIST_MACRO);
KERNEL_CALL_MACRO(KERNEL_ARG_LIST_MACRO);

// hipify-clang:
hipLaunchKernelGGL((KERNEL_NAME_MACRO), dim3(1), dim3(2), 0, 0, KERNEL_ARG_LIST_MACRO);
hipLaunchKernelGGL((axpy<float>), dim3(1), dim3(2), 0, 0, KERNEL_ARG_LIST_MACRO);
2019-09-10 15:59:06 +03:00
Evgeny Mankov 6602fadc16 [HIPIFY] Add device functions support
+ Add a corresponding matcher cudaDeviceFuncCall to match only (__device__ or __global__) and not __host__ functions.
+ Add a corresponding device functions mapping:
  only unsupported are listed, cause supported are exactly the same as of CUDA and do not need transformation;
  make FindAndReplace for device functions separated from host API calls.
+ Add a test to distinguish device functions and user-defined.
2019-09-06 18:34:12 +03:00
Evgeny Mankov b98330609b [HIPIFY][perl][#259] Fix
empty<<<1, 2>>> ( );     >>  hipLaunchKernelGGL(empty, dim3(1), dim3(2), 0, 0);
empty<<<1, 2, 0>>>();    >>
empty<<<1, 2, 0, 0>>>(); >>

instead of erroneous:    >> hipLaunchKernelGGL((empty), dim3(1), dim3(2), 0, 0, );
2019-09-03 16:44:20 +03:00
Evgeny Mankov 1bf6deb149 [HIPIFY][tests] Add occupancy test 2019-09-02 17:54:06 +03:00
Sameer Sahasrabuddhe 70023c9075 remove obsolete test for OCKL Asynchronous Streams
The implementation for OCKL AS was recently removed from the device
library since that feature is now superseded by hostcall.
2019-08-30 20:41:29 +05:30
Evgeny Mankov 5d0b628142 Merge pull request #1372 from emankov/master
[HIPIFY][#207][fix] Translate all preprocessor's conditional blocks
2019-08-29 10:30:05 +03:00
Sarbojit2019 5c4f78bac3 [HIP] Reclaiming hipLaunchKernel API (#1353)
* [HIP] Reclaiming hipLaunchKernel API

* Reclaiming hipLaunchKernel : Incorporated review comments

* Incorporated review comments

* Removed hipLaunchKernel Macro from nvcc path
2019-08-29 01:02:41 +00:00
Evgeny Mankov 24be21495d [HIPIFY][#207][fix] Translate all preprocessor's conditional blocks
+ Start to translate preprocessor's false conditional blocks too:
  based on clang's https://reviews.llvm.org/D66597;
  available only starting from LLVM 10.0 or trunk.
+ Option -skip-excluded-preprocessor-conditional-blocks for skipping excluded conditional blocks:
  the default behavior for hipify-clang built with LLVM < 10.0;
  false by default for hipify-clang built with LLVM 10 or trunk.
+ Add 4 preprocessor unit tests, 2 of which are LLVM 10.0 only
+ Update couple of existing tests by setting -skip-excluded-preprocessor-conditional-blocks option:
  update lit testing accordingly
2019-08-28 21:17:35 +03:00
Rahul Garg 44422065a1 [dtests] refactor windows specific changes (#1313)
* [dtests] refactor windows specific changes

* Refactor hipMemoryAllocateCoherentDriver - PR- 1309

* Fix missing z in _putenv_s

* Revert "Fix missing z in _putenv_s"

This reverts commit 099a1b20a5c75c5f122d57c0ad2bca01745cdc9c.

* Refactor changes from PR 1299

* Update hipEnvVarDriver.cpp
2019-08-16 02:13:00 +00:00
Maneesh Gupta d3e2bbc791 [hit] Add support for specifying dependencies in HIT syntax (#1323) 2019-08-14 11:30:42 +00:00
Evgeny Mankov d20ae3b50a [HIPIFY] Add cudaMallocManaged -> hipMallocManaged
+ Add mapping for corresponding data types
+ Add a test
+ Update docs
2019-08-13 17:56:06 +03:00
Evgeny Mankov 3ac3b2800b [HIPIFY][cuRAND][#1257] Fix
+ Update CURAND_API_supported_by_HIP.md and test accordingly
2019-08-09 21:27:16 +03:00
amd-lthakur 9b31d26237 [dtests] Fix build issues with hipMemoryAllocateCoherentDriver.cpp on windows (#1309)
Compilation error being observed due to popen(), pclose() and setenv() linux calls on windows. Replaced with appropriate calls on windows.
2019-08-09 11:53:16 +00:00
amd-lthakur 9abae7114c [dtests] Fix build issue with hipMemcpy_simple.cpp on windows (#1306)
Compilation error being observed on windows due to aligned_alloc() call. Mapped the call to _aligned_malloc() for windows.
2019-08-09 11:52:46 +00:00
ansurya cbe9f8dc6b [dtests[ Fix build issues with hipEnvVar*.cpp on windows (#1299)
* replace getopt with clara based command line options

* Removed header getopt.h
2019-08-09 11:52:10 +00:00
amd-lthakur e94c0592de [dtests] Fix build issues with hipLaunchParm.cpp on windows (#1293)
* Removed unwanted #include sys/time.h , gettimeofday() and timeval variables and this also helps avavoid compilation error in windows due to gettimeofday() call equivalent of which is not available in windows

* Changed the Macro name from GPU_PRINT_TIME to MY_LAUNCH_MACRO
2019-08-09 11:50:10 +00:00
amd-lthakur d3ffad7c83 [dtests] Fixed build issues with hipAsynchronousStreams.cpp on windows (#1292)
Changed the third arg of the functions __hip_as_write_block and __ockl_as_write_block from ulong to uint64_t so as to fix the compilation error in windows
2019-08-09 11:49:31 +00:00
lthakur d18160920e Resubmitting the fix so as to address the changed format in the last submission 2019-08-08 11:26:26 +05:30
lthakur 435badcb0e Fixed compilation errors being observed on windows 2019-08-07 15:54:46 +05:30
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