Commit Graph

3971 Commitit

Tekijä SHA1 Viesti Päivämäärä
Sarbojit2019 1909e436cf Fix few memory leaks in HIP (#1969)
[ROCm/hip commit: f1b028b93e]
2020-03-27 14:08:30 +05:30
Jatin Chaudhary 32a9b2f2bb Packaging changes to bring them to sync with generated ones (#1918)
[ROCm/hip commit: 3805d7c5f2]
2020-03-27 14:08:12 +05:30
Aryan Salmanpour b5f7402c62 [hip] fix a build error when building hip with latest hcc (#1977)
there is a build error when building HIP with latest HCC from GitHub after PR#1935 merged into HIP master branch. this PR changed blockDimX to blockDim and two lines missed this change where added in the current PR.

[ROCm/hip commit: c8ca2355ae]
2020-03-26 17:10:42 +05:30
Nick Curtis c06bdfca62 Update hip_debugging.md (#1973)
Fix link formatting

[ROCm/hip commit: bb72abca20]
2020-03-26 17:09:56 +05:30
Sarbojit2019 59cf17fb32 Fix for __usad issue (#1972)
Fixes #1930

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

[ROCm/hip commit: 3d38135ae2]
2020-03-26 17:09:00 +05:30
Siu Chi Chan 9e5f7e3a3c Initialize all undef symbols with a magic poison (#1962)
[ROCm/hip commit: 8fefda2bb9]
2020-03-26 17:06:09 +05:30
Sarbojit2019 9e98e69b7a Fix for segfault seen if invalid kind is passed to hipMemcpy (#1937)
Fixes SWDEV-224941

[ROCm/hip commit: 3e363047d5]
2020-03-26 17:04:43 +05:30
Jatin Chaudhary 26b7d3e2ee [dtest] Adding VectorTest (#1732)
Adding unit test for operations of device vector types

[ROCm/hip commit: ee5fa8977c]
2020-03-26 17:03:43 +05:30
Evgeny Mankov ecd7d5798c [HIPIFY][doc] Update README.md: LLVM 10.0.0 Release is supported
[ROCm/hip commit: 37873d1204]
2020-03-26 11:07:43 +03:00
Paul Fultz II bbc1550bbb Fix path for hip-clang when using hipcc (#1961)
* Fix path for hip-clang when using hipcc

* Fix typo

* Update regex

[ROCm/hip commit: 855209abed]
2020-03-25 14:42:48 -07:00
Yaxun (Sam) Liu 069cca494a Add option --hipcc-func-supp for function support (#1957)
By default hipcc passes -mllvm options to let HIP-Clang inline all device functions.

--hipcc-func-supp enables function support and disables inline all.

--hipcc-no-func-supp disable function support and enables inline all.

This is a temporary solution to match HCC behavior for performance.

This option is mainly for debugging purpose.

Change-Id: I0c44ac1812bb3cea5c3e5b6e14ebaa45919236f6

[ROCm/hip commit: 3bef4e60ad]
2020-03-25 14:41:27 -07:00
Joseph Greathouse cb69c6037c 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/hip commit: f61b79d9a3]
2020-03-25 14:39:24 -07:00
Nick Curtis 15ea4194c4 Update hip_runtime_api.h (#1966)
Correct URL for deprecated api list

[ROCm/hip commit: b4c69a2e4a]
2020-03-23 10:16:24 -07:00
Yaxun (Sam) Liu 89cf7e2c4d Let hipcc treat .c program as C program (#1945)
nvcc treats .c program as C program and .cpp program as C++ program.

Currently hipcc treats .c and .cpp programs as HIP programs.

It is desirable to let hipcc behave like nvcc.

Currently it is not feasible to let hipcc treat .cpp programs as C++ program
since there are too many HIP applications use .cpp as extension for HIP programs.
However we should be able let hipcc treat .c program C program since there
are few applications use .c as extensioin for HIP programs.

[ROCm/hip commit: 28db1e4383]
2020-03-19 16:16:31 +05:30
Jeff Daily a2915ae475 fix hipStreamAddCallback, block future work on stream (#1934)
[ROCm/hip commit: 01d661b159]
2020-03-19 16:16:04 +05:30
nelsonc-amd d6d60529ce packaging: change Provides to use dash instead of underscore (#1913)
Addresses an installation problem for several HIP packages.
Packages builds have been tested locally, validation in progress.

[ROCm/hip commit: b757c2a891]
2020-03-19 16:15:09 +05:30
Evgeny Mankov 4bd8b4d462 [HIPIFY][perl] Fix missed sync with hipify-clang
[ROCm/hip commit: c9672b8de5]
2020-03-18 14:24:02 +03:00
Evgeny Mankov ebf3416037 [HIPIFY][SPARSE] sync with hipSPARSE's "added csrsm2" (#83)
+ https://github.com/ROCmSoftwarePlatform/hipSPARSE/pull/83
+ Update doc and hipify-perl accordingly


[ROCm/hip commit: 234eae9e92]
2020-03-18 13:44:50 +03:00
Evgeny Mankov e44184131f [HIPIFY][SPARSE] sync with hipSPARSE
+ Update doc and hipify-perl accordingly


[ROCm/hip commit: 5f6c8fa535]
2020-03-18 13:07:46 +03:00
Nagy-Egri Máté Ferenc 745ae6b9e7 Remove debug message (#1950)
[ROCm/hip commit: 7d47cc4150]
2020-03-18 11:20:53 +05:30
Aryan Salmanpour 799e2380a7 [HIP] use markers to sync cooperative and normal queues (#1948)
[ROCm/hip commit: 4acb0ea038]
2020-03-18 11:20:43 +05:30
Yaxun (Sam) Liu e05e7d063e 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/hip commit: 08d9759eba]
2020-03-18 11:20:21 +05:30
jglaser d783cc6650 Implement accurate max block size in hipFuncGetAttributes() (#1676)
This PR takes ensures that the maxThreadsPerBlock returned by hipFuncGetAttributes is both a multiple of the warp size and that the register usage of the maximum block does not exceed the number of available registers.

Fixes #1662

[ROCm/hip commit: b5e683a35d]
2020-03-18 11:20:06 +05:30
Paul Fultz II 8c59975bf5 Add missing flags for hip::device target on hip-clang (#1230)
This adds the missing compilation flags to hip::device so it can compile with hip-clang compiler.

[ROCm/hip commit: 58058091ad]
2020-03-18 11:18:58 +05:30
Evgeny Mankov 7ae7e07450 [HIPIFY][doc] Update README.md: LLVM 10.0.0-rc4 is supported
[ROCm/hip commit: b4bf6add33]
2020-03-17 18:51:46 +03:00
Jatin Chaudhary 1bc892c6f2 Adding Half Abs APIs (#1902)
[ROCm/hip commit: 16a6a94fbf]
2020-03-17 14:13:19 +05:30
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