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
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
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
1. Added fast math intrinsics for single precision data types
2. Added test to check the intrinsics
3. Added HIP_PRECISE_MATH macro to enable precise math on fast math
Change-Id: Iadacbb6182c31252c5e3252854372d1b80dfd27b
1. Added fast math apis for sin, cos, tan, sincos
2. Added test for trig math functions
3. Added logarithm fast math
4. Changed how hipGetDevice, hipDeviceGetCacheConfig emit errors
Change-Id: Ie6ab594ddd5853cbe85e39a2f6d3479a807fa323
- Complete translation tables for cudaError <-> hipError_t.
- Remove some odd errors that were not correctly translated or not used.
- Add HIPCHECK_API to test infrastructure. Used for negative testing
an API ; if a mismatch occurs it shows the expected return error
code. Can also print a warning rather than error.
- Enable hipMemoryAllocate on NV system, and review error coded.
- Add hipErrorName to nvcc.
Change-Id: I680427dcf32a5796d5913cf9e7f3b4c6f6b91599
Conflicts:
tests/src/CMakeLists.txt
Bug fixes and improved docs for hipFree and hipHostFree.
- Passing NULL pointer initialized runtime and return hipSuccess
(not an error like before).
- add negative test for this. (hipMemoryAllocate, improved)
- Match NVCC errors for invalid pointers, add to test.
- Update hipFree and hipHostFree docs.
- hipGetDevicePointer always set *devicePointer=NULL, even for
invalid flags.
- Gate shared memory usage on specific HCC work-week.
Change-Id: I533b4fd3280a3d6cdbf05eb768976f0c7506c012
1. Added copyright for device float test
2. Added device double functions support
3. Added device double functions test
4. Corrected device function signatures in headers
Change-Id: I13c8829682c925992f5cad84062bc9f702fe4048