Commit Graph

163 Commits

Author SHA1 Message Date
Yaxun (Sam) Liu a8dc1257df Support std::complex for hip-clang 2018-07-18 00:08:04 -04:00
Alex Voicu 7020d118da And a few more oversights. 2018-07-17 19:33:13 +01:00
Alex Voicu 31efcc17d7 Constrain variadic constructor to ranks > 1 and add missing __device__s 2018-07-17 17:18:45 +01:00
Maneesh Gupta 9e142ea66a Merge branch 'master' into feature_native_vector_types
Change-Id: I943b94ee230871a960d8f9c321ad5e096183b415
2018-07-17 09:51:22 +05:30
Maneesh Gupta 7d8c1ae761 Merge pull request #515 from ROCm-Developer-Tools/hipclang-add-amdgcn-funcs
Add hipclang amdgcn functions
2018-07-17 09:25:09 +05:30
Alex Voicu a2b6508912 Merge branch 'master' of https://github.com/ROCm-Developer-Tools/HIP into feature_native_vector_types 2018-07-15 11:44:48 +01:00
Aaron Enye Shi 757eeccdc7 Fix hip_mbcnt test typo
Ctest did not catch this test failure. When running this test manually before typo, I got __mbcnt_hi() FAILED! . This fix will fix this test for HCC and HIP clang path.
2018-07-06 11:26:48 -04:00
Aaron Enye Shi d39508b4fd Implement hip_ldg Functions into HIP header
Move all the function definitions for hip_ldg.cpp into hip_ldg.h header and enable for HIP clang path.
2018-07-05 20:38:46 +00:00
Alex Voicu f931980a6a Add scalar operands and fix C implementation. 2018-06-29 05:23:49 +01:00
Alex Voicu 3ff1d4081e Let's try this again... 2018-06-25 17:49:50 +01:00
Alex Voicu 0e0d43bfe1 Merge branch 'master' of https://github.com/ROCm-Developer-Tools/HIP into feature_native_vector_types 2018-06-22 12:19:32 +01:00
Maneesh Gupta d27991e1c8 Merge pull request #490 from ROCm-Developer-Tools/feature_decouple_atomics_from_hc
Switch the atomic implementation to use Clang  builtins.
2018-06-20 14:16:43 +05:30
Alex Voicu fa370fcf19 Revert "Revert "Switch over to using native vector types, for better codegen. Remove noise.""
This reverts commit d137271083.
2018-06-16 22:59:36 +01:00
Siu Chi Chan d137271083 Revert "Switch over to using native vector types, for better codegen. Remove noise." 2018-06-08 16:48:22 -04:00
Alex Voicu 513ba4eb8a Switch the atomic implementation to use Clang builtins. 2018-06-02 12:27:17 +01:00
Alex Voicu f2d7f112ab Re-sync with upstream. 2018-06-01 15:49:05 +01:00
Maneesh Gupta 3fec282097 Merge pull request #447 from ROCm-Developer-Tools/feature_native_vector_types
Switch over to using native vector types, for better codegen. Remove noise.
2018-06-01 13:58:07 +05:30
Alex Voicu e03ca1a72e Re-sync with upstream. Add integer abs. 2018-05-31 16:38:00 +01:00
Alex Voicu 208f5a41c6 Add missing interop with volatile. Fix unit tests. 2018-05-31 15:27:12 +01:00
Alex Voicu 14e6a04387 Switch to using ROCDL directly, as opposed to via HC. Add missing bits. 2018-05-31 03:17:26 +01:00
Alex Voicu 40dad93426 Move converting constructor from _Float16 under macro guard. Refactor. 2018-05-25 19:46:41 +01:00
Alex Voicu 59a046dd2d Update hipTestHalf to actually test behaviour. Add missing hipHostfree. 2018-05-24 13:55:30 +01:00
Alex Voicu ecefdd6541 Missing commit. 2018-05-23 17:57:47 +01:00
Maneesh Gupta 92d8e05aa0 Disable incomplete unit tests that don't work on nvcc path
Change-Id: If5823ec96a3b2497a08c46ab802c5a0158271053
2018-05-21 11:35:03 +05:30
Maneesh Gupta 3638bb5b1c Merge pull request #444 from aaronenyeshi/vg20-initial
initial gfx906 support
2018-05-18 13:18:07 +05:30
Alex Voicu fcce9f5337 Switch over to using native vector types, for better codegen. Remove noise. 2018-05-12 00:14:17 +01:00
Aaron Enye Shi 4488f9f7a7 Fix hipMathFunction for gfx906 2018-05-11 10:53:07 -04:00
Siu Chi Chan 368affcea4 initial gfx906 support 2018-05-10 19:28:00 +00:00
Siu Chi Chan 4f12ddea8f add intrinsics mbcnt_lo, mbcnt_hi, lane_id 2018-05-08 13:43:53 -04:00
Deven Desai 30f0c19cf1 Fixing a copy/paste error in my previous checkin 2018-04-27 12:59:51 +00:00
Deven Desai 76e808304c Checkin to add unit tests for fixes in my previous commit
This change adds unit tests for

