Gráfico de Commits

52 Commits

Autor SHA1 Mensagem Data
Yaxun (Sam) Liu c4655d167e Fix assert for windows. (#1329)
MSVC assert.h has no guard for include once. The macro assert overrides
device assert definition. Do not include it for device compilation.
2019-08-16 02:13:33 +00:00
Yaxun Sam Liu 0ebe23512f Fix nan for windows 2019-02-27 12:33:26 -05:00
Yaxun Sam Liu fe5861770e Fix nan() for windows 2019-02-07 17:29:36 -05:00
Maneesh Gupta 95fe4b770f Merge pull request #863 from aaronenyeshi/add-dot-instructions
Add Dot functions as amd_mixed_dot function
2019-01-29 06:01:01 +05:30
Aaron Enye Shi 2ab6fd374c Fix mixed dot for Jenkins rocm_2_0 2019-01-24 22:48:35 +00:00
Aaron Enye Shi b63597bb95 Use correct OCKL native vector types 2019-01-22 22:31:19 +00:00
Aaron Enye Shi b0e0ec3c67 Allow hip-clang to use amd_mixed_dot as well 2019-01-22 16:21:16 +00:00
Maneesh Gupta f74816efe6 Map more instrincis to ocml native
Change-Id: I54e55d5902931bafdabd0956e4e8c1d7b39f7173
2019-01-15 19:40:37 +05:30
Aaron Enye Shi bdb84f3d9c Add backwards compatibility to dot funcs 2019-01-14 23:14:49 +00:00
Aaron Enye Shi 7ba7d9a0f6 Move fp16 dot functions to hip_fp16 2019-01-14 21:50:32 +00:00
Maneesh Gupta 54e4463d16 Switch to faster ocml variants for trig instrinsics
Change-Id: If62821e2fe1b0da91ad1b8c5580ebf1a009405e9
2019-01-14 13:01:57 +05:30
Aaron Enye Shi 84a028b9e1 Add Dot functions as amd_mixed_dot function
Introduce the Dot functions which are available in the device library. Forward those prototypes, and introduce HIP API to expose the usage of the dot functions.
2019-01-11 23:31:02 +00:00
Aaron Enye Shi 2d50392c17 Add *_rn functions back into HIP intrinsics
Add back the round-to-nearest-even intrinsics back to HIP math
intrinsics as it caused regression.
2018-12-18 19:31:54 +00:00
Aaron Enye Shi 7b3bbc85c5 Guard rcp rounded implementation as well
Since rcp implementations of non-default rounded versions are not correct or supported in OCML, guard them using the same macro OCML_BASIC_ROUNDED_OPERATIONS. Also update the docs and tests.
2018-11-06 19:53:28 +00:00
Aaron Enye Shi 9aa92238ab Guard the OCML rounded operations instead
Instead of commenting all these functions out, guard the functions with a macro OCML_BASIC_ROUNDED_OPERATIONS.
2018-11-06 16:32:14 +00:00
Aaron Enye Shi cef6e8ef1f Remove non-working non-default-rounded math apis
In ROCm-Device-Libs, they have dropped the non-default-rounded versions of add, sub, mul, div, sqrt and fma. Therefore, ocml has removed the rte, rtp, rtn, and rtz counterparts. This will remove the same math APIs in HIP for _ru, _rd, _rn, and _rz.
2018-11-05 22:34:16 +00:00
Maneesh Gupta 407e092a13 Merge pull request #705 from ROCm-Developer-Tools/feature_minimal_changes_for_hc_next
Feature minimal changes for hc next
2018-10-19 06:58:31 +05:30
Alex Voicu 3678063598 Dumb workaround is still needed, so add it back. 2018-10-18 15:33:46 +01:00
Alex Voicu 9ec697c620 Re-sync with upstream. 2018-10-10 11:43:49 +01:00
Aaron Enye Shi eeb6c11050 Use sinf and cosf from ocml device libs
Using llvm_amdgcn builtin fails to produce accurate values, we should move to using the ocml device library versions.
2018-09-25 19:31:39 +00:00
Maneesh Gupta 7cec85e1ae Merge pull request #614 from ROCm-Developer-Tools/fma
Add overloading resolution functions for fma
2018-09-20 13:38:03 +05:30
Yaxun Sam Liu cfa71293ce Silent warnings about duplicate static keyword
static is already in __DEVICE__, so should be removed.
2018-09-19 10:39:45 -04:00
Yaxun Sam Liu a8bed200b7 Add fma function with float and _Float16 arguments 2018-09-19 09:59:33 -04:00
Yaxun Sam Liu 781f0d97b5 Fix build failure of hipTestHalf and hipTestIncludeMath for hip-clang 2018-09-18 21:00:15 -04:00
Alex Voicu 26c26f63cb Align with HC Next. 2018-09-17 11:50:29 +03:00
Aaron Enye Shi 6fa3ba3e12 Fix Tensorflow ambiguous min issue 2018-09-13 23:16:20 +00:00
Aaron Enye Shi ebf565819e Avoid AMP-retrict call to CPU-restrict 2018-09-12 14:54:31 +00:00
Aaron Enye Shi 7aa282897f Avoid host min func conflict with gcc min 2018-09-11 18:48:31 +00:00
Aaron Enye Shi 5f0838300e Use templates for min to prevent ambiguity 2018-09-11 18:21:54 +00:00
Yaxun Sam Liu 87de95975a Fix __HIP_ARCH_* not defined after including math_functions.h
hcc_detail/math_functions.h used to include hcc_detail/hip_runtime.h.

Removing it has caused regression in TensorFlow 1.8.

Put it back for backward compatibiliity.
2018-08-08 08:55:28 -04:00
Yaxun Sam Liu 69bbf45b44 Fix declaration conflict when hip/math_functions.h is included first
This fixes build failure in TensorFlow 1.8 for HCC
2018-08-07 15:44:59 -04:00
Yaxun (Sam) Liu a8dc1257df Support std::complex for hip-clang 2018-07-18 00:08:04 -04:00
Alex Voicu 9452298fbe Removes use of unimplemented OCML functionality. 2018-06-25 19:16:27 +01:00
Alex Voicu 3a17e2ad06 Rename for minimal confusion. 2018-06-01 22:55:33 +01:00
Alex Voicu 91d9ec75d7 Fix typos / address review comments. 2018-06-01 16:20:21 +01:00
Alex Voicu e03ca1a72e Re-sync with upstream. Add integer abs. 2018-05-31 16:38:00 +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
Jorghi12 b33876ee4d Update math_functions.h
CUDA also has a function named labs.
2018-05-26 16:22:10 -04:00
Jorghi12 b127488ea9 Adding double/long int signatures for abs
Adding overloads for abs that are found in cuda's math_functions.
2018-05-26 00:41:24 -04:00
Deven Desai 65a90c55e7 Checkin to fix bugs in math functions.
This change fixes the following bugs that were discovered while debuggnig TF unit test failures (cwise_ops_test)

1. __hisinf and __hisnan routines
   Both had incorrect implementations.

2. abs
   A "long long" (64bit int) version was missing, resulting in the 32bit version being used for 64bit ints (which resulted in incorrect results, when the value passed in was outside the 32bit int range)

3. lgamma
  We seemed to have a custom version for the 'double' datatype (which was giving incorrect results). Replaced it with a call to the 'double' version of the underlying 'hc::precision_math::lgamma'
2018-04-24 18:10:07 +00:00
Maneesh Gupta 9e47fccc89 Apply .clangformat to all repo source files
Change-Id: I7e79c6058f0303f9a98911e3b7dd2e8596079344
2018-03-12 11:29:03 +05:30
Aaron En Ye Shi b439b45641 Fix ilogb/ilogbf functions to return int
This patch will fix hipDoublePrecisionMathDevice test on ThinLTO, which uncovered that hip math_function's ilogb/ilogbf should return type int instead of double. This will match rocdl.
2017-12-05 23:14:10 +00:00
Ben Sander 2e9b78c274 Fix math ordering for --genco mode. 2017-10-02 21:52:16 +00:00
Maneesh Gupta 1bd1c6bea8 Renable frexp(f) device math function
Change-Id: I53c022b8ddf38cd17ddb42eba457b9020db66395
2017-07-20 14:41:30 +05:30
Maneesh Gupta cc4a73f215 Merge branch 'amd-develop' into amd-master
Change-Id: I05572d2b32f1df70b54e2efeb32c8a4d8055912d
(cherry picked from commit 3a56e5c09b)
2017-04-13 03:36:11 -05:00
Aditya Atluri 614e7db513 fixed header names
Change-Id: I21650d6398187d3767b28e8ac81b2642d3b89a0e
2017-03-31 12:18:55 -05:00
Aditya Atluri 52859a8a40 added support for lgammaf and lgamma
1. Implementation inside HIP

Change-Id: I657263b7276a57c56081d3336fef816b5f204eff
2017-03-17 18:26:10 -05:00
Aditya Atluri a5d017e406 removed host math functions from math_functions.h
Change-Id: I90d8784e2d6b58c6fade9f0fa12c0db3ee417d3e
2017-01-27 17:38:43 -06:00
Aditya Atluri 02190736e3 fixed compilation issues for vector types and math functions
1. Added math_functions.h to hip_runtime.h
2. Changed operator overloading classifier static to static inline
3. Added vector types test for gpu
4. Seperated __host__ and __device__ for math functions in headers

Change-Id: I499862fad5d7b10da686da9011d7ecefe523f8e2
2017-01-20 09:49:11 -06:00
Aditya Atluri 3d4dcee35d Added script for generating math api docs
1. Commented out unsupported device math functions
2. Moved function signatures to the top of implementation snippets
3. Added script to generate markdown documentation for device math apis
4. Added the generated file from the script which should be present everytime

Change-Id: Ic579dd8b8fdffa6e1b4d4f5f3fd8a803f4dcaac7
2017-01-18 14:40:50 -06:00