Wykres commitów

50 Commity

Autor SHA1 Wiadomość Data
Siu Chi Chan cc54bc4d85 fix atomicCAS:remove load for the return value after CAS
[ROCm/hip commit: 741eb844fe]
2017-05-31 15:20:19 -04:00
Siu Chi Chan ef1a8c2788 fix hip_fast_dsqrt* to call a double fp sqrt function
[ROCm/hip commit: 1dce01f9bb]
2017-05-25 23:15:30 -04:00
Aditya Atluri a565e85c08 fixed fast math expf and exp10f
Change-Id: I73963220f902efebb0a7404c5f8966dffb4c35ca


[ROCm/hip commit: ab2eb420e2]
2017-04-26 19:01:10 -05:00
Sun, Peng dd0aa2c9e3 Fix warpSize, for related issue in hipeigen and torch
Change-Id: Ic66b24923a363304dca189011869ba7a0a6f8895


[ROCm/hip commit: c82c84949c]
2017-04-01 15:42:53 -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
Ben Sander a9ec705ee4 Add USE_PROMOTE_FREE_HCC for smooth transition to new HCC caps.
ADDRESS_SPACE_1 defines


[ROCm/hip commit: e85c167171]
2017-03-17 11:04:39 -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
Ben Sander 0dd1393f97 Modify memcpy and memset to follow C/C++ standard:
- memcpy src is const
    - memset val is int


[ROCm/hip commit: d572e0616e]
2017-03-06 16:38:22 -06:00
Aditya Atluri 6d5992d445 changed __global__ attribute
1. Moved around tests and added them to HIT

Change-Id: I5d75280c42a5af852670ebabc7305ee56721ec7b


[ROCm/hip commit: 5e3d63c0a3]
2017-02-03 10:53:36 -06: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 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 4186194692 Added proper device data types
Change-Id: I42029635ff68c3c13a764a3eda6447e6c77878c6


[ROCm/hip commit: 39910029a6]
2017-01-11 15:06:25 -06:00
Ben Sander 5a3c11dd9a fix copyright
[ROCm/hip commit: 8ed38bae69]
2016-12-15 14:42:52 -06:00
pensun 6d2bf52f9f IPC prototyps and part of the implementation included
Change-Id: Id88c7f155d23ec63f57a6ef05098fba43f8af336


[ROCm/hip commit: 17b98d59b8]
2016-12-06 14:24:09 -06:00
Maneesh Gupta 55aa1d85d9 Remove redundant variable g_malloc_heap_size
Change-Id: Idaf47be70488f0deb3eab05a86d9c5a413d3fff7


[ROCm/hip commit: 6d5145eba4]
2016-12-06 10:19:03 +05:30
Maneesh Gupta 7a48767acc Don't share g_malloc_heap_size between libraries
Change-Id: Ic70bf83d4f865bc5c453941fdbc1814c77f0ad9d


[ROCm/hip commit: 1cf9332c3f]
2016-12-05 11:03:45 +05:30
Aditya Atluri 467d8d1aea added fast math intrinsics to HIP
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


[ROCm/hip commit: f843928ddd]
2016-11-22 15:26:00 -06:00
Aditya Atluri c8071e3d84 added fast math APIs
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


[ROCm/hip commit: 94d2115d6d]
2016-11-22 10:20:09 -06:00
Maneesh Gupta 2234b57513 Refactor for building HIP as dynamic library
Change-Id: I65a3d9d589c4fdbbdcf1611e5427224253be8260


