Commit Graph

68 Commits

Author SHA1 Message Date
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
Aditya Atluri b864271e2c fixed broken tests and device code for integer intrinsics
1. Fixed build issues with new Integer intrinsics
2. Changed tests to work exactly as CUDA code
3. Still some integer intrinsics need to be supported

Change-Id: Ie6f4171259cf4da517436895d4f6f01e01f59b11


[ROCm/clr commit: f0ea51c786]
2017-01-17 09:00:09 -06:00
Aditya Atluri d9845446ef Added type conversion intrinsics
1. Added all type conversion intrinsics
2. NO TESTS have been added. (Will add in next commit)
3. Sanatized code in hip_runtime.h
4. Added passed() to hipTestHalf to make it pass on HIT

Change-Id: I0987963c802fc7ff4d7e07d7b88d86da35da53c9


[ROCm/clr commit: d496576b55]
2017-01-16 12:10:05 -06:00
Aditya Atluri d71fc0e60a added half2 log, log10, exp, exp10 math functions
1. Enabled tests for log, log10, exp, exp10 half2
2. h2rint is still disabled.

Change-Id: I01f6002f6992259919893c524c526db5ee09473a


[ROCm/clr commit: 5c5f5c1ad1]
2017-01-13 13:26:10 -06:00
Aditya Atluri 4756cf7c16 added half2 math operations
1. They use SDWA + LLVM IR
2. Added these functions to test
3. Need to do exp, exp10, log, log10, rint

Change-Id: I06176acc6cb8bb054495310531777406a41b54e4


[ROCm/clr commit: eff68c989a]
2017-01-13 12:27:11 -06:00
Aditya Atluri b2973b97e2 added math functions for half
1. Added math functions for half precision
2. HRCP is not available due to device code linking errors, will be enabled once it is fixed
3. Added math functions to half test file

Change-Id: Ie317ce70ef518a4fc3f27142143d01e0327f5df3


[ROCm/clr commit: fe38e9652b]
2017-01-13 12:05:29 -06:00
Aditya Atluri d3fe56550e added half2 cmp and conv, data movement device functions
1. Added half2 comparision functions
2. Added conversion and data movement half apis

Change-Id: Ia33c0e957d9deb1f2b7a8fde8e22168f4d41b88b


[ROCm/clr commit: 646f566bbf]
2017-01-13 10:56:07 -06:00
Aditya Atluri a52591d117 added comparision device functions for fp16
1. Added comparision device functions
2. Added test to check correct isa getting generated

Change-Id: I16732f5a1438bdce145f7bfcecd28198e3cc4b79


[ROCm/clr commit: 89998d436f]
2017-01-12 14:52:14 -06:00
Aditya Atluri d1f7c4e048 added packed math fp16 native device functions
1. Added SDWA implementation inside IR file
2. Added device functions to header + used them in test

Change-Id: Ib4e059a58eee201cc82438689e3e9bc5f9d26653


[ROCm/clr commit: eeef055469]
2017-01-12 14:10:51 -06:00
Aditya Atluri 5317ffa9ec Started adding native half math library support
1. Removed HIP_EXPERIMENTAL env variable so that device code will be accessed from LLVM IR
2. Removed soft support from headers and moved to hip_fp16.cpp
3. Added LLVM IR + inline asm to hip_ir.ll
4. Added test for fp16
5. Added barriers for hcc 3.5 and hcc 4.0 for half support
a. Which means, hcc 4.0 can parse __fp16 but hcc 3.5 cant
b. HCC 4.0 code is implemented now, hcc 3.5 will be added later

Change-Id: Ic37859b2688ebb02e168bab643d1882bf4727952


[ROCm/clr commit: c286bf6f8a]
2017-01-12 11:30:20 -06:00
Aditya Atluri e4189cab53 added test for vector data types
Change-Id: I0b6624886e474601cb1ef003c5f10adf399a21c9


[ROCm/clr commit: 1d8700096c]
2017-01-11 18:02:30 -06:00
Aditya Atluri fe2d13c861 Added proper device data types
Change-Id: I42029635ff68c3c13a764a3eda6447e6c77878c6


[ROCm/clr commit: 4e57822d95]
2017-01-11 15:06:25 -06:00
Aditya Atluri 62e0623d18 added support for rcp for float and double
Change-Id: Ibeba3a9f64494fc0a176bcb4a854fb2f56567b55


[ROCm/clr commit: de89b25d52]
2016-11-23 20:01:18 -06:00
Aditya Atluri 11018fa0f6 added fma for double and float
1. Added fma intrinsic support for double and float
2. Added test for fma

Change-Id: I909fdbec34a3d12c03ba6eff3a39376a7128ee43


[ROCm/clr commit: cc1f8a1011]
2016-11-23 18:22:05 -06:00
Aditya Atluri a2ecbc2d6e Added fast math flag
1. Use -DHIP_FAST_MATH to make precise math functions compiled to fast math
2. Added double fast math functions for sqrt
3. Changed hipcc to parse -use_fast_math (not working)
4. Added passed tag to hipFloatMath test

Change-Id: I72884b2436b4efe61e9a9297346c1358fee38a2d


[ROCm/clr commit: c2f6ecf264]
2016-11-23 11:19:15 -06:00