1. __hisinf
2. __hisnan
2. abs(long long)
3. lgamma(double)
2018-04-25 17:53:21 +00:00
Maneesh Gupta 9e47fccc89 Apply .clangformat to all repo source files
Change-Id: I7e79c6058f0303f9a98911e3b7dd2e8596079344
2018-03-12 11:29:03 +05:30
Phaneendr-kumar Lanka f69762b300 [nvccWarnings] Fix -Wno-deprecated-declarations in hip_anyall and hip_ballot 2017-12-20 12:05:21 +05:30
Phaneendr-kumar Lanka 0ac125e3db [nvccWarnings] Fix warnings seen with dtests on nvcc path 2017-12-14 14:10:37 +05:30
Ben Sander 721d862089 Temporarily disable a couple tests pending some HCC work 2017-12-01 21:46:28 +00:00
Alex Voicu 4966518846 Revert "Revert adoption of CUDA indexing in general - this can only work with later versions of the compiler, just like module based dispatch, and thus must be guarded against usage in earlier (e.g. 1.6) versions."
This reverts commit 4792475
2017-11-29 21:49:10 +00:00
Alex Voicu 2557000b56 Revert "Revert adoption of CUDA indexing in general - this can only work with later versions of the compiler, just like module based dispatch, and thus must be guarded against usage in earlier (e.g. 1.6) versions."
This reverts commit d2fd1f5
2017-11-29 21:36:29 +00:00
Alex Voicu 0755f1fc26 Modify the set component of the memcpy test (unclear why there is a memset component to begin with). 2017-11-21 17:52:01 +00:00
Alex Voicu 30d90dab38 Re-sync with upstream. 2017-11-20 15:34:50 +00:00
Maneesh Gupta 4477d3d314 Merge pull request #266 from gargrahul/fix_half2_gfx900
Fixed half2 issue on gfx900
2017-11-20 07:28:41 +05:30
Alex Voicu 0cc921f103 This implements the trivial change needed to move back from the hip{Something}_{x, y, z} macros to the natural CUDA syntax of Something.{x, y, z}. This is contained in lines 384-404 in hip_runtime.h. All of the other changes have to do with changing unit tests to use this syntax. The macros are retained for backwards compatibility. 2017-11-19 01:54:12 +00:00
Rahul Garg cfc9f87465 Fixed test case for GFX900 2017-11-16 09:34:52 +05:30
Rahul Garg 20947f80fb Fixed half2 issue on gfx900 2017-11-15 18:52:59 +05:30
Alex Voicu 58a18eaf0c This corrects some interesting choices that were present in the HIP
unit tests such as e.g. de-allocating memory allocated with new[] using
free. All of these were identified via cppcheck.
2017-11-01 22:51:22 +00:00
Alex Voicu 28f87f7d2e This switches HIP from its currently convoluted macro + pfe based dispatch mechanism to a more natural one partially based on the existing module API. The basic idea is that HCC will always correctly emit __global__ functions: as empty-bodied stubs, on host, and as kernels, on device. It then becomes trivial to obtain the mangled name on host, at dispatch, from the function's address, and then to use the mangled name to retrieve the kernel. This should address all problems stemming from serialisation, dubious mismatches due to the manufactured functor, macro-isms et al. It also immediately enables support for generalised globals as a consequence of that being available in the module API. Finally, it will make debug much easier, since the actual names of the __global__ functions will automatically be used in traces etc. One detail is that due to how dispatch works now (hipLaunchKernel and hipLaunchKernelGGL are themselves variadic function templates which deduce the function type of the callee), in certain cases it may be necesssary to insert explicit casts to ensure that the variadic argument list selects a viable overload - this can be observed in some unit tests. Eventually we may be able to remove this limitation, but for now it does not appear terribly onerous. The code is not extremely HIPpie, nor is it fully optimised, but rather is intended as a starting point for the HIP team to make its own. 2017-11-01 15:09:59 +00:00
Maneesh Gupta 88ff8d9da4 [dtests] Fix hip_threadfence_system test's BUILD command
Change-Id: I037c523369e4bddd7a386ffe117fe97a178900fd
2017-08-11 14:49:17 +05:30
Siu Chi Chan 8c2cda8f9e add C++11 compilation flags and minor bug fixes 2017-08-10 17:58:36 +00:00
Maneesh Gupta 0d537f9966 [dtests] Disable hip_threadfence_system.tst on nvcc
The test needs some more modifications before it is ready for building
on nvcc path. Disabling it for now so that the pull request can be
merged.

Change-Id: I19a894fcda7b2159f86a4e4e95a409c5655d3760
2017-08-10 12:05:58 +05:30
Siu Chi Chan b6e22b5c93 implement __threadfence_system 2017-08-02 08:50:18 +00:00
Maneesh Gupta 1bd1c6bea8 Renable frexp(f) device math function
Change-Id: I53c022b8ddf38cd17ddb42eba457b9020db66395
2017-07-20 14:41:30 +05:30