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

63 Коммитов

Автор SHA1 Сообщение Дата
Alex Voicu 68a0dd826d Remove vestigial implementations. 2018-06-02 11:37:08 +01:00
Alex Voicu 14e6a04387 Switch to using ROCDL directly, as opposed to via HC. Add missing bits. 2018-05-31 03:17:26 +01:00
Maneesh Gupta 9e47fccc89 Apply .clangformat to all repo source files
Change-Id: I7e79c6058f0303f9a98911e3b7dd2e8596079344
2018-03-12 11:29:03 +05:30
Alex Voicu b8c80bd0b2 Replace archaic use of homebrew functionality with calls to the HC maths library. This fixes a hang observed when building hipTestDeviceDouble. 2017-12-02 00:01:47 +00:00
Alex Voicu 4966518846 Revert "Revert adoption of CUDA indexing in general - this can only work with later versions of the compiler, just like module based dispatch, and thus must be guarded against usage in earlier (e.g. 1.6) versions."
This reverts commit 4792475
2017-11-29 21:49:10 +00:00
Alex Voicu 2557000b56 Revert "Revert adoption of CUDA indexing in general - this can only work with later versions of the compiler, just like module based dispatch, and thus must be guarded against usage in earlier (e.g. 1.6) versions."
This reverts commit d2fd1f5
2017-11-29 21:36:29 +00:00
Alex Voicu f8c1c1b38e Refactor the __device__ versions of memset and memcpy to be less awkward i.e. not return nullptr as opposed to the destination pointer (it can only be assumed it was done for maximum confusion) and actually unroll as they claim to. Change all of the {to, from}Symbol functions to use hipModuleGetGlobal, as opposed to hc::accelerator::get_symbol_address which is no longer valid with module based dispatch. 2017-11-21 02:40:34 +00:00
Alex Voicu 0cc921f103 This implements the trivial change needed to move back from the hip{Something}_{x, y, z} macros to the natural CUDA syntax of Something.{x, y, z}. This is contained in lines 384-404 in hip_runtime.h. All of the other changes have to do with changing unit tests to use this syntax. The macros are retained for backwards compatibility. 2017-11-19 01:54:12 +00:00
Siu Chi Chan b6e22b5c93 implement __threadfence_system 2017-08-02 08:50:18 +00:00
Maneesh Gupta cc6e6b2a0a remove unsupported erf(c)inv related host functionality
Change-Id: I665c33616359a0124b5552076359d2f8faa54930
2017-07-14 11:31:40 +05:30
Wen-Heng (Jack) Chung 0237aeab06 Remove explicit address spaces declarations 2017-07-07 12:46:29 -05:00
Rahul Garg d9935cd089 Abort device function in HIP/HCC, need new HCC
Change-Id: I4195ab75e9b7b48c8b8128d6925ddc0fa5e9e009
2017-06-18 12:31:31 +05:30
Sun, Peng 682dda4418 Fix error related to undefined reference of __get_dynamicgroupbaseptr().
Change-Id: I14951e1725e35dd5f5e53805f81cdb58661f59f2
2017-06-08 19:24:32 -05:00
Siu Chi Chan 969931b1ce fix atomicCAS:remove load for the return value after CAS 2017-05-31 15:20:19 -04:00
Siu Chi Chan a3595d2e8c fix hip_fast_dsqrt* to call a double fp sqrt function 2017-05-25 23:15:30 -04:00
Aditya Atluri f368271872 fixed fast math expf and exp10f
Change-Id: I73963220f902efebb0a7404c5f8966dffb4c35ca
2017-04-26 19:01:10 -05:00
Sun, Peng a7d7797781 Fix warpSize, for related issue in hipeigen and torch
Change-Id: Ic66b24923a363304dca189011869ba7a0a6f8895
2017-04-01 15:42:53 -05:00
Ben Sander 92fd4c8f10 Add __device__ to needful functions for promote-free. 2017-03-17 11:19:48 -05:00
Ben Sander f4256cb57c Add USE_PROMOTE_FREE_HCC for smooth transition to new HCC caps.
ADDRESS_SPACE_1 defines
2017-03-17 11:04:39 -05:00
Wen-Heng (Jack) Chung 17af837120 Revert "Changes to HIP to cope with Promote-free HCC"
This reverts commit 0005dd5f66.

Change-Id: I20a9bab3883ad09913b320210344d37599cb8fcd
2017-03-14 22:59:27 +08:00
Wen-Heng (Jack) Chung 0005dd5f66 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
2017-03-08 01:32:59 +08:00
Ben Sander 8e50134d31 Modify memcpy and memset to follow C/C++ standard:
- memcpy src is const
    - memset val is int
2017-03-06 16:38:22 -06:00
Aditya Atluri f009f3533d changed __global__ attribute
1. Moved around tests and added them to HIT

