Графік комітів

12 Коміти

Автор SHA1 Повідомлення Дата
Alex Voicu c2a5825c3c This actually (tries) to do the right thing all the way, by using memcpy for bitcasting, and not rely on undefined behaviour of a different flavour as a substitute for the original undefined behaviour. Note that the compiler will (should) optimise down to the same emitted code, since this is a pattern it understands.
[ROCm/hip commit: a6ccaf3d57]
2017-11-28 17:23:06 +00:00
Alex Voicu 23cc46786a This fixes some outright quaint choices made when implementing HIP's bitwise conversion functions, by using simple reinterpret_casts, as is idiomatic. These functions are supposed to be re-entrant, correct and efficient. Sadly, they were neither: they hid a massive race condition against a value stored in global memory, which means that they were also unreasonably slow if they ever managed to be correct, and relied on union based type punning which is in a grey area of the standard. It is difficult to ascertain what may have been the reason for coming up with this quirky solution.
[ROCm/hip commit: a401ce6e5d]
2017-11-28 17:23:06 +00:00
Aditya Atluri f76e9f4640 fixed float2int functions
Change-Id: I67be79149f06daacf0f0d131bdedabf294126248


[ROCm/hip commit: d1e28df226]
2017-06-16 09:07:06 -05:00
Ben Sander 8d5c39fd52 Add __device__ to needful functions for promote-free.
[ROCm/hip commit: 29232ff283]
2017-03-17 11:19:48 -05:00
Wen-Heng (Jack) Chung 508ad44c7c Revert "Changes to HIP to cope with Promote-free HCC"
This reverts commit 9043ba55db.

Change-Id: I20a9bab3883ad09913b320210344d37599cb8fcd


[ROCm/hip commit: 77e21dc09f]
2017-03-14 22:59:27 +08:00
Wen-Heng (Jack) Chung 9043ba55db 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/hip commit: efb9b9e86c]
2017-03-08 01:32:59 +08:00
Aditya Atluri 77401c9b64 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/hip commit: b723169ee9]
2017-01-17 14:57:51 -06:00
Aditya Atluri ea01905cee enabled integer intrinsics tests
Change-Id: I5d28d556f228240eda2fc0098121ed3b29b041e7


[ROCm/hip commit: 13ce9ece77]
2017-01-17 09:59:08 -06:00
Aditya Atluri 72202cccbd v1: Working on Integer Intrinsics
1. Half way through
2. May not work
3. No test written

Change-Id: I705b743a78b142ff068e2521870e73fca7ad2b1c


[ROCm/hip commit: b09ad764a1]
2017-01-16 14:55:29 -06:00
Aditya Atluri 8e411f0beb 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/hip commit: 6f2cfddc67]
2017-01-16 12:10:05 -06:00
Aditya Atluri 5de29029cd changed copyright year from 2016 to 2017 in src directory
Change-Id: Idb97db509b2b4b1656b2df7a14a62ade38c9d574


[ROCm/hip commit: 73fcce26f9]
2017-01-11 18:05:41 -06:00
Aditya Atluri ada705544f added few type reinterpret cast device functions
1. __int_as_float
2. __hiloint2double

Change-Id: Id247c196887b24a12090f0521bf91e13afeec733


[ROCm/hip commit: 04ab5f7f56]
2016-12-13 14:41:36 -06:00