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

6428 Коммитов

Автор SHA1 Сообщение Дата
Evgeny Mankov ee15f951b4 Merge pull request #1955 from emankov/hipify-clang
[HIPIFY][perl] Fix missed sync with hipify-clang
2020-03-18 14:30:11 +03:00
Evgeny Mankov c9672b8de5 [HIPIFY][perl] Fix missed sync with hipify-clang 2020-03-18 14:24:02 +03:00
Evgeny Mankov 0f23a0b6db Merge pull request #1954 from emankov/hipify-clang
[HIPIFY][SPARSE] sync with hipSPARSE's "added csrsm2" (#83)
2020-03-18 13:46:05 +03:00
Evgeny Mankov 234eae9e92 [HIPIFY][SPARSE] sync with hipSPARSE's "added csrsm2" (#83)
+ https://github.com/ROCmSoftwarePlatform/hipSPARSE/pull/83
+ Update doc and hipify-perl accordingly
2020-03-18 13:44:50 +03:00
Jatin Chaudhary b68b2884ba Merge "Enable saxpy Test" into amd-master-next 2020-03-18 06:32:05 -04:00
Evgeny Mankov c0049002a2 Merge pull request #1953 from emankov/hipify-clang
[HIPIFY][SPARSE] sync with hipSPARSE
2020-03-18 13:09:21 +03:00
Evgeny Mankov 5f6c8fa535 [HIPIFY][SPARSE] sync with hipSPARSE
+ Update doc and hipify-perl accordingly
2020-03-18 13:07:46 +03:00
Nagy-Egri Máté Ferenc 7d47cc4150 Remove debug message (#1950) 2020-03-18 11:20:53 +05:30
Aryan Salmanpour 4acb0ea038 [HIP] use markers to sync cooperative and normal queues (#1948) 2020-03-18 11:20:43 +05:30
Yaxun (Sam) Liu 08d9759eba 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.
2020-03-18 11:20:21 +05:30
jglaser b5e683a35d 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
2020-03-18 11:20:06 +05:30
Paul Fultz II 58058091ad 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.
2020-03-18 11:18:58 +05:30
Sarbojit Sarkar 82926666c4 [hip-vdi]Fix for TF build failure [SWDEV-225827]
Change-Id: I8478779bef92bad8353b8d066b28c220bb59b98d
2020-03-17 22:52:01 -04:00
Vladislav Sytchenko 1b288456ae Enable simpleTexture2DLayered test for VDI
Change-Id: I420f68824c6825152ac50e5a129b11b6ad88deb9
2020-03-17 17:50:46 -04:00
Vladislav Sytchenko a605458a0c Enable hipNormalizedFloatValueTex test for VDI
Change-Id: Iac8631312f34821d919b69b3fcb92b9387ba31dd
2020-03-17 17:50:30 -04:00
Tao Sang 2827eb110e Merge "Fix failure to get global variables" into amd-master-next 2020-03-17 17:08:14 -04:00
Vladislav Sytchenko a0751402d8 Rework device texture headers
This change addresses three things.

First the available APIs are brought up to par with Cuda (missing ones are added and incorrect ones removed).

Second the size of hip/hcc_detail/texture_functions.h. Using some template magic we can bring down the code size down from ~11k lines to only ~900 lines in total.

Third this change fixes some bugs in the declaration of the texture fetch funcitons. Currently the return type for textures with read mode set to hipReadModeNormalizedFloat is not float. This causes pixel data to be lost during the bitcast when the texture pixel element size is less than the size of float.

The new headers will only be enabled for VDI to avoid breaking HCC.

Change-Id: I77cb29293fb79e55681be094c37702a48d80b64c
2020-03-17 17:04:37 -04:00
Vladislav Sytchenko cc134f7c58 Rework hipNormalizedFloatValueTex test
This is currently so buggy that it causes a runtime crash on Nvidia platfrom...

Disable the new version for hcc and vdi, header fixes are required for it to pass.

Currently tex1D<char, hipTextureType1D, hipReadModeNormalizedFloat> returns a char, when the actual sampled pixel value is a float, so the hi 3 bytes get lost.

Change-Id: I8222a4d8d1d8b101eb43f3f8dfbe4818f885f8ea
2020-03-17 17:04:17 -04:00
Saleel Kudchadker 9343eee07c Merge "libhiprtc.so needs to be installed in DEST dir" into amd-master-next 2020-03-17 16:17:55 -04:00
Tao Sang d432dbfe20 Fix failure to get global variables
Implement _ihipGetGlobalVar() and ihipGetGlobalVar() to
get global variables.

Change-Id: I442ab6712e12306c3316f114f5dc42f6daefaad9
2020-03-17 16:14:16 -04:00
Evgeny Mankov b4fdda02e2 Merge pull request #1951 from emankov/hipify-clang
[HIPIFY][doc] Update README.md: LLVM 10.0.0-rc4 is supported
2020-03-17 18:57:13 +03:00
Evgeny Mankov b4bf6add33 [HIPIFY][doc] Update README.md: LLVM 10.0.0-rc4 is supported 2020-03-17 18:51:46 +03:00
Vladislav Sytchenko c94160aafb Merge "Enable simpleTexture3D test for VDI" into amd-master-next 2020-03-17 11:41:05 -04:00
Jatin Chaudhary 16a6a94fbf Adding Half Abs APIs (#1902) 2020-03-17 14:13:19 +05:30
zhaozhangjian 7c8b8d24ef fix a bug when initializing a vector of hipFunction_t (#1949) 2020-03-17 14:05:07 +05:30
Sameer Sahasrabuddhe 899c878703 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.
2020-03-17 14:03:27 +05:30
Joseph Greathouse f7e85649f4 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).
2020-03-17 14:02:59 +05:30
Joseph Greathouse 4128d68ed7 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.
2020-03-17 14:02:48 +05:30
Reshabh Sharma 7bcfdf017d 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
2020-03-17 14:02:14 +05:30
Sarbojit2019 320742e8a0 Fix __sad signature match with Cuda (#1936)
Fix for issue #1930
2020-03-17 14:02:00 +05:30
Joseph Greathouse 18e6c529bc 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.
2020-03-17 14:01:44 +05:30
Reshabh Sharma bbbb8bf1e6 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.
2020-03-17 14:01:33 +05:30
Aryan Salmanpour 015895a265 [HIP] add cooperative kernel launch APIs on NVCC (#1929) 2020-03-17 14:01:11 +05:30
Joseph Greathouse 55e55e78bb 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.
2020-03-17 14:00:51 +05:30
Joseph Greathouse bf04d7380a 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.
2020-03-17 14:00:38 +05:30
Yaxun (Sam) Liu 7aa9611689 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
2020-03-17 14:00:20 +05:30
Maneesh Gupta eee5cc8621 Annotate __constant__ (#1901) 2020-03-17 13:59:44 +05:30
mhbliao 774035d869 [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.
2020-03-17 13:59:24 +05:30
Jatin 2dac197548 Enable saxpy Test
Change-Id: Iadb5f631e1cebaf016b1835510771b3b7fac0a55
2020-03-17 01:15:20 -04:00
Sameer Sahasrabuddhe 64cd527335 SWDEV-204784: 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.

Change-Id: Ibaeda7900ffe2ce602ca0094aafed0f1147ac2b6
2020-03-16 04:00:39 -04:00
Vladislav Sytchenko bfcce529fa Enable simpleTexture3D test for VDI
Change-Id: Ida65de6e1cae64ac97b624eaab1340877a6fba73
2020-03-13 18:34:39 -04:00
Saleel Kudchadker 9ecd0e79b6 libhiprtc.so needs to be installed in DEST dir
Change-Id: I3ae8b4f18a05a707b87fa73873c1721928ebe904
2020-03-12 12:23:36 -07:00
Jiabao Xie e7abc7a553 Cleaned include statements and deleted unnecessary operator overloads
Change-Id: I5eb322c05082e8f27584446af2f6a19243dc63c9
2020-03-12 14:13:01 -04:00
Evgeny Mankov 821c60a3d9 Merge pull request #1916 from asalmanp/refactor_cooperative_APIs
[HIP] Refactor cooperative APIs
2020-03-12 19:12:50 +03:00
Evgeny Mankov 70f5646f8a Merge pull request #1908 from asalmanp/prop_mulit_coop
[HIP] add hip specific properties for cooperative kernel multi device
2020-03-12 19:12:11 +03:00
Alex Voicu 1c5f526e6b Merge branch 'master' of https://github.com/ROCm-Developer-Tools/HIP into feature_robust_constant 2020-03-12 14:20:26 +00:00
Saleel Kudchadker ffcbd7e633 Merge "Fix P4 linux make builds" into amd-master-next 2020-03-11 16:17:18 -04:00
Maneesh Gupta 0726abf424 Expose support for non-returning atomic FADD (#1909)
Change-Id: If5359488324477315a9bd4f308a75f606c065b39
2020-03-11 14:33:15 +05:30
srinivamd 65a790bc08 return hipSuccess when count is zero (#1900) 2020-03-11 14:32:54 +05:30
Evgeny Mankov f98ce58e06 Merge pull request #1925 from arghdos/patch-3
Fix incorrect shfl_xor for Windows
2020-03-11 00:58:11 +03:00