Gráfico de commits

18 Commits

Autor SHA1 Mensaje Fecha
949f45ac c819e2ee01 Provide correct __mul64hi and __umul64hi builtins, using code from ROCm-Device-Libs
[ROCm/clr commit: 9210263727]
2018-05-14 08:34:56 +02:00
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
Alex Voicu e85f49a57e Remove leftover agent allocated globals.
[ROCm/clr commit: 45a9f4f7b1]
2017-11-28 19:56:04 +00:00
Alex Voicu 579a3187da Merge remote-tracking branch 'origin/master' into feature_use_module_based_dispatch_instead_of_pfe
# Conflicts:
#	src/hip_module.cpp


[ROCm/clr commit: d37a5a6008]
2017-11-28 17:29:11 +00:00
Maneesh Gupta 621cc5e5ca Fix float2int rounding functions
Change-Id: I67943859a6344c5eec0eaa23418c9b802ef72468


[ROCm/clr commit: cc418da654]
2017-11-28 17:23:43 +00:00
Alex Voicu a59daf78d6 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/clr commit: bb35299560]
2017-11-28 17:23:06 +00:00
Alex Voicu 0de6e0be2b 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/clr commit: 4b7cb0624e]
2017-11-28 17:23:06 +00:00
Maneesh Gupta 05963822e7 Fix float2int rounding functions
Change-Id: I67943859a6344c5eec0eaa23418c9b802ef72468


[ROCm/clr commit: 822743845c]
2017-11-23 09:57:24 +05:30
Aditya Atluri 1634130267 fixed float2int functions
Change-Id: I67be79149f06daacf0f0d131bdedabf294126248


[ROCm/clr commit: f139d5a52f]
2017-06-16 09:07:06 -05:00
Ben Sander e0171505b4 Add __device__ to needful functions for promote-free.
[ROCm/clr commit: 92fd4c8f10]
2017-03-17 11:19:48 -05:00
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
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 d259da2e42 v1: Working on Integer Intrinsics
1. Half way through
2. May not work
3. No test written

Change-Id: I705b743a78b142ff068e2521870e73fca7ad2b1c


[ROCm/clr commit: feba9fe213]
2017-01-16 14:55:29 -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 a86633f210 changed copyright year from 2016 to 2017 in src directory
Change-Id: Idb97db509b2b4b1656b2df7a14a62ade38c9d574


[ROCm/clr commit: e9ff23e5f9]
2017-01-11 18:05:41 -06:00
Aditya Atluri 9691299b0d added few type reinterpret cast device functions
1. __int_as_float
2. __hiloint2double

Change-Id: Id247c196887b24a12090f0521bf91e13afeec733


[ROCm/clr commit: 7a712aa76b]
2016-12-13 14:41:36 -06:00