[ROCm/hip commit: c0419cc749]
2016-11-18 14:33:20 +05:30
Maneesh Gupta dd60b971d1 src/*: Update copyright header
Change-Id: I455f5d0d12fe9cb39a3ba873bd22b4c25ed07cbf


[ROCm/hip commit: 8471682f26]
2016-10-15 22:55:22 +05:30
Maneesh Gupta 887ee3dbfe Remove incorrect executable-bit from non-executable files
Change-Id: Iacc434374721e01f7d75d0ab54bceabe0b337f54


[ROCm/hip commit: 6a14f39f8b]
2016-10-14 12:53:13 +05:30
Elias Konstantinidis 7d0d42712e Added support for __mul24 and __umul24
[ROCm/hip commit: 2bc541e15f]
2016-10-06 09:29:36 +05:30
Maneesh Gupta fc58842fcf Move include/* to include/hip/*
Change-Id: I7a7b2839b4df59c7a4c503550f99fdc9e45c0f54


[ROCm/hip commit: b951cc99ed]
2016-10-04 22:17:18 +05:30
Ben Sander 24917dd6e8 enable dynamic shared always
Change-Id: Idc246546f583a82489ef34d1fe22d0e118b1e0ed


[ROCm/hip commit: bbbcb4efad]
2016-09-02 09:46:59 -05:00
Maneesh Gupta cf21de7c18 Fix normcdf signature
Change-Id: I36b225cfe03db687f295aeea8a006d535bc14231


[ROCm/hip commit: 69f005f5b2]
2016-08-17 22:07:06 +05:30
7SK e0874ab540 NVCC_COMPAT
add support for both cuda compatible implementation and hcc(faster)
implementation with test

Change-Id: I79a22344f458391d7dffac5f147619a542e97e4e

[ROCm/hip commit: 8264d5d6bd]
2016-06-28 09:36:06 +05:30
Aditya Atluri 5df1a0d2c8 added tests for host math functions
Change-Id: I66a5c574a27190e32054586f07ecf20e1ff71292


[ROCm/hip commit: ae12867774]
2016-06-17 15:05:33 -05:00
Aditya Atluri c0301aa422 added bessel nth order function
Change-Id: I18a64d894dda9330b39638535dfafd7ce31bb968


[ROCm/hip commit: 2b0c2f494b]
2016-06-17 09:22:23 +05:30
Ben Sander 0268c1e4e6 NVCC improvements.
- 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


[ROCm/hip commit: 2ab19ca505]
2016-06-16 06:13:51 +05:30
Aditya Atluri 8e5334a376 added more host functions and tests
Change-Id: I9904e65e14c5479ba33d836c5c0b763cb5af71e3


[ROCm/hip commit: 7cb45e2d87]
2016-06-15 11:45:19 -05:00
Aditya Atluri a663880f73 added host device functions
Change-Id: I8f299752fb8dd8e8947da62e4ad88842c1c19f62


[ROCm/hip commit: e01e5d2fe3]
2016-06-14 18:14:44 -05:00
Aditya Atluri 2986956d41 added bessel zero and one order functions
Change-Id: I57039d54eae7207db00415bc7ba09bbf9cb6425a


[ROCm/hip commit: ec48e50101]
2016-06-14 11:50:48 +05:30
Aditya Atluri c11202460b added erfinv software implementation
Change-Id: Ib1a5584f6c81ab3afa70f7bcbfd7780e156454e3


[ROCm/hip commit: d7df02e310]
2016-06-14 00:09:41 -04:00
Aditya Atluri 37e5903a68 added more device functions
Change-Id: I191919060b393772ee442cc19d83479217c5a4ce


[ROCm/hip commit: 9ac6e422f0]
2016-06-13 11:55:12 -05:00
Aditya Atluri bc1e9a27bb added normcdf support
Change-Id: I4887bc588589ed067eaa339d5eccd988c1c5d649


[ROCm/hip commit: 798aa48032]
2016-06-13 10:09:37 +05:30
Aditya Atluri 3802673dac Added more device functions
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


[ROCm/hip commit: 25a273e4df]
2016-06-10 09:46:31 -05:00
Aditya Atluri aff1391fc2 added more float device functions
Change-Id: I106ce6de9ed8806b3699dcf0add9efc9e8583615


[ROCm/hip commit: c6dfb0d079]
2016-06-10 06:22:00 -04:00
Jack Chung 32276a63d3 Squashed commit of the following:
commit 9548493fa754b3bf5c31cbdc2211db1e73e8c07c
Author: Jack Chung <whchung@gmail.com>
Date:   Mon May 23 11:57:23 2016 +0800

    Rename hipExternShared test to hipDynamicShared

    Change-Id: I180d9d539420fb69cfc121eceaa7db9da03483b2

commit 827081f8244a38f010789d556db0c4ff7b6422d8
Author: Jack Chung <whchung@gmail.com>
Date:   Mon May 23 11:56:27 2016 +0800

    Rename HIP_DECLARE_EXTERN_SHARED to HIP_DYNAMIC_SHARED

    Change-Id: I22362d179812ac547e0f11ba4e2bb999050e08ae

commit 4c277228ed41af187739610fa17eab1fb144c947
Author: Jack Chung <whchung@gmail.com>
Date:   Thu May 19 17:49:52 2016 +0800

    Adopt new interface to get dynamic LDS in hc.hpp

    Change-Id: I47b433b714633a4c97df87c40a0b1d3386429a00

commit 5a36117d777064113a528dc47b42e8c8413baa97
Author: Jack Chung <whchung@gmail.com>
Date:   Thu May 19 11:29:24 2016 +0800

    Add test patterns for regular expression to match "extern __shared__"

    These test patterns should better be saved as an individual test case, but I'm
    not familiar with HIP test structures so I leave them as comments in hipify as
    of now.

    Change-Id: I7fee89c89b9e73de2133357a226ec0c769733531

commit 1b26284168c7f5339f63338fd0149bed5d994656
Author: Jack Chung <whchung@gmail.com>
Date:   Thu May 19 11:25:23 2016 +0800

    Add one HIP unit test to use HIP_DECLARE_EXTERN_SHARED

    Change-Id: I4d9907815920693a74ea9d575fe26e7c67636109

commit 77b816ee5972b13d829d5bbcf06fbfd07acea2af
Author: Jack Chung <whchung@gmail.com>
Date:   Wed May 18 19:18:59 2016 +0800

    Adopt HIP_ prefix for DECLARE_EXTERN_SHARED macro

    Change-Id: I555ded16b449b67d2e20904013d86fe1ded6a2be

commit ef0997939c3578a9ae11621bf21c0416f04d2622
Author: Jack Chung <whchung@gmail.com>
Date:   Wed May 18 17:42:04 2016 +0800

    Modify hipify to support converting extern __shared__ to DECLARE_EXTERN_SHARED macro

    Added regular expression to search & replace extern __shared__ declarations to
    DECLARE_EXTERN_SHARED macro.

    Limitation:
    - Won't work if "extern __shared__" is declared at global scope

    Sample Usages:
    extern __shared__ double foo[];
    extern __shared__ unsigned int foo[];
    extern volatile __shared__ double foo[];
    extern volatile __shared__ unsigned int sdata[];
    extern __shared__ volatile unsigned int sdata[];
    extern __shared__ T s[];
    extern __shared__ T::type s[];
    extern __shared__ blah<T>::type s[];
    extern __shared__ typename mapper<Float>::type s_data[];
    extern __attribute__((used)) __shared__ typename mapper<Float>::type s_data[];

    Change-Id: I2be0b7039adeddb789f5a2b067d403a43fdc3e26

commit 93ff268724493aedfacdcd5a5aa9a100f4ebaed0
Author: Jack Chung <whchung@gmail.com>
Date:   Wed May 18 15:13:09 2016 +0800

    Introduce DECLARE_EXTERN_SHARED macro to encapsulate "extern __shared__" decls

    Change-Id: I93b2d37c763195b0ca9fd0afee78605a1e3272db

commit cff9c95412de343cc6405158b5acc4f1029267ff
Author: Jack Chung <whchung@gmail.com>
Date:   Wed May 18 12:53:54 2016 +0800

    Add __get_dynamic_groupbaseptr() to point to dynamic LDS

    Change-Id: I97b548d8a691488057617c551a8f331cad7afc77

Change-Id: I84e7875b76fa1f59e860e19c93bd4209cdd1fd2c


[ROCm/hip commit: bf4ba9e09e]
2016-06-05 06:20:44 -04:00
Rahul Garg 170796f4e9 Update in clock function
Change-Id: I5819aa62693dc3b9b5d7e39944d1e58aadc72027


[ROCm/hip commit: d46b3446de]
2016-05-20 11:12:32 +05:30
Maneesh Gupta e19b6710eb Add misssing unsigned keyword to atomicInc and atomicDec
Change-Id: I658479c4c7c409dba117152165229880aeb5ab9f


[ROCm/hip commit: 8b7f60a735]
2016-05-16 10:42:13 +05:30
Rahul Garg d10703011c Support for Atomic inc and dec in HIP
Change-Id: I783e4917cece5cc379894f0d293382315fbfa8b0


[ROCm/hip commit: 381dc93b96]
2016-05-12 11:10:48 +05:30
Aditya Atluri ec5d1a3966 Added copyright for device functions file
Change-Id: I689345ae7428928b4d2d7cd37fbc561309db3256


[ROCm/hip commit: 1cf1918147]
2016-05-06 10:51:06 -05:00
Aditya Atluri 940d891899 added full make_datatype support
[ROCm/hip commit: 88a883c1a1]
2016-04-21 17:25:30 -05:00
Aditya Atluri e39de0f560 reorg make_datatype feature
[ROCm/hip commit: 9ca8584ec0]
2016-04-21 14:51:19 -05:00
Aditya Atluri 70c1ac9285 added device math functions
[ROCm/hip commit: 26985b746b]
2016-03-31 12:29:19 -05:00
Aditya Atluri fe0f4e8bc2 moved cpp specific device code from headers to source
[ROCm/hip commit: 72c72d8748]
2016-03-31 04:45:00 -05:00
Aditya Atluri ffe185d731 Calling intrinsics from global kernel
[ROCm/hip commit: 61cd2bb399]
2016-03-29 11:17:55 -05:00