Commit Graph

1202 Commits

Author SHA1 Message Date
Yaxun (Sam) Liu 2406fa8a3d Disable device side malloc (#2009)
* Disable device side malloc

Currently device side malloc is not working and takes excessive
device memory.

Disable it for now until a working malloc is implemented.

Change-Id: I1ad908c1c53a83752383b4be96688a848642c699

[ROCm/clr commit: d556c3425b]
2020-04-14 16:07:14 +05:30
Rahul Garg 63332172d6 Rename hipDrvOccupancy to hipModuleOccupancy and match CUDA syntax (#1943)
[ROCm/clr commit: 69e09a0b1b]
2020-04-07 14:02:52 +05:30
lmoriche 318fbce04d Don't duplicate embedded code objects (#1991)
If the code object is embedded in an already mapped file, and the
lifetime of the mapped file exceeds the lifetime of the executable,
we do not need to make a copy of the binary.

This allows the ROCR to present the code object URI as
file:///path/to/file#offset=X&size=Y.

[ROCm/clr commit: 67830996a9]
2020-04-06 15:37:35 +05:30
ansurya 6b18a8e068 Initial support for bfloat16 (#1980)
[ROCm/clr commit: ff7aaedca2]
2020-04-06 15:35:43 +05:30
Yaxun (Sam) Liu ecfda14b46 Fix ambiguity of fma for _Float16 for libc++ (#1976)
libc++ defines fma as template function for auto promotion of mixed-type
arguments. libc++ does not handle _Float16 as _Float16 is not a supported
type by C++ standard. As such, it is unlikely we can commit our fix for
_Float16 to libc++ trunk.

Therefore we handle _Float16 with a template specialization of
__numeric_type in HIP headers.

Change-Id: If01960a657ebf1a7a67463cdcf66fab7458dff3c

[ROCm/clr commit: 6f439f0232]
2020-04-06 15:35:18 +05:30
Maneesh Gupta 3d1b086400 Remove address_space(1) typecast and use __ockl_atomic_add_noret_f32 (#1956)
* Remove address_space(1) typecast for ockl_global_atomic_add_f32
* use __ockl_atomic_add_noret_f32

[ROCm/clr commit: 062938a14c]
2020-03-28 17:28:33 +05:30
Siu Chi Chan 922219117b don't expose symbols from code_object_bundle (#1971)
Change-Id: I56479485aad42c3d517fe6d9055be1cd846eeb00

[ROCm/clr commit: 6ab1e864b6]
2020-03-27 14:09:07 +05:30
Sarbojit2019 77f9a99ef0 Fix for __usad issue (#1972)
Fixes #1930

[ROCm/clr commit: 13b73692d8]
2020-03-26 17:09:44 +05:30
Benjamin Sherman e13788ff95 Add const qualifiers to HIP_vector_type unary arithmetic operators (#1965)
Resolves issue #1960

[ROCm/clr commit: 09ffe4365d]
2020-03-26 17:09:00 +05:30
Joseph Greathouse 8ce72c7f06 Fix cooperative launch APIs to set hipGetLastError (#1935)
* Fix cooperative launch APIs to set hipGetLastError

Previously, the cooperative launch APIs did not properly log their
errors in the global hipGetLastError variable before returning back
to the user. As such, the APIs would leave hipSuccess in the
last error, which would break some use cases.

This fixes that problem by making a trampoline function that does
the HIP_INIT_API and ihipLogStatus.

* Add missing flag to the log of multi-GPU launch

[ROCm/clr commit: 341ef7fdca]
2020-03-25 14:39:24 -07:00
Nick Curtis 57fc126456 Update hip_runtime_api.h (#1966)
Correct URL for deprecated api list

[ROCm/clr commit: bf2fcce488]
2020-03-23 10:16:24 -07:00
Yaxun (Sam) Liu 5fffd89ae8 Workaround for libc++ include path for HIP-Clang (#1917)
HIP-Clang cuda_wrapper headers require clang include path before standard C++ include path.
However libc++ include path requires to be before clang include path.
To workaround this, we pass -isystem with the parent directory of clang include
path instead of the clang include path itself.

[ROCm/clr commit: 0307ae4c9a]
2020-03-18 11:20:21 +05:30
Jatin Chaudhary 6d39b6fbb8 Adding Half Abs APIs (#1902)
[ROCm/clr commit: 8a3ce17ba6]
2020-03-17 14:13:19 +05:30
Sameer Sahasrabuddhe 4d9df4192e enable HCC printf when using hip-clang (#1947)
This allows printf to work with hip-clang and HCC runtime. See comments under #1919 for a reported bug and feature request.

[ROCm/clr commit: 446a9e82e2]
2020-03-17 14:03:27 +05:30
Joseph Greathouse 7adeaffd61 Fix compiler warning on NVCC path (#1942)
GCC emits a warning about using static functions like
hipCUDAErrorTohipError inside this function, because it has an
inline directive, but it's not static. Adding static to this function
to silence warnings (and prevent potential problems in the future).

[ROCm/clr commit: dc9ecf03f8]
2020-03-17 14:02:59 +05:30
Joseph Greathouse 43c687a5e8 Fix occupancy calculations API on NVCC (#1941)
NVCC warned if you tried to use hipOccupancyMaxActiveBlocksPerMultiprocessor
because when passing in a device function pointer, "const void* func" was
insufficient to describe it accurately. Adding a C++ templated class type
definition for this function.

[ROCm/clr commit: 7f49e47217]
2020-03-17 14:02:48 +05:30
Sarbojit2019 8e7109d9ee Fix __sad signature match with Cuda (#1936)
Fix for issue #1930

[ROCm/clr commit: 5ddb9e1eb7]
2020-03-17 14:02:00 +05:30
Aryan Salmanpour 518130a0b7 [HIP] add cooperative kernel launch APIs on NVCC (#1929)
[ROCm/clr commit: e509a6d0b4]
2020-03-17 14:01:11 +05:30
Maneesh Gupta 91546b6c9f Annotate __constant__ (#1901)
[ROCm/clr commit: e8bd9768d1]
2020-03-17 13:59:44 +05:30
mhbliao b8f9f9598b [hip] Improve the portability of the header for vector type support. (#1873)
- Need to check the availability of `__has_attribute` builtin macro
  instead of compiler versions. That's more reliable and portable among
  various compilers.
- Provides a very basic support of vectors for unknown compilers.

[ROCm/clr commit: fc223dc584]
2020-03-17 13:59:24 +05:30
Evgeny Mankov c50f579660 Merge pull request #1908 from asalmanp/prop_mulit_coop
[HIP] add hip specific properties for cooperative kernel multi device

[ROCm/clr commit: 21ccb0be01]
2020-03-12 19:12:11 +03:00
Alex Voicu 8acb4eaa33 Merge branch 'master' of https://github.com/ROCm-Developer-Tools/HIP into feature_robust_constant
[ROCm/clr commit: b9544eabe8]
2020-03-12 14:20:26 +00:00
Maneesh Gupta 666f217a6a Expose support for non-returning atomic FADD (#1909)
Change-Id: If5359488324477315a9bd4f308a75f606c065b39

[ROCm/clr commit: af933d0900]
2020-03-11 14:33:15 +05:30
Nick Curtis cf2629a95c Fix incorrect shfl_xor for Windows
copy/paste error, need __shfl_xor w/ lane_mask

[ROCm/clr commit: a9af4755cb]
2020-03-10 12:04:05 -05:00
Sameer Sahasrabuddhe 988b489efd separate printf declaration for vdi/clang
There are now two implementations of printf in HIP:

1. The implemenation for HCC is controlled by the HC_FEATURE_PRINTF
   macro, and it works only with the HCC compiler used in combination
   with the HCC runtime.

2. The implementation for hip-clang requires the VDI runtime, and is
   always enabled with that combination.


[ROCm/clr commit: 2c3dfdda41]
2020-03-09 09:40:05 +05:30
Aryan Salmanpour 4146f75d46 move new enums to the end to maintain compatibility
[ROCm/clr commit: ddd0b31d16]
2020-03-06 11:38:44 -05:00
Maneesh Gupta 8def98b74e Expose support for non-returning atomic FADD
Change-Id: If5359488324477315a9bd4f308a75f606c065b39


[ROCm/clr commit: 48f5524fdc]
2020-03-05 10:30:52 +05:30
Aryan Salmanpour a582f9797e [HIP] add hip specific properties for cooperative kernel multi device
[ROCm/clr commit: 7bfb990ef7]
2020-03-03 13:25:36 -05:00
Alex Voicu 6adaa5dec3 Annotate __constant__
[ROCm/clr commit: 3441cd7f16]
2020-02-28 22:54:00 +02:00
saleelk 21712e6fb8 Fix HIPRTC headers to export C style symbols (#1879)
[ROCm/clr commit: 40a28e767e]
2020-02-28 16:47:29 +05:30
Rahul Garg 7395bf9ba9 Remove deprecated HIP markers (#1876)
[ROCm/clr commit: 6be7537cf9]
2020-02-28 16:47:15 +05:30
Rahul Garg ff421fb2d2 Add hipDrvOccupancyMaxActiveBlocksPerMultiprocessor[WithFlags] (#1854)
Equivalent to cuOccupancyMaxActiveBlocksPerMultiprocessor[WithFlags].

[ROCm/clr commit: 1c794045e0]
2020-02-28 16:46:55 +05:30
Nick Curtis e5d029b8a4 fix long shuffle implementations for windows (#1895)
Fixes for SWDEV-223694

[ROCm/clr commit: a094c87038]
2020-02-26 15:53:56 +05:30
Rahul Garg 6f1d14c96d Fix hipMemcpy3D (#1798)
Fixes #1790 and #1791. hipMemcpy3D still requires further refactoring for different input and output combinations.

[ROCm/clr commit: ec84c16d75]
2020-02-17 19:35:35 +05:30
Nick Curtis e9ee5a3719 Implement long / long long shuffles (#1829)
Implement additional data-types for shuffles (long and long long).
Based upon the double implementation.


[ROCm/clr commit: 5b0f34c59b]
2020-02-15 09:51:09 +05:30
ansurya 708af7e6ac Reduce GPU copying based on arch it runs on (#1751)
Implements SWDEV-213230.

[ROCm/clr commit: 888a7f2a90]
2020-02-13 14:21:51 +05:30
Aryan Salmanpour 89cb17284b fix build error in nvcc path
[ROCm/clr commit: 1c013bab3e]
2020-02-11 12:16:51 -05:00
Aryan Salmanpour e7059e518d Fix a typo causing a build error
[ROCm/clr commit: 504412c1e4]
2020-02-10 11:44:40 -05:00
Aryan Salmanpour 44ce519211 resolve merge conflict
[ROCm/clr commit: dfa565d76f]
2020-02-10 10:30:55 -05:00
Maneesh Gupta a21b1f84cb Revert "Match Occupancy APIs syntax with CUDA (#1625)" (#1857)
Reverting this for now till we figure out how to avoid the build
breakage.

This reverts commit 2c6e880e05.

[ROCm/clr commit: d032637934]
2020-02-10 10:45:28 +05:30
Alex Voicu 7f9f87b0d9 (Maybe) Match alignment between Clang and GCC. (#1789)
Should fix #1740 and the related internal bug.

[ROCm/clr commit: 8f96152d3a]
2020-02-10 10:44:49 +05:30
vsytch e2b6794a07 Device texture functions should not normalize the sampled pixel (#1826)
* Device texture functions should not normalize the sampled pixel. This is already done by HW.
* Add support to use h/w capability for normalized float data convertion for driver API's

Co-authored-by: ansurya <50609411+ansurya@users.noreply.github.com>


[ROCm/clr commit: fa363ae721]
2020-02-05 20:56:17 +05:30
Aryan Salmanpour cbefd62db9 code clean up
[ROCm/clr commit: 75572a4175]
2020-01-31 13:08:25 -05:00
Aryan Salmanpour 2733df36b5 [HIP][HIPIFY] Add some missing flags for cooperative launch and occupancy APIs
[ROCm/clr commit: 6db9b782be]
2020-01-30 15:05:53 -05:00
satyanveshd 2c6e880e05 Match Occupancy APIs syntax with CUDA (#1625)
* Match Occupancy APIs syntax with CUDA and fix tests using these APIs


[ROCm/clr commit: 262ad13dd5]
2020-01-29 13:05:53 -08:00
vsytch 4162b55dbe Add missing texturePitchAlignment member to the hipDeviceProp_t struct. (#1802)
* Add missing texturePitchAlignment member to the hipDeviceProp_t struct.

* Add missing hipDeviceAttributeTexturePitchAlignment enumerator to the hipDeviceAttribute_t enum.

* Initialize texturePitchAlignment to 256. This works for gfx9+, but is technically overaligned in most cases for pre-gfx9.

* Add the texturePitchAlignment property to the NVCC path.


[ROCm/clr commit: 6da0c82b78]
2020-01-27 16:37:00 -08:00
vsytch f1747af7cd Update the HIP_TRSF_* flags to match their Cuda equivalents. (#1801)
[ROCm/clr commit: e419a1609f]
2020-01-24 11:41:15 -08:00
mshivama a49cbb1580 SWDEV-220503: this_grid().thread_rank() gives incorrect result (#1808)
* fix a minor bug while computing this.grid()::thread_rank()

[ROCm/clr commit: 0605426049]
2020-01-24 16:23:28 +05:30
kpyzhov 2d617bba3b Don't use accelerated vector element access for hip-clang. (#1796)
[ROCm/clr commit: 1d6a2fb064]
2020-01-15 18:17:08 -08:00
kpyzhov 8bf4210095 Add missing constructors for Scalar_accessor class. (#1792)
[ROCm/clr commit: 0918614615]
2020-01-14 11:30:21 -08:00