Commit Graph

901 Commits

Author SHA1 Message Date
jiabaxie e73927caee Updated hipEnvVarDriver to work with Windows (#1614)
* Updated hipEnvVarDriver to work with Windows

* Cleaned up a bit of code

* Fixed a part where putenv was used for both win and linux

* Defines moved to test_common.h and cleaned up code

* Cleaned up some macro defines and used const char instead

* Got rid of some excess commenting

* directory paths are unconditional

* Cleaned some duplicate code, and variables are now declared and defined together
2019-11-18 12:18:29 +05:30
kjayapra-amd 0a68be8b5b [dtests] Fixing compilation error in saxpy.cpp (#1608) 2019-11-18 12:18:11 +05:30
Alex Voicu 69e74c3e96 Add support for extended launch syntax. (#1530)
* Add support for extended launch syntax.

* Add unit test.

* Fix typo

* hipExtLaunchKernelGGL lives in hip_ext.h

Change-Id: Ice32dab0d43475fda65c6a910c11416871a8f2ff

* [dtest] remove redundant include from hipModuleGetGlobal dtest
2019-11-16 22:24:07 -08:00
Maneesh Gupta f9fec8fdca [ci] Fix failures on nvcc path (#1654)
Change-Id: I97f6b51314e14965618ab510bf57a2b034183e78
2019-11-15 07:58:40 +05:30
Sarbojit2019 45613311d7 [HIP] Fixed hipStreamAddCallback [SWDEV#165185] (#1425)
Fixed hipStreamAddCallback() as requested in SWDEV#165185
Added unit test to test the behavior
2019-11-07 13:18:12 +05:30
ansurya e07926ce0f Fixed texture 2D mapping for pitched arrays & 3D Texture read (#1415)
Texture 2D image mapping for pitched arrays:
github issue: Texture Object's Buffer seems to be Misaligned #886
JIRA ticket: SWDEV-199313

SWDEV-151670 : Fixed issue with 3D texture with 4 components
SWDEV-151671 : Issue with 2D layered texture with 4 components
2019-11-07 13:17:46 +05:30
Rahul Garg 579a4f36fa Rename hip/hip_hcc.h to hip/hip_ext.h (#1341)
* Rename hip/hip_hcc.h to hip/hip_ext.h

* Deprecate hip_hcc.h
2019-11-07 13:17:10 +05:30
Evgeny Mankov a601670cb7 Merge pull request #1624 from emankov/hipify
[HIPIFY][#1409] Fix for kernel launch macro expansion
2019-11-05 14:04:51 +03:00
Evgeny Mankov 976f8e8bf6 [HIPIFY][#1409] Fix for kernel launch macro expansion
+ Add a corresponding test kernel_launch_01.cu
+ Add isBefore() check to avoid crash on Replacement with negative length

TODO:
+ Compatibility with former LLVM versions
+ More complicated kernel launch tests
2019-11-05 14:00:13 +03:00
Aryan Salmanpour cf92fae9e6 [hip][tests] Add two more workgroup sizes for testing hipLaunchCooperativeKernel (#1613) 2019-11-05 12:32:46 +05:30
Rahul Garg 4739e68bbe Merge pull request #1582 from amd-lthakur/hipExtMLK
Adding a directed test case for hipExtModuleLaunchKernel() api.
2019-10-31 17:13:26 -07:00
Rahul Garg 55f2a38120 Formatting changes 2019-10-30 18:12:51 -07:00
Rahul Garg 4ab71216b4 Formatting changes ,variable name and check update 2019-10-30 18:09:21 -07:00
Rahul Garg ba8105e0cd Merge pull request #1515 from ansurya/tex_unbind_issue_fix
Fix undefined ref to hipUnbindTexture for texture types
2019-10-30 17:54:15 -07:00
Rahul Garg e4a1e44162 Revert "Fix occupany APIs (#1560)"
This reverts commit af351d7e1b.
2019-10-29 11:41:08 -07:00
Evgeny Mankov 70c5072302 [HIPIFY][tests] Rename the ambiguous call as well 2019-10-25 16:07:31 +03:00
Evgeny Mankov 0410d5dcd2 [HIPIFY][tests] Fix ambiguous call to cusparseGetErrorString declared in cusparse.h 2019-10-25 16:04:20 +03:00
Anusha Godavarthy Surya 03623cc3f1 Merge branch 'master' into tex_unbind_issue_fix 2019-10-25 15:54:25 +05:30
amd-lthakur 4239c94fe5 Excluded the test case for nvcc platform 2019-10-25 15:52:11 +05:30
Anusha Godavarthy Surya 5f47e99ffe merge from master 2019-10-25 15:52:09 +05:30
Rahul Garg 12e1a86ec1 [dtest] Fix hipMemset2D test (#1579)
Reverts changes made in #1399. This is a RT api test. For testing hipMemAllocPitch , a new test should be written and that should use correct memset API.
2019-10-25 15:44:05 +05:30
Anusha Godavarthy Surya 259d8b4cdf Merge branch 'master' into tex_unbind_issue_fix 2019-10-25 15:36:55 +05:30
amd-lthakur 564418c308 Refactored the file as suggested 2019-10-25 10:44:38 +05:30
amd-lthakur 318df5c36b Update matmul.cpp 2019-10-25 09:22:07 +05:30
amd-lthakur cd25149225 Update hipExtModuleLaunchKernel.cpp 2019-10-25 09:19:49 +05:30
satyanveshd af351d7e1b Fix occupany APIs (#1560)
Addresses SWDEV-205006
2019-10-24 17:44:47 +05:30
amd-lthakur 8b496e4715 Adding a directed test case for hipExtModuleLaunchKernel() api. 2019-10-24 15:06:28 +05:30
Rahul Garg fe5f7d4245 Merge pull request #1559 from vsytch/win10_aligned_alloc
Fixes for hipMemcpy_simple on Windows
2019-10-23 13:10:59 -07:00
Evgeny Mankov b6e6f12b54 [HIPIFY] Disable delayed template parsing
By implicit unconditional passing -fno-delayed-template-parsing option (which appeared in LLVM 3.8.0, thus doesn't need compatibility wrapping) to hipify-clang.

[Reason] To parse uncalled template functions otherwise they are not parsed without calling, thus not hipified.

Affects cub_03.cu test, which has uncalled global template function.
2019-10-22 19:07:37 +03:00
Evgeny Mankov 6f88c81a78 [HIPIFY][#1569] Fix 2019-10-22 11:08:37 +03:00
Evgeny Mankov 39e7d213cf [HIPIFY][tests] Set max clang's CudaArch for corresponding CUDA major.minor version
[Reason] To support maximum CUDA features in offline tests

+ Add defined(__CUDA_ARCH__) && __CUDA_ARCH__ >= 600 restriction for atomicAdd on doubles in atomics.cu.
  So if LLVM < 7 and --cuda-gpu-arch doesn't work, __CUDA_ARCH__ is unset too (350 by default in clang);
  if LLVM >= 7 --cuda-gpu-arch is used and __CUDA_ARCH__ is set based on it.
2019-10-21 17:50:00 +03:00
Evgeny Mankov 14b4df126c [HIPIFY][tests] Set max clang's CudaArch for corresponding CUDA version
[Reason] To support maximum CUDA features in offline tests

+ Add CUDA_VERSION >= 800 restriction for atomics.cu

[TODO] Find a way to use or exclude atomicAdd for doubles if LLVM < 7, because
LLVM 6.0.1 and older do not use --cuda-gpu-arch in clang's Driver code at all (option is only declared)
2019-10-21 15:51:25 +03:00
Evgeny Mankov 6cfea9b600 [HIPIFY][tests] Set -I for CUDA path instead of --cuda-path for LLVM < 4 2019-10-20 20:08:56 +03:00
Evgeny Mankov ccb075b1db [HIPIFY][tests] Exclude all CUB tests if CUDA_CUB_ROOT_DIR is not set 2019-10-20 20:03:18 +03:00
Vladislav Sytchenko 664b115c44 Remove extra #endif. 2019-10-18 16:40:29 -04:00
Evgeny Mankov 82adc93e69 [HIPIFY][tests] Test clean-up 2019-10-18 18:55:52 +03:00
Evgeny Mankov 98874c0e7f [HIPIFY][CUB][#1460] Add "using namespace cub" translation support
+ Add cub_03.cu
2019-10-18 18:51:40 +03:00
Vladislav Sytchenko 8f0a226660 _aligned_malloc() on Windows first takes size, then alignment, which is the opposite of how the similar function behaves on Linux. Memory allocated by it also has to be freed using _aligned_free(), unlike Linux where we can use regular free().
Edit aligned_alloc() macro and add a aligned_free() one to align with the above behaviour.
2019-10-17 18:58:32 -04:00
Rahul Garg e1aac060da Merge pull request #1544 from vsytch/master
QoL changes to the hipMemset family
2019-10-16 18:54:20 -07:00
Evgeny Mankov edfd05a86d [HIPIFY][CUB][#1460] Add cub:: namespace support in TemplateInstantiation of cudaLaunchKernel
+ Update cub_02.cu test accordingly
2019-10-16 19:02:13 +03:00
Vladislav Sytchenko c747b77ac1 hipMemset2D and hipMemset3D tests should be passing by default. 2019-10-16 11:02:38 -04:00
Evgeny Mankov 6960574850 [HIPIFY][CUB][#1460] Implement cubFunctionTemplateDecl matcher
+ Add cub_02.cu test
+ Partial fixes #1460
2019-10-16 13:08:11 +03:00
vsytch 2fb734ef5f Update hipMathFunctions, hipTestHalf and hipTestNativeHalf tests to support Navi10 and Navi14. (#1545) 2019-10-16 10:51:48 +05:30
Vladislav Sytchenko f5af263aba In the hipMemset2D and hipMemset3D tests synchronize with the default stream after performing an async memset. 2019-10-15 17:15:49 -04:00
Vladislav Sytchenko 346bfa90d6 Update indentation in the hipMemset3D test. Replace all tabs with four spaces. 2019-10-15 15:29:14 -04:00
Vladislav Sytchenko 00425bdf3d Add async subtest to hipMemSet3D 2019-10-15 14:24:04 -04:00
Vladislav Sytchenko 3db2ecc52b hipMemset2D test should pass only if both async and sync subtests pass. 2019-10-15 14:20:14 -04:00
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
Anusha Godavarthy Surya d5b1e887e9 Added unbind texture to samples and tests 2019-10-15 11:34:15 +05:30
Evgeny Mankov 92fb5a3a94 [HIPIFY][CUB] Add missing unit test 2019-10-14 12:03:20 +03:00