Change-Id: I5d75280c42a5af852670ebabc7305ee56721ec7b
2017-02-03 10:53:36 -06:00
Aditya Atluri d23b6b8694 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
2017-01-17 14:57:51 -06:00
Aditya Atluri feba9fe213 v1: Working on Integer Intrinsics
1. Half way through
2. May not work
3. No test written

Change-Id: I705b743a78b142ff068e2521870e73fca7ad2b1c
2017-01-16 14:55:29 -06:00
Aditya Atluri d496576b55 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
2017-01-16 12:10:05 -06:00
Aditya Atluri e9ff23e5f9 changed copyright year from 2016 to 2017 in src directory
Change-Id: Idb97db509b2b4b1656b2df7a14a62ade38c9d574
2017-01-11 18:05:41 -06:00
Aditya Atluri 4e57822d95 Added proper device data types
Change-Id: I42029635ff68c3c13a764a3eda6447e6c77878c6
2017-01-11 15:06:25 -06:00
Ben Sander b53ba931e8 fix copyright 2016-12-15 14:42:52 -06:00
pensun 092924d660 IPC prototyps and part of the implementation included
Change-Id: Id88c7f155d23ec63f57a6ef05098fba43f8af336
2016-12-06 14:24:09 -06:00
Maneesh Gupta b8413a69c8 Remove redundant variable g_malloc_heap_size
Change-Id: Idaf47be70488f0deb3eab05a86d9c5a413d3fff7
2016-12-06 10:19:03 +05:30
Maneesh Gupta ac368cc60f Don't share g_malloc_heap_size between libraries
Change-Id: Ic70bf83d4f865bc5c453941fdbc1814c77f0ad9d
2016-12-05 11:03:45 +05:30
Aditya Atluri d9a3527769 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
2016-11-22 15:26:00 -06:00
Aditya Atluri 1a85762f53 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
2016-11-22 10:20:09 -06:00
Maneesh Gupta 2195e3c37d Refactor for building HIP as dynamic library
Change-Id: I65a3d9d589c4fdbbdcf1611e5427224253be8260
2016-11-18 14:33:20 +05:30
Maneesh Gupta 88d6cad3fb src/*: Update copyright header
Change-Id: I455f5d0d12fe9cb39a3ba873bd22b4c25ed07cbf
2016-10-15 22:55:22 +05:30
Maneesh Gupta 2e93d2d5d2 Remove incorrect executable-bit from non-executable files
Change-Id: Iacc434374721e01f7d75d0ab54bceabe0b337f54
2016-10-14 12:53:13 +05:30
Elias Konstantinidis adc763f440 Added support for __mul24 and __umul24 2016-10-06 09:29:36 +05:30
Maneesh Gupta bbfc08f419 Move include/* to include/hip/*
Change-Id: I7a7b2839b4df59c7a4c503550f99fdc9e45c0f54
2016-10-04 22:17:18 +05:30
Ben Sander 6a8ae733cc enable dynamic shared always
Change-Id: Idc246546f583a82489ef34d1fe22d0e118b1e0ed
2016-09-02 09:46:59 -05:00
Maneesh Gupta 260c0dc4ab Fix normcdf signature
Change-Id: I36b225cfe03db687f295aeea8a006d535bc14231
2016-08-17 22:07:06 +05:30
7SK 54034e5048 NVCC_COMPAT
add support for both cuda compatible implementation and hcc(faster)
implementation with test

Change-Id: I79a22344f458391d7dffac5f147619a542e97e4e
2016-06-28 09:36:06 +05:30
Aditya Atluri ba262ea855 added tests for host math functions
Change-Id: I66a5c574a27190e32054586f07ecf20e1ff71292
2016-06-17 15:05:33 -05:00
Aditya Atluri 75fc024308 added bessel nth order function
Change-Id: I18a64d894dda9330b39638535dfafd7ce31bb968
2016-06-17 09:22:23 +05:30
Ben Sander 6a2a140f34 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
2016-06-16 06:13:51 +05:30
Aditya Atluri c4e667cf90 added more host functions and tests
Change-Id: I9904e65e14c5479ba33d836c5c0b763cb5af71e3
2016-06-15 11:45:19 -05:00
Aditya Atluri bb02880a12 added host device functions
Change-Id: I8f299752fb8dd8e8947da62e4ad88842c1c19f62
2016-06-14 18:14:44 -05:00
Aditya Atluri ce52a8f70c added bessel zero and one order functions
Change-Id: I57039d54eae7207db00415bc7ba09bbf9cb6425a
2016-06-14 11:50:48 +05:30
Aditya Atluri 720fa16355 added erfinv software implementation
Change-Id: Ib1a5584f6c81ab3afa70f7bcbfd7780e156454e3
2016-06-14 00:09:41 -04:00
Aditya Atluri ae96fe4d12 added more device functions
Change-Id: I191919060b393772ee442cc19d83479217c5a4ce
2016-06-13 11:55:12 -05:00