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

3944 Коммитов

Автор SHA1 Сообщение Дата
zhaozhangjian 72e4677aae fix a bug when initializing a vector of hipFunction_t (#1949)
[ROCm/hip commit: 7c8b8d24ef]
2020-03-17 14:05:07 +05:30
Sameer Sahasrabuddhe 7ab3583c60 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/hip commit: 899c878703]
2020-03-17 14:03:27 +05:30
Joseph Greathouse 504ba0a4c9 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/hip commit: f7e85649f4]
2020-03-17 14:02:59 +05:30
Joseph Greathouse 122c2f9034 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/hip commit: 4128d68ed7]
2020-03-17 14:02:48 +05:30
Reshabh Sharma 8268ddab28 Output file name should not change flags picked for compiler (#1938)
Fixes SWDEV-207362,

The output file name should not contribute to picking up the right flags for the compiler. This fix solves issues when the output has conflicting extensions which confuses hipcc to treat them as the source files and add the required flags for them.

PS: Output file refers to the file followed by -o

Example: hipcc test.o -o test.hip will add the flags for .hip compilation ignoring the fact that it is an output file

[ROCm/hip commit: 7bcfdf017d]
2020-03-17 14:02:14 +05:30
Sarbojit2019 0310e4d7f8 Fix __sad signature match with Cuda (#1936)
Fix for issue #1930

[ROCm/hip commit: 320742e8a0]
2020-03-17 14:02:00 +05:30
Joseph Greathouse 62b9e8f1b2 Fix detection of support for cooperative groups (#1932)
Query ROCr to see if we have the proper lower-level support for
cooperative groups -- GWS support through the firmware, driver,
thunk, and ROCr. ROCr does these checks for us, and presents a
query that allows us to see if GWS entries are available for use.
If so, then we have all the lower-level technologies needed, and
we should enable cooperative groups support for HIP.

[ROCm/hip commit: 18e6c529bc]
2020-03-17 14:01:44 +05:30
Reshabh Sharma 72160882ca Don't force compiler to treat libhip_hcc.so as a text file (#1931)
Fixes SWDEV-226025,

Right now -x c++ can come before libhip_hcc.so which forces the compiler to treat libhip_hcc.so as a text file and generates a lot of gibberish unicode. This PR changes the order of flags ensuring that -x c++ and similar flags come after libhip_hcc.so
Hopefully, this will not have any negative side effect.

[ROCm/hip commit: bbbb8bf1e6]
2020-03-17 14:01:33 +05:30
Aryan Salmanpour 03654845a4 [HIP] add cooperative kernel launch APIs on NVCC (#1929)
[ROCm/hip commit: 015895a265]
2020-03-17 14:01:11 +05:30
Joseph Greathouse 0d31e51bc9 Fix maxSharedMemoryPerMultiProcessor attribute (#1927)
The maxSharedMemoryPerMultiProcessor attribute is meant to describe
the number of bytes of shared memory (LDS space in AMD terminology)
in each SM (CU in AMD terminology). For instance, on AMD GPUs this
is often 64KB per CU, and some Nvidia GPUs it's 96KB per SM.

This shared memory is a different address space from the normal
global memory. However, the current HIP-HCC properties fill this
in with a size that matches the totalGlboalMem property. This gives
a drastically too-high calculation for the amount of LDS space that
each CU has -- tens of GBs vs. 10s of KBs.

This patch fixes this by pulling the maxSharedMemoryPerMultiProcessor
property from the HSA pool that describes how much workgroup-local
space is available on each CU. The HSA runtime eventually pulls
this from the topology information about LDSSizeInKB, defined as
"Size of Local Data Store in Kilobytes per SIMD".

Previously, this HSA query was used to fill in the value of the
sharedMemPerBlock property. On today's AMD GPUs, we know that
the amount of LDS avaialble to the workgroup is identical to the
amount of LDS space in the CU. However, in the future this may
differ. As such, this patch changes around the order and fills
in the "PerMultiProcessor" property from the HSA query (since
what's what the query is defined to return), and then separately
fills in the "PerBlock" property as we know it.

[ROCm/hip commit: 55e55e78bb]
2020-03-17 14:00:51 +05:30
Joseph Greathouse 753763e163 Fix errors in occupancy calculation function (#1926)
Fix two errors in hipOccupancyMaxActiveBlocksPerMultiprocessor.
1) Fix a possible segfault if the user passed in a null pointer for
   the numBlocks value.
2) Handle the situation when the user is asking for a block size
   that is larger than what the target device can hold within a
   single block.

[ROCm/hip commit: bf04d7380a]
2020-03-17 14:00:38 +05:30
Yaxun (Sam) Liu 20191a4057 Let hipcc not pass -mllvm option to HIP-Clang on Windows (#1924)
Currently there is a clang bug on Windows causing duplicate -mllvm options in clang -cc1.

Tempoarily disable -mllvm options for HIP-Clang on Windows until the bug is fixed.

Change-Id: I3a4393ba7745989398dc6c6001722837dad18704

[ROCm/hip commit: 7aa9611689]
2020-03-17 14:00:20 +05:30
Maneesh Gupta 8feab1161e Annotate __constant__ (#1901)
[ROCm/hip commit: eee5cc8621]
2020-03-17 13:59:44 +05:30
mhbliao e0da34b5b1 [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/hip commit: 774035d869]
2020-03-17 13:59:24 +05:30
Evgeny Mankov 8b0983389c Merge pull request #1916 from asalmanp/refactor_cooperative_APIs
[HIP] Refactor cooperative APIs

[ROCm/hip commit: 821c60a3d9]
2020-03-12 19:12:50 +03:00
Evgeny Mankov 6039400c04 Merge pull request #1908 from asalmanp/prop_mulit_coop
[HIP] add hip specific properties for cooperative kernel multi device

[ROCm/hip commit: 70f5646f8a]
2020-03-12 19:12:11 +03:00
Alex Voicu 8cecdaa704 Merge branch 'master' of https://github.com/ROCm-Developer-Tools/HIP into feature_robust_constant
[ROCm/hip commit: 1c5f526e6b]
2020-03-12 14:20:26 +00:00
Maneesh Gupta d44d5f8cdd Expose support for non-returning atomic FADD (#1909)
Change-Id: If5359488324477315a9bd4f308a75f606c065b39

[ROCm/hip commit: 0726abf424]
2020-03-11 14:33:15 +05:30
srinivamd 7c0635dbf1 return hipSuccess when count is zero (#1900)
[ROCm/hip commit: 65a790bc08]
2020-03-11 14:32:54 +05:30
Evgeny Mankov 808cf888c0 Merge pull request #1925 from arghdos/patch-3
Fix incorrect shfl_xor for Windows

[ROCm/hip commit: f98ce58e06]
2020-03-11 00:58:11 +03:00
Aryan Salmanpour 7327f6a756 [HIP] return an error if blockDim exceeds maxThreadsPerBlock
[ROCm/hip commit: b663fccf0b]
2020-03-10 15:26:53 -04:00
Evgeny Mankov ef7f9eba59 Merge pull request #1922 from emankov/HIP
[HIP][doc] Update README.md

[ROCm/hip commit: da8669ea03]
2020-03-10 22:20:00 +03:00
Nick Curtis 98b7cb62aa Fix incorrect shfl_xor for Windows
copy/paste error, need __shfl_xor w/ lane_mask

[ROCm/hip commit: 09edc7e49c]
2020-03-10 12:04:05 -05:00
Evgeny Mankov f5a087409e [HIP][doc] Update README.md
[ROCm/hip commit: fea3017168]
2020-03-10 18:04:01 +03:00
Aryan Salmanpour c39d9f8f7b [HIP] fix formatting/code clean up and fix a bug
[ROCm/hip commit: 5494f5b247]
2020-03-09 16:03:59 -04:00
Sameer Sahasrabuddhe 07abb2d633 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/hip commit: 09130b3b92]
2020-03-09 09:40:05 +05:30
Alex Voicu 234566828b Merge branch 'master' of https://github.com/ROCm-Developer-Tools/HIP into feature_robust_constant
[ROCm/hip commit: c7f7ada0e9]
2020-03-08 18:00:14 +00:00
Aryan Salmanpour c25dd0ca3d [HIP] Refactor cooperative APIs
[ROCm/hip commit: 4844fbdf0a]
2020-03-06 18:30:12 -05:00
Aryan Salmanpour feb28352cb move new enums to the end to maintain compatibility
[ROCm/hip commit: 7e45c54ea6]
2020-03-06 11:38:44 -05:00
Evgeny Mankov c48bf1b4b0 [HIPIFY][doc] Update README.md: LLVM 10.0.0-rc3 is supported
+ Add -DLLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN=ON for LLVM 10.0.0 or newer
+ Supported versions update


[ROCm/hip commit: dd5f3fd282]
2020-03-06 18:17:05 +03:00
Alex Voicu 5e6b51017e Merge branch 'master' of https://github.com/ROCm-Developer-Tools/HIP into feature_robust_constant
[ROCm/hip commit: 44e5834c8e]
2020-03-06 12:33:31 +02:00
Maneesh Gupta 08ed6ab780 Expose support for non-returning atomic FADD
Change-Id: If5359488324477315a9bd4f308a75f606c065b39


[ROCm/hip commit: 4a40010ac6]
2020-03-05 10:30:52 +05:30
Aryan Salmanpour df81136734 [HIP] add hip specific properties for cooperative kernel multi device
[ROCm/hip commit: 03797ae986]
2020-03-03 13:25:36 -05:00
Evgeny Mankov 82710c788a [HIP][cmake] Remove dependency from hipify-clang
[Reason] Upcoming hipify-clang's splitting out into a new repository https://github.com/ROCm-Developer-Tools/HIPIFY.


[ROCm/hip commit: 1561f61642]
2020-03-03 12:07:13 +03:00
Alex Voicu abbb594f7c Annotate __constant__
[ROCm/hip commit: 27480ff5a2]
2020-02-28 22:54:00 +02:00
Jatin Chaudhary 1ed7948498 [dtests] __shfl_up and __shfl_down tests (#1899)
[ROCm/hip commit: d29ad50464]
2020-02-28 16:48:15 +05:30
Siu Chi Chan 7a908a9a70 improve code object loading error message (#1889)
[ROCm/hip commit: 57edf48191]
2020-02-28 16:47:40 +05:30
saleelk 3c66b171e1 Fix HIPRTC headers to export C style symbols (#1879)
[ROCm/hip commit: 3e1f41c165]
2020-02-28 16:47:29 +05:30
Rahul Garg c34c9a4b4d Remove deprecated HIP markers (#1876)
[ROCm/hip commit: 6c5fa32815]
2020-02-28 16:47:15 +05:30
Rahul Garg 5229ffff99 Add hipDrvOccupancyMaxActiveBlocksPerMultiprocessor[WithFlags] (#1854)
Equivalent to cuOccupancyMaxActiveBlocksPerMultiprocessor[WithFlags].

[ROCm/hip commit: edc97f3073]
2020-02-28 16:46:55 +05:30
jiabaxie 39fd208ed2 Cleaned up error messages for HipEnvVarDriver test (#1825)
There were several error messages that appeared even if the hipEnvVarDriver.exe test passes and executes successfully. Now it is cleaned up. The following are those instances:

* When popen searches for directed_test directory but does not find it, it outputs an error, then finds the hipEnvVar at the same level. Currently the fix will prompt the test to only output an error if both searches for hipEnvVar fails.
* When assertion is used towards the later half of the test, conditions were set to specifically hide the devices, resulting in No Hip Device detected in the latter half of the test. The fix will make these errors not appear as they are intended to not find any devices. Assertions themselves are untouched.

HipEnvVarDriver.cpp has also been refactored. Reading HipEnvVar will now happen in a helper function for getDeviceNumber and getDevicePCIBusNumRemote, as the code to read HipEnvVar were really similar in them.


[ROCm/hip commit: af90312867]
2020-02-28 16:46:12 +05:30
Alex Voicu a5ad7bc67b Address post-staging issues in #1809 (#1894)
Fixes SWDEV-223910 and SWDEV-223663

[ROCm/hip commit: d830dad3be]
2020-02-27 16:21:12 +05:30
Maneesh Gupta b499822842 bump version to 3.2 (#1898)
- Bump version to 3.2
- [ci] Enable tests on ROCm 3.1

[ROCm/hip commit: 71e1f87f7e]
2020-02-27 16:18:31 +05:30
Nick Curtis 2715d1b036 fix long shuffle implementations for windows (#1895)
Fixes for SWDEV-223694

[ROCm/hip commit: b7dd073d93]
2020-02-26 15:53:56 +05:30
Yaxun (Sam) Liu 3067349909 Fix hipcc for extra -mllvm option (#1885)
[ROCm/hip commit: 69404d8e78]
2020-02-26 15:53:43 +05:30
Sarbojit2019 9a5658146d [HIPIFY] Add back missing execute permission to hipify-perl (#1881)
hipify-perl script lost its executable permission hence "samples/0_Intro/square" was failing. Fixes SWDEV 223433.

[ROCm/hip commit: c1a70707e0]
2020-02-19 13:48:20 +05:30
eshcherb 7103e8de5e adding hipExtModuleLaunchKernel to tracing layer (#1880)
[ROCm/hip commit: 82ec3c1c5b]
2020-02-19 13:47:49 +05:30
Alex Voicu 745a66c60e Tweak synchronous memcpy implementation (#1809)
The existing one can have issues on certain systems, therefore this limits use of direct memcpy via largeBAR to sizes where it is unequivocally better.

Also addresses SWDEV-220030 and SWDEV-222237.

[ROCm/hip commit: 9b4f39e1d8]
2020-02-18 20:50:27 +05:30
Yaxun (Sam) Liu 32297229da Let HIP-Clang inline all functions by default (#1875)
This is a quick workaround to match HCC behavior for performance since inlining usually
results in more optimization opportunities therefore better performance.

We will fine tuning inline threashold later.

[ROCm/hip commit: 92cc29ae2b]
2020-02-17 22:49:26 +05:30
Rahul Garg f1746197c7 Fix hipMemcpy3D (#1798)
Fixes #1790 and #1791. hipMemcpy3D still requires further refactoring for different input and output combinations.

[ROCm/hip commit: 8c5e5e435b]
2020-02-17 19:35:35 +05:30