Commit Graph

837 Commits

Author SHA1 Message Date
Yaxun Sam Liu 2f6bee46f9 Silent warnings about duplicate static keyword
static is already in __DEVICE__, so should be removed.


[ROCm/clr commit: cfa71293ce]
2018-09-19 10:39:45 -04:00
Yaxun Sam Liu 445697cfe3 Fix build failure of hipTestHalf and hipTestIncludeMath for hip-clang
[ROCm/clr commit: 781f0d97b5]
2018-09-18 21:00:15 -04:00
Maneesh Gupta 814ac65527 Merge pull request #672 from iotamudelta/fp16_fix
Only LLVM6 and higher contain the necessary intrinsics.

[ROCm/clr commit: d44f7401f0]
2018-09-18 08:43:33 +05:30
Maneesh Gupta d7c37a2743 Merge pull request #674 from mangupta/fix_dtests_on_nvcc
[dtests] Fix hipTestClock, hipTestNew, hipTestGlobalVariable, hipSimpleAtomicsTest & hipTestIncludeMath tests on nvcc path

[ROCm/clr commit: 77ed6e2c46]
2018-09-18 07:50:52 +05:30
Maneesh Gupta 0e8815b3ad Merge pull request #677 from yxsamliu/fix-launch-decay
Fix hipLaunchKernelGGL for hip-clang

[ROCm/clr commit: dd0373dc02]
2018-09-18 07:50:37 +05:30
Yaxun Sam Liu c0592f16e6 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.


[ROCm/clr commit: b23db4e452]
2018-09-17 16:50:42 -04:00
Yaxun Sam Liu eb9c852dc5 Fix hipLaunchKernelGGL for hip-clang
Do not decay function pointer type of the kernel argument passed to hipLaunchKernelGGL
and hipLaunchKernel, otherwise some type information is lost which may cause
type inference failure for the template.

This issue caused compilation error of FeatureLPPooling in Caffe2/PyTorch and this patch
fixes that.


[ROCm/clr commit: 0471ce2da6]
2018-09-17 11:20:41 -04:00
Maneesh Gupta 9623689bc7 Add mappings for __clock* in nvcc_detail/hip_runtime.h
Change-Id: Ibcecf52f3e69298268d921efc036090544fa0ed0


[ROCm/clr commit: 933c13f003]
2018-09-17 15:23:30 +05:30
Maneesh Gupta 20abaa15c4 Merge branch 'master' into support-malloc
[ROCm/clr commit: b23609ad42]
2018-09-17 10:17:25 +05:30
Maneesh Gupta 191a752474 Merge pull request #650 from ROCm-Developer-Tools/hip-clang-new
Support placement new in hip-clang

[ROCm/clr commit: 9f553c0b40]
2018-09-15 11:21:01 +05:30
Maneesh Gupta 24868e6605 Merge pull request #665 from aaronenyeshi/fix-min-funcs
Use templates for min to prevent ambiguity

[ROCm/clr commit: 17d12bbfef]
2018-09-14 13:21:38 +05:30
Aaron Enye Shi 70d1143f62 Fix Tensorflow ambiguous min issue
[ROCm/clr commit: 6fa3ba3e12]
2018-09-13 23:16:20 +00:00
Johannes M Dieterich 1d0e3c3ece Only LLVM6 and higher contain the necessary intrinsics.
[ROCm/clr commit: dbe0cbcb93]
2018-09-13 13:55:43 -05:00
Maneesh Gupta 2bca65a8a3 Merge pull request #669 from ROCm-Developer-Tools/feature_automatic_cast
Remove potential for mismatch between runtime passed actuals and defined formals

[ROCm/clr commit: d7a832bce1]
2018-09-13 07:54:22 +05:30
Maneesh Gupta fbcf531e47 Merge pull request #661 from yxsamliu/add-empty-printf
Add empty printf for hip-clang

[ROCm/clr commit: 2081cc9bd4]
2018-09-13 07:54:03 +05:30
Aaron Enye Shi 96fe74cd2b Avoid AMP-retrict call to CPU-restrict
[ROCm/clr commit: ebf565819e]
2018-09-12 14:54:31 +00:00
Alex Voicu 1292ba70a7 Remove potential for mismatch between runtime passed actuals and defined formals.
[ROCm/clr commit: 5a8eb9eba5]
2018-09-12 10:30:48 +01:00
Maneesh Gupta 9061790fcb Merge pull request #664 from lcskrishna/master
added __host__ to float2half and half2float functions.

[ROCm/clr commit: 22cfe54e31]
2018-09-12 14:50:01 +05:30
Maneesh Gupta c7c438f4e6 Merge pull request #663 from yxsamliu/fix-launch
Use template for hipLaunchKernelGGL for hip-clang

[ROCm/clr commit: ad5bc7f015]
2018-09-12 14:49:38 +05:30
carlushuang f52bfda061 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>


[ROCm/clr commit: 15281b7b84]
2018-09-12 13:25:00 +08:00
Aaron Enye Shi 031932e509 Avoid host min func conflict with gcc min
[ROCm/clr commit: 7aa282897f]
2018-09-11 18:48:31 +00:00
Aaron Enye Shi 17d6266150 Use templates for min to prevent ambiguity
[ROCm/clr commit: 5f0838300e]
2018-09-11 18:21:54 +00:00
Yaxun Sam Liu 392b153a55 Use template for hipLaunchKernelGGL for hip-clang
[ROCm/clr commit: 6f2201475d]
2018-09-07 16:20:00 -04:00
Yaxun Sam Liu bce1ac6a00 Add empty printf for hip-clang
[ROCm/clr commit: be4a8f6859]
2018-09-07 16:15:08 -04:00
lcskrishna 5340097083 added host for float2half and hlaf2float
[ROCm/clr commit: fc2c8de816]
2018-09-06 15:02:52 -07:00
Yaxun (Sam) Liu dabbf3771b Support placement new in hip-clang
[ROCm/clr commit: cc0fbc0e2e]
2018-09-04 16:53:46 -04:00
Maneesh Gupta 3f4348a81c Merge pull request #654 from ROCm-Developer-Tools/fix-force-inline
__forceinline__ needs inline and always_inline

