Gráfico de commits

829 Commits

Autor SHA1 Mensaje Fecha
Yaxun Sam Liu b23db4e452 Disable device code for gcc in hip_memory.h
These device code should only be seen by HCC or hip-clang. They causd build failure
for HIP-VDI runtime and should be disabled for gcc.
2018-09-17 16:50:42 -04:00
Maneesh Gupta b23609ad42 Merge branch 'master' into support-malloc 2018-09-17 10:17:25 +05:30
Maneesh Gupta 9f553c0b40 Merge pull request #650 from ROCm-Developer-Tools/hip-clang-new
Support placement new in hip-clang
2018-09-15 11:21:01 +05:30
Maneesh Gupta 17d12bbfef Merge pull request #665 from aaronenyeshi/fix-min-funcs
Use templates for min to prevent ambiguity
2018-09-14 13:21:38 +05:30
Aaron Enye Shi 6fa3ba3e12 Fix Tensorflow ambiguous min issue 2018-09-13 23:16:20 +00:00
Maneesh Gupta d7a832bce1 Merge pull request #669 from ROCm-Developer-Tools/feature_automatic_cast
Remove potential for mismatch between runtime passed actuals and defined formals
2018-09-13 07:54:22 +05:30
Maneesh Gupta 2081cc9bd4 Merge pull request #661 from yxsamliu/add-empty-printf
Add empty printf for hip-clang
2018-09-13 07:54:03 +05:30
Aaron Enye Shi ebf565819e Avoid AMP-retrict call to CPU-restrict 2018-09-12 14:54:31 +00:00
Alex Voicu 5a8eb9eba5 Remove potential for mismatch between runtime passed actuals and defined formals. 2018-09-12 10:30:48 +01:00
Maneesh Gupta 22cfe54e31 Merge pull request #664 from lcskrishna/master
added __host__ to float2half and half2float functions.
2018-09-12 14:50:01 +05:30
Maneesh Gupta ad5bc7f015 Merge pull request #663 from yxsamliu/fix-launch
Use template for hipLaunchKernelGGL for hip-clang
2018-09-12 14:49:38 +05:30
carlushuang 15281b7b84 fix __longlong_as_double() problem, return the double value
previous version return a long long valus *as* double, hence we may get the wrong result.
this also affect atomicAdd(double * ...), which use long long pointer to mimic double pointer.

Signed-off-by: carlushuang <carlus.huang@amd.com>
2018-09-12 13:25:00 +08: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 6f2201475d Use template for hipLaunchKernelGGL for hip-clang 2018-09-07 16:20:00 -04:00
Yaxun Sam Liu be4a8f6859 Add empty printf for hip-clang 2018-09-07 16:15:08 -04:00
lcskrishna fc2c8de816 added host for float2half and hlaf2float 2018-09-06 15:02:52 -07:00
Yaxun (Sam) Liu cc0fbc0e2e Support placement new in hip-clang 2018-09-04 16:53:46 -04:00
Maneesh Gupta 0a02ae19dc Merge pull request #654 from ROCm-Developer-Tools/fix-force-inline
__forceinline__ needs inline and always_inline
2018-09-03 16:35:34 +05:30
Maneesh Gupta 6dfb6fac8b Merge pull request #657 from yxsamliu/fix-clz
Fix ambiguity of __clz and __clzll
2018-09-03 16:34:42 +05:30
Maneesh Gupta 0957130a52 Merge pull request #656 from searlmc1/msearles-fixes
Add keyword 'explicit' to avoid ambiguity
2018-09-03 16:33:41 +05:30
Maneesh Gupta d515998ac4 Merge pull request #651 from yxsamliu/hip-clang-clock
Add clock() and clock64()
2018-09-03 16:32:30 +05:30
Yaxun Sam Liu 701519d27d Fix ambiguity of __clz and __clzll 2018-08-31 18:07:57 -04:00
Mark Searles 992c90079b Add keyword 'explicit' to avoid ambiguity
Older gcc, e.g., 5.x, see an ambiguity in some calls. Example error
output as seen with gcc 5.5:

In file included from benchmark_wino.cpp:1:
In file included from ./miopen.hpp:13:
In file included from /usr/lib/gcc/x86_64-linux-gnu/5.5.0/../../../../include/c++/5.5.0/regex:38:
In file included from /usr/lib/gcc/x86_64-linux-gnu/5.5.0/../../../../include/c++/5.5.0/algorithm:62:
In file included from /usr/lib/gcc/x86_64-linux-gnu/5.5.0/../../../../include/c++/5.5.0/bits/stl_algo.h:66:
In file included from /usr/lib/gcc/x86_64-linux-gnu/5.5.0/../../../../include/c++/5.5.0/random:51:
/usr/lib/gcc/x86_64-linux-gnu/5.5.0/../../../../include/c++/5.5.0/bits/random.tcc:1324:27: error: call to 'abs' is ambiguous
                    const double __y = -std::abs(__n) * __param._M_sm - 1;
                                        ^~~~~~~~
/opt/rocm/hip/include/hip/hcc_detail/hip_complex.h:345:31: note: candidate function
__DEFINE_HIP_COMPLEX_REAL_FUN(abs, hipCabs)
2018-08-31 11:10:58 -07:00
Mark Searles 37cc117bd5 Add keyword 'explicit' to avoid ambiguity
Older gcc, e.g., 5.x, see an ambiguity in some calls. Example error
output as seen with gcc 5.5:

