Maneesh Gupta
46ddefedee
Apply .clangformat to all repo source files
...
Change-Id: I7e79c6058f0303f9a98911e3b7dd2e8596079344
[ROCm/clr commit: 9e47fccc89 ]
2018-03-12 11:29:03 +05:30
Phaneendr-kumar Lanka
bab8090dfc
[nvccWarnings] Fix -Wno-deprecated-declarations in hip_anyall and hip_ballot
...
[ROCm/clr commit: f69762b300 ]
2017-12-20 12:05:21 +05:30
Phaneendr-kumar Lanka
033e2cde33
[nvccWarnings] Fix warnings seen with dtests on nvcc path
...
[ROCm/clr commit: 0ac125e3db ]
2017-12-14 14:10:37 +05:30
Ben Sander
c9f031bc72
Temporarily disable a couple tests pending some HCC work
...
[ROCm/clr commit: 721d862089 ]
2017-12-01 21:46:28 +00:00
Alex Voicu
a27fa25d76
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 1cd6416
[ROCm/clr commit: 4966518846 ]
2017-11-29 21:49:10 +00:00
Alex Voicu
a1d5f0ab0c
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
[ROCm/clr commit: 2557000b56 ]
2017-11-29 21:36:29 +00:00
Alex Voicu
f9b177c0b3
Modify the set component of the memcpy test (unclear why there is a memset component to begin with).
...
[ROCm/clr commit: 0755f1fc26 ]
2017-11-21 17:52:01 +00:00
Alex Voicu
9cf73ef515
Re-sync with upstream.
...
[ROCm/clr commit: 30d90dab38 ]
2017-11-20 15:34:50 +00:00
Maneesh Gupta
02cbb93ec1
Merge pull request #266 from gargrahul/fix_half2_gfx900
...
Fixed half2 issue on gfx900
[ROCm/clr commit: 4477d3d314 ]
2017-11-20 07:28:41 +05:30
Alex Voicu
af0ae5421c
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.
...
[ROCm/clr commit: 0cc921f103 ]
2017-11-19 01:54:12 +00:00
Rahul Garg
b0461a2176
Fixed test case for GFX900
...
[ROCm/clr commit: cfc9f87465 ]
2017-11-16 09:34:52 +05:30
Rahul Garg
c3ba309562
Fixed half2 issue on gfx900
...
[ROCm/clr commit: 20947f80fb ]
2017-11-15 18:52:59 +05:30
Alex Voicu
41045dd24d
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.
[ROCm/clr commit: 58a18eaf0c ]
2017-11-01 22:51:22 +00:00
Alex Voicu
b738633bcb
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.
...
[ROCm/clr commit: 28f87f7d2e ]
2017-11-01 15:09:59 +00:00
Maneesh Gupta
bf29705489
[dtests] Fix hip_threadfence_system test's BUILD command
...
Change-Id: I037c523369e4bddd7a386ffe117fe97a178900fd
[ROCm/clr commit: 88ff8d9da4 ]
2017-08-11 14:49:17 +05:30
Siu Chi Chan
a69503394d
add C++11 compilation flags and minor bug fixes
...
[ROCm/clr commit: 8c2cda8f9e ]
2017-08-10 17:58:36 +00:00
Maneesh Gupta
a8dc5dc11b
[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
[ROCm/clr commit: 0d537f9966 ]
2017-08-10 12:05:58 +05:30
Siu Chi Chan
6598eabd24
implement __threadfence_system
...
[ROCm/clr commit: b6e22b5c93 ]
2017-08-02 08:50:18 +00:00
Maneesh Gupta
f29245a846
Renable frexp(f) device math function
...
Change-Id: I53c022b8ddf38cd17ddb42eba457b9020db66395
[ROCm/clr commit: 1bd1c6bea8 ]
2017-07-20 14:41:30 +05:30
Rahul Garg
f3b112716e
Enable memcpytosymbol family functions test
...
[ROCm/clr commit: f2d6da3e34 ]
2017-07-18 12:37:37 +05:30
Wen-Heng (Jack) Chung
4ce97c30e9
Remove explicit address spaces declarations
...
[ROCm/clr commit: 0237aeab06 ]
2017-07-07 12:46:29 -05:00
Maneesh Gupta
949fbad6e2
hipDeviceMemcpy test: make it functional on nvcc path
...
Change-Id: Id10c79b48747ed701adbd0a233c53cd60cfa743b
[ROCm/clr commit: a50f5ca0ac ]
2017-06-07 15:24:44 +05:30
Maneesh Gupta
2985fa3814
Disable rcbrtf, scalblnf, scalbnf in single precision device test
...
Change-Id: I8a250a64a0cb05132d022a11d9766ced9cdf11a7
[ROCm/clr commit: 2145e94049 ]
2017-05-31 10:16:19 +05:30
Maneesh Gupta
13896d6fb9
Disable rcbrt, scalbln and scalbn double precision device test
...
Change-Id: I46bd895701c46d3592b553090cafba99e41a2e2d
[ROCm/clr commit: da19087ae2 ]
2017-05-31 10:15:41 +05:30
Aditya Atluri
d1c334df66
added __host__ for complex functions and corrected memset and memcpy test
...
Change-Id: I9ffefb7a0025aa111a54d20d2766982df15532e7
[ROCm/clr commit: 42739c37ef ]
2017-04-06 09:29:44 -05:00
Sun, Peng
06684daac1
fix hipVectorTypesDevice direct test with GGL enabled
...
Change-Id: I7a63b87348f08f094cd709e87397d9e0fc24e4c2
[ROCm/clr commit: 38c4331861 ]
2017-03-30 17:14:55 -05:00
Rahul Garg
a9a6b5e8a6
Update hipTestDeviceSymbol sample
...
Change-Id: If5ba99c60cd30c4491ca3a4856764224163d3ddf
[ROCm/clr commit: c33c58d687 ]
2017-03-24 10:39:11 +05:30
Ben Sander
572be5449d
Add USE_PROMOTE_FREE_HCC for smooth transition to new HCC caps.
...
ADDRESS_SPACE_1 defines
[ROCm/clr commit: f4256cb57c ]
2017-03-17 11:04:39 -05:00
Ben Sander
c81fb24611
Add simple device-side assert macro
...
Currently swallows asserts but will compile.
[ROCm/clr commit: c9f64bbd2d ]
2017-03-17 10:25:56 -05:00
Maneesh Gupta
da5548303e
Disable broken tests on hcc path
...
Change-Id: Id6234da576566faa32d5fdf42dca6d6267596823
[ROCm/clr commit: 8536af7b71 ]
2017-03-15 12:03:44 +05:30
Wen-Heng (Jack) Chung
54f40acc7a
Revert "Changes to HIP to cope with Promote-free HCC"
...
This reverts commit 9591c5a447 .
Change-Id: I20a9bab3883ad09913b320210344d37599cb8fcd
[ROCm/clr commit: 17af837120 ]
2017-03-14 22:59:27 +08:00
Wen-Heng (Jack) Chung
9591c5a447
Changes to HIP to cope with Promote-free HCC
...
Squashed commit of the following:
commit c111b5bd10d7c2a5b0b1ad8b07f6e81185b47b39
Author: Wen-Heng (Jack) Chung <whchung@gmail.com >
Date: Sat Mar 4 17:06:46 2017 +0800
Use __device__ for all variables and functions to be used in kernel path
Abolish __device and adopt [[hc]] in HIP implementation, so __device__ can be
used on all HIP applications, no matter they are variables or functions.
Change-Id: I20ca25857ce3bc3e42a5ebf65cafea2c8492f4c7
commit 30c0e4e4701bbf6bd9a7182e0320a71ff73d3a83
Author: Wen-Heng (Jack) Chung <whchung@gmail.com >
Date: Thu Mar 2 12:14:11 2017 +0800
XXX FIXME get around LDS spills caused in Promote-free HCC
hipDynamicShared2 uses all 64KB of LDS for computation. But in Promote-free HCC
there are cases where LDS spills would occur, which would make the test case to
hang.
In this workaround commit we reduce the size of dynamic LDS used to get around
this known issue, and will revert this commit when LDS spills are resolved in
HCC.
Change-Id: If648b36200a4f9143951a8129192bcb7ed0bef5e
commit e803173be2d73e2f132a7ff7f61e7a20b4083d34
Author: Wen-Heng (Jack) Chung <whchung@gmail.com >
Date: Wed Mar 1 21:41:41 2017 +0800
Fix math functions which take pointer arguments
Change-Id: I332c997e640edbc44824691e2a9434c6b3dadefa
commit de590c469e213c42090ff83dbd060f25bb1d6047
Author: Wen-Heng (Jack) Chung <whchung@gmail.com >
Date: Wed Mar 1 18:38:54 2017 +0800
Changes to cope with Promote-free HCC
- abolish usage of address_space GNU attribute
- use __device in file-scope global variables which would be accessed by GPU kernels
- temporarily disable some math functions which take pointer arguments
Change-Id: I730311dee848e20e763e35cd3980317fce0dce0d
Change-Id: I1f6b970b53b9401eeaaab08f04a7b9fed0fb8cf0
[ROCm/clr commit: 0005dd5f66 ]
2017-03-08 01:32:59 +08:00
Maneesh Gupta
66e9900325
Disable some tests which are broken on nvcc path
...
Change-Id: I6f8df7687ff1798dc17f6c9b8a7f4cd029ce45d8
[ROCm/clr commit: 578dc68b0a ]
2017-02-27 13:19:06 +05:30
Aditya Atluri
78f1d54ad6
Added initial support for hipMemcpyFromSymbol. But not working!
...
Change-Id: I48d8c7de4ec9f85c6c942be995fb488a3931f5d7
[ROCm/clr commit: 7ac5017cb9 ]
2017-02-23 11:29:06 -06:00
Aditya Atluri
945526cf77
added runtime api hipMemcpyFromSymbolAsync
...
Change-Id: Ibaf925faf0ba464dd0ed6c5ea74c224c2ce38889
[ROCm/clr commit: 3d348b2d81 ]
2017-02-22 19:16:35 -06:00
Aditya Atluri
94f0fdfc5b
Enable symbol tests
...
Change-Id: I6bd036bf00c8051c8ff728ee60562c4ebd222160
[ROCm/clr commit: 2e3f3c7d26 ]
2017-02-22 13:42:03 -06:00
scchan
5b1cb0b1c6
calls isfinite,isinf,isnan from the std namespace on the host
...
Change-Id: Ica2370075b89713eecfd96102e2f4e0ab9961ce4
[ROCm/clr commit: a6ac4e7097 ]
2017-02-14 11:52:09 -05:00
Maneesh Gupta
90a03f8684
Disable failing directed tests
...
- hipTestDeviceSymbol
- hipTestConstant
- hipTestMallocKernel
Change-Id: Ibfe9fc0b8a59882f1de64b42e18777a7bd56ee97
[ROCm/clr commit: 6659eb8d16 ]
2017-02-09 14:48:22 +05:30
Aditya Atluri
ba45e02007
added architecture specific macros
...
1. Added __HIP_ARCH_GFXNUM__
2. Usage, -D__HIP_ARCH_GFX803__=1
Change-Id: I68b3a85d62cfab3a45d2b7a70cb3518ab2565236
[ROCm/clr commit: c6c90f6f5a ]
2017-02-08 19:45:32 -06:00
Aditya Atluri
76a58521f5
fixed hipcc for new compiler flags
...
Change-Id: I49ec059be20ff26b7482c84d91ab7a43826c6a8d
[ROCm/clr commit: 400d0d4f78 ]
2017-02-08 14:06:01 -06:00
Aditya Atluri
248b42d3e3
include arch specific ir on fallback path
...
Change-Id: Ib04996aae2c21eb73ef2a9f6305915e0caccd704
[ROCm/clr commit: 26b5e57cfd ]
2017-02-08 12:19:06 -06:00
Aditya Atluri
3937b398e9
changed __global__ attribute
...
1. Moved around tests and added them to HIT
Change-Id: I5d75280c42a5af852670ebabc7305ee56721ec7b
[ROCm/clr commit: f009f3533d ]
2017-02-03 10:53:36 -06:00
Aditya Atluri
f36992067b
fixed symbol memcpy issue
...
Change-Id: I89d7401be51d194bcbf771020ba66e3d3b6a18f8
[ROCm/clr commit: 0d4e6ae60a ]
2017-02-01 17:54:59 -06:00
Aditya Atluri
4085e01263
removed host math functions from math_functions.h
...
Change-Id: I90d8784e2d6b58c6fade9f0fa12c0db3ee417d3e
[ROCm/clr commit: a5d017e406 ]
2017-01-27 17:38:43 -06:00
Aditya Atluri
324409b2bb
changed device code tests to work not to work as one
...
Change-Id: I0eec1eab19dda3b703bc3a0d778a6bbb2802a412
[ROCm/clr commit: eee520def9 ]
2017-01-27 09:20:14 -06:00
Aditya Atluri
f6d09573aa
added more test coverage for vector data types
...
Change-Id: I9f57a8b597bd2ee4b265eadfd0859531497a6ada
[ROCm/clr commit: fd2e6ac2f0 ]
2017-01-20 13:52:02 -06:00
Aditya Atluri
b6f4fedaaf
fixed compilation issues for vector types and math functions
...
1. Added math_functions.h to hip_runtime.h
2. Changed operator overloading classifier static to static inline
3. Added vector types test for gpu
4. Seperated __host__ and __device__ for math functions in headers
Change-Id: I499862fad5d7b10da686da9011d7ecefe523f8e2
[ROCm/clr commit: 02190736e3 ]
2017-01-20 09:49:11 -06:00
Aditya Atluri
69903887a4
fixed compilation issues
...
1. Fixed compilation issues for tests
2. Added missing intrinsics + math functions
3. Disabled some device functions as they are causing linking error with HCC
Change-Id: I79d52c4c7a539cc8ef40580247ad97ffcb975f09
[ROCm/clr commit: 41a46effef ]
2017-01-18 11:53:47 -06:00
Aditya Atluri
42c627fbe8
Moved device code to mimic cuda header behavior
...
1. All fp32, fp64 math device/host functions should be in math_functions.h/.cpp
2. All fp32, fp64 fast math intrinsics for device/host functions should be in device_functions.h/.cpp
3. All the device code implementations should be in device_util.h/.cpp
4. Hence, made changes appropriately by moving code and creating new header files
5. Added math_functions.cpp/.h
6. Changed #ifndef signature to make sure no conflicts between headers with same names in hip/hip_runtime.h and hip/hcc_detail/hip_runtime.h
7. Changed tests to fit the code changes, making them to include appropriate headers
8. Added math_functions.cpp to CMakeLists.txt
9. Some of the tests are still broken, mostly host math functions will fix them in next commit
10. TODO: FIX compilation issues for host math functions
Change-Id: I7a17637d7e294a7d224ffba932c1a08668febd26
[ROCm/clr commit: d23b6b8694 ]
2017-01-17 14:57:51 -06:00
Aditya Atluri
968f2e9489
enabled integer intrinsics tests
...
Change-Id: I5d28d556f228240eda2fc0098121ed3b29b041e7
[ROCm/clr commit: 3f9a9d9318 ]
2017-01-17 09:59:08 -06:00