[ROCm/clr commit: 0a02ae19dc]
2018-09-03 16:35:34 +05:30
Maneesh Gupta 7891e7423d Merge pull request #657 from yxsamliu/fix-clz
Fix ambiguity of __clz and __clzll

[ROCm/clr commit: 6dfb6fac8b]
2018-09-03 16:34:42 +05:30
Maneesh Gupta 1091564a43 Merge pull request #656 from searlmc1/msearles-fixes
Add keyword 'explicit' to avoid ambiguity

[ROCm/clr commit: 0957130a52]
2018-09-03 16:33:41 +05:30
Maneesh Gupta 7b45626603 Merge pull request #651 from yxsamliu/hip-clang-clock
Add clock() and clock64()

[ROCm/clr commit: d515998ac4]
2018-09-03 16:32:30 +05:30
Yaxun Sam Liu 1da85d8537 Fix ambiguity of __clz and __clzll
[ROCm/clr commit: 701519d27d]
2018-08-31 18:07:57 -04:00
Mark Searles 45590c6c6d 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)


[ROCm/clr commit: 992c90079b]
2018-08-31 11:10:58 -07:00
Mark Searles 81c93d94be 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)


[ROCm/clr commit: 37cc117bd5]
2018-08-31 10:36:05 -07:00
Aaron Enye Shi 6ce7e12be9 __forceinline__ needs inline and always_inline
Related to SWDEV-163084


[ROCm/clr commit: decf9beec9]
2018-08-29 18:33:35 +00:00
Yaxun Sam Liu 137880f369 Add clock() and clock64()
[ROCm/clr commit: 0f4546deca]
2018-08-29 10:51:00 -04:00
Aaron Enye Shi 3a7ad8a604 Add bitinsert64 to device functions
[ROCm/clr commit: 031c0204d8]
2018-08-28 20:01:14 +00:00
Aaron Enye Shi 06a68d3eb6 Clean up and add meaningful variables to bit funcs
[ROCm/clr commit: 24429eabb0]
2018-08-28 18:19:48 +00:00
Aaron Enye Shi 13f4ace668 Add bitextract and bitinsert functions
[ROCm/clr commit: fb1da42d0e]
2018-08-20 16:46:12 +00:00
Maneesh Gupta 3cb8b82de3 Merge pull request #623 from ROCm-Developer-Tools/tf18
Fix declaration conflict when hip/math_functions.h is included first

[ROCm/clr commit: 546378292d]
2018-08-10 09:36:27 +05:30
Maneesh Gupta a3e7b7c18e Merge pull request #613 from ROCm-Developer-Tools/hcc-compat
Add HCC compatibility mode for hip-clang

[ROCm/clr commit: a5f9ae90d2]
2018-08-10 09:32:31 +05:30
Yaxun Sam Liu d3295e61e2 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.


[ROCm/clr commit: 87de95975a]
2018-08-08 08:55:28 -04:00
Yaxun Sam Liu 6e153a743f Fix __HIP_DEVICE_COMPILE__ not defined when hip/math_functions.h is included
This fixes build failure in TensorFlow 1.8 for HCC


[ROCm/clr commit: 058eb7535b]
2018-08-07 17:14:39 -04:00
Yaxun Sam Liu 6df5aef807 Fix declaration conflict when hip/math_functions.h is included first
This fixes build failure in TensorFlow 1.8 for HCC


[ROCm/clr commit: 69bbf45b44]
2018-08-07 15:44:59 -04:00
Wen-Heng (Jack) Chung d7b2bab183 Revert "HIP program state re-initialization logic"
This reverts commit 865fe01b37.


[ROCm/clr commit: 1fe7f1be91]
2018-08-03 17:03:04 -05:00
Maneesh Gupta 0f033ca572 Merge pull request #603 from b-sumner/master
Drop use of NVCC_COMPAT since it is always set

[ROCm/clr commit: b485957858]
2018-08-03 08:45:18 +05:30
Maneesh Gupta 1039c7952c Merge pull request #610 from aaronenyeshi/enable-hcc-module-launch
Enable hipHccModuleLaunchKernel on HIP-Clang

[ROCm/clr commit: 0354367a07]
2018-08-02 08:08:46 +05:30
Yaxun Sam Liu b587661200 Add hc_get_workitem_absolute_id for hip-clang HCC compatibility mode
[ROCm/clr commit: 9c28758fa0]
2018-08-01 15:14:38 -04:00
Yaxun Sam Liu 2d74df6f34 Add HCC compatibility mode
[ROCm/clr commit: b91691966f]
2018-08-01 15:14:38 -04:00
Aaron Enye Shi 83d293a2a4 Enable hipHccModuleLaunchKernel on HIP-Clang
[ROCm/clr commit: 0ad36dfa58]
2018-07-31 20:38:20 +00:00
Aaron Enye Shi 9512246b5c Protect macro TYPEDEF_VECTOR_VALUE_TYPE and prefix __hip_ for vector_value_types
[ROCm/clr commit: e42af991d1]
2018-07-30 20:41:24 +00:00