In file included from benchmark_wino.cpp:1:
In file included from ./miopen.hpp:13:
In file included from /usr/lib/gcc/x86_64-linux-gnu/5.5.0/../../../../include/c++/5.5.0/regex:38:
In file included from /usr/lib/gcc/x86_64-linux-gnu/5.5.0/../../../../include/c++/5.5.0/algorithm:62:
In file included from /usr/lib/gcc/x86_64-linux-gnu/5.5.0/../../../../include/c++/5.5.0/bits/stl_algo.h:66:
In file included from /usr/lib/gcc/x86_64-linux-gnu/5.5.0/../../../../include/c++/5.5.0/random:51:
/usr/lib/gcc/x86_64-linux-gnu/5.5.0/../../../../include/c++/5.5.0/bits/random.tcc:1324:27: error: call to 'abs' is ambiguous
                    const double __y = -std::abs(__n) * __param._M_sm - 1;
                                        ^~~~~~~~
/opt/rocm/hip/include/hip/hcc_detail/hip_complex.h:345:31: note: candidate function
__DEFINE_HIP_COMPLEX_REAL_FUN(abs, hipCabs)
2018-08-31 10:36:05 -07:00
Aaron Enye Shi decf9beec9 __forceinline__ needs inline and always_inline
Related to SWDEV-163084
2018-08-29 18:33:35 +00:00
Yaxun Sam Liu 0f4546deca Add clock() and clock64() 2018-08-29 10:51:00 -04:00
Aaron Enye Shi 031c0204d8 Add bitinsert64 to device functions 2018-08-28 20:01:14 +00:00
Aaron Enye Shi 24429eabb0 Clean up and add meaningful variables to bit funcs 2018-08-28 18:19:48 +00:00
Aaron Enye Shi fb1da42d0e Add bitextract and bitinsert functions 2018-08-20 16:46:12 +00:00
Maneesh Gupta 546378292d Merge pull request #623 from ROCm-Developer-Tools/tf18
Fix declaration conflict when hip/math_functions.h is included first
2018-08-10 09:36:27 +05:30
Maneesh Gupta a5f9ae90d2 Merge pull request #613 from ROCm-Developer-Tools/hcc-compat
Add HCC compatibility mode for hip-clang
2018-08-10 09:32:31 +05:30
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 058eb7535b Fix __HIP_DEVICE_COMPILE__ not defined when hip/math_functions.h is included
This fixes build failure in TensorFlow 1.8 for HCC
2018-08-07 17:14:39 -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
Wen-Heng (Jack) Chung 1fe7f1be91 Revert "HIP program state re-initialization logic"
This reverts commit 04640992dc.
2018-08-03 17:03:04 -05:00
Maneesh Gupta b485957858 Merge pull request #603 from b-sumner/master
Drop use of NVCC_COMPAT since it is always set
2018-08-03 08:45:18 +05:30
Maneesh Gupta 0354367a07 Merge pull request #610 from aaronenyeshi/enable-hcc-module-launch
Enable hipHccModuleLaunchKernel on HIP-Clang
2018-08-02 08:08:46 +05:30
Yaxun Sam Liu 9c28758fa0 Add hc_get_workitem_absolute_id for hip-clang HCC compatibility mode 2018-08-01 15:14:38 -04:00
Yaxun Sam Liu b91691966f Add HCC compatibility mode 2018-08-01 15:14:38 -04:00
Aaron Enye Shi 0ad36dfa58 Enable hipHccModuleLaunchKernel on HIP-Clang 2018-07-31 20:38:20 +00:00
Aaron Enye Shi e42af991d1 Protect macro TYPEDEF_VECTOR_VALUE_TYPE and prefix __hip_ for vector_value_types 2018-07-30 20:41:24 +00:00
Aaron Enye Shi ff1e49d191 Ensure correct vector value type used in texture
Implement the vector value types in terms of SCALAR_TYPE##SIZE_vector_value_type for float, int, uint and sizes 2, 3, 4, 8, and 16.
2018-07-30 19:43:12 +00:00
Yaxun Sam Liu f08f26942c Fix thread index calculation in __hip_malloc 2018-07-27 16:24:51 -04:00
Yaxun Sam Liu d17dc21c9c Support malloc/free for hip-clang 2018-07-27 16:24:51 -04:00
Brian Sumner 8d80abb30f Drop use of NVCC_COMPAT since it is always set 2018-07-27 09:29:29 -07:00
Aaron Enye Shi bf6fdca1e8 Enable HIP texture functions with HIP vector types
Include texture_functions.h on HIP-Clang path. Use HIP vector types instead of hc::short_vectors for texture_functions, and remove HCC headers.
2018-07-25 19:52:19 +00:00
Maneesh Gupta 123af1a9c6 Merge pull request #584 from ROCm-Developer-Tools/fix-vector-explicit-cast
Fix explicit cast required
2018-07-23 10:13:05 +05:30
Aaron Enye Shi 032ebd41ea Fix explicit cast required
This is required for PyTorch which runs into an issue with narrowing types. Requires an explicit cast.
2018-07-20 16:34:15 -04:00
Aaron Enye Shi 98fca64220 [HIPClang] Switch ordering on math functions
Header math_functions.h should be included after including __clang_cuda_math_forward_declares.h to avoid warning: attribute declaration must precede definition.
2018-07-20 13:25:04 -04:00