Commit Graph

13402 Commits

Author SHA1 Message Date
German Andryeyev 8624574866 SWDEV-336024 - Clear device heap to 0
The heap must be cleared once per device, but ROCclr doesn't
create a queue per device in HIP. Hence, the clear operation will
be performed during the first queue creation.

Change-Id: I52ceb06d67d11cde6d019c5ab510059f426a9bfb


[ROCm/clr commit: 04bfd93569]
2022-05-11 11:03:56 -04:00
Chauncey Hui d63201c1d4 SWDEV-2 - Change OpenCL version number from 3462 to 3463
[ROCm/clr commit: 6c458c7534]
2022-05-11 03:00:08 -04:00
Tao Sang 1a9a5f9bfc SWDEV-319818 - Release restriction on hipResourceViewDesc
Let more types support hipResourceViewDesc.
Add missing symbols to fix cuda build failing.

Change-Id: Ife694cc6491427093863252e257e820b0bb4fa0f


[ROCm/clr commit: a19b767e8a]
2022-05-10 15:57:31 -04:00
Jeremy Newton b53cb9e585 SWDEV-336248 - Use public icd header
HIP uses icd_dispatch.h, which is not a public header. Using the public
CL/cl_icd.h removes inclusion of the private header.

This allows compiling HIP without relying on OCL ICD source, which makes
distributing a standalone ROCclr easier.

For WIN32, a few other headers are required.

Signed-off-by: Jeremy Newton <Jeremy.Newton@amd.com>
Change-Id: I0cab173b9753c5b0ab3be9222aa8bb0545cdeaab


[ROCm/clr commit: d04938a6ad]
2022-05-10 13:46:08 -04:00
Sourabh Betigeri 1171423bcf SWDEV-329829 - Fixes to return right error codes for respective negative scenarios
Change-Id: Icb615a336bb846df1cf2811316d88a0e88381da8


[ROCm/clr commit: 5fa514fea0]
2022-05-10 12:56:20 -04:00
Todd tiantuo Li c75c34f099 SWDEV-315047 - add Raphael(gfx1036) to OCLDeviceQueries
Change-Id: Iaa930c5ea9e39f9c44b1a5d737fc3520e9b6eca8


[ROCm/clr commit: 6c4ab575ca]
2022-05-10 02:37:42 -07:00
Christophe Paquot 2c3faaa3a0 SWDEV-322620 - Virtual Memory Management
Add a virtualMemoryManagement_ flag to device.info.

Change-Id: Iabd039010d83fc51b4bcef600c609f5c65e7b1ae


[ROCm/clr commit: b4645c7d4e]
2022-05-09 22:54:42 -07:00
Rakesh Roy 5a9a25fcb6 Revert "SWDEV-332606 - SWDEV-333585 - Fix hipMemcpySymbol* and hipGetSymbol* APIs"
This reverts commit 1ab7f22334 due to QMCPack test failure (SWDEV-335826)

Change-Id: I40397b345aa60f43afc17853bc72426daf385cf7


[ROCm/clr commit: 84c46047e5]
2022-05-10 11:20:36 +05:30
Alex Xie 9811bbaa4f SWDEV-328156 - Palamida scan remediation
Change-Id: I7e2ae4afea117630cfc43d2cd0f0fd6d98fe4f58


[ROCm/clr commit: aa8a31b1d8]
2022-05-09 19:24:09 -04:00
Jeremy Newton 90d46dc278 SWDEV-336248 - Don't exclude cl_egl.h from install
cl_icd.h includes cl_egl.h, but cl_egl.h is excluded from install. It
was reported by the community that including cl_icd.h would error due to
the missing cl_egl.h file.

I'm assuming that cl_egl.h was excluded because EGL isn't important for
ROCm. Since cl_icd.h has some important typedefs, it makes sense just
to include cl_egl.h, which seems to be a common practice in open source
projects.

Signed-off-by: Jeremy Newton <Jeremy.Newton@amd.com>
Change-Id: I506257c2dc51512ec8e11b1e5dadbe6e48ad785b


[ROCm/clr commit: e9dd848149]
2022-05-09 14:33:00 -04:00
Cordell Bloor 2e0b90e818 SWDEV-335902 - Fix HIP when Git info unavailable
Prior to this change, when Git_FOUND was false, HIP_VERSION_BUILD_ID
would be undefined in the CMake code. The value of HIP_VERSION_BUILD_ID
in <hip/hip_version.h> is taken from the CMake variable, so it was being
defined as nothing in those cases. That would cause compilation failures,
as src/hip_global.cpp contains the function:

    size_t amd_dbgapi_get_build_id() {
      return HIP_VERSION_BUILD_ID;
    }

which would become

    size_t amd_dbgapi_get_build_id() {
      return ;
    }

after preprocessing. To prevent this, we can define the version
information to a default value when Git is not found.

A related problem was reported by Harmen Stoppels in
https://github.com/ROCm-Developer-Tools/HIP/pull/2218. When Git
is not available (or if the library is being built from a tarball),
the HIP_VERSION_GITHASH is not defined. This causes trouble because
HIP_LIB_VERSION_STRING is defined as "X.Y.Z-${HIP_VERSION_GITHASH}"
and therefore becomes "X.Y.Z-".

The incomplete version string becomes a problem when it is appended
to the shared library file name. File names that end with '-' confuse
the linker. They cause strange errors when attempting to link to the
HIP library. This problem can be prevented by dropping the trailing
dash and using "X.Y.Z" as the version string when HIP_VERSION_GITHASH
is not defined.

Change-Id: I6e290c1f1b603ba30c9ded885e125d9ca9a2e688
Signed-off-by: Cordell Bloor <Cordell.Bloor@amd.com>


[ROCm/clr commit: 9c450d6f66]
2022-05-09 13:44:09 -04:00
Rakesh Roy b175689cd2 SWDEV-333598 - Use flags field of amd::Memory UserData for hip flags
Change-Id: I492c7fe54dba4380fcc53eed1df36bf5ac0af852


[ROCm/clr commit: 4e86d538e5]
2022-05-06 13:42:19 +05:30
Chauncey Hui f8a4c3c29f SWDEV-2 - Change OpenCL version number from 3461 to 3462
[ROCm/clr commit: 61895fb39b]
2022-05-06 03:00:04 -04:00
Rakesh Roy 52f85f8475 SWDEV-333598 - Add flags field in amd::Memory UserData
Change-Id: Ie4d59fa34486679fde1027dd113573bda3e7c65c


[ROCm/clr commit: ac2c3b5cad]
2022-05-05 12:24:53 -04:00
Chauncey Hui 324686c9d2 SWDEV-2 - Change OpenCL version number from 3460 to 3461
[ROCm/clr commit: 04b860a20e]
2022-05-05 03:00:05 -04:00
Ajay ac11c96cc2 SWDEV-334340 - clangRTlib detection in windows sample
Change-Id: I2bc65d32a7e8a9b31982f21a6b74e3f0a1e01688


[ROCm/clr commit: 88163bd884]
2022-05-04 20:49:20 +00:00
kjayapra-amd ae0b32126b SWDEV-331355 - Fixing the surface object on fillMemory function call.
Change-Id: Ieaa359ea8f31b0251d54b720469cdefde202579f


[ROCm/clr commit: 643ee46f28]
2022-05-04 14:24:03 -04:00
Alex Xie 9f1fcb23e9 SWDEV-333966 - [Lnx]image test fail
OCLCreateImage test passed when the image was not supported at all.
Add a warning.
For ASIC without image support, let the test pass.

Change-Id: I13c015561a51879f052c2c2d56c672ffbdbe0641


[ROCm/clr commit: 0d29a523d3]
2022-05-03 12:47:26 -04:00
German Andryeyev 6a225063d4 SWDEV-335142 - Increase max dispatch limit for capture
Change-Id: I929808476a75f4c360cd9368b777e1a0109fdb82


[ROCm/clr commit: 8e5205bb3a]
2022-05-02 15:59:25 -04:00
Chauncey Hui ac7759dd78 SWDEV-2 - Change OpenCL version number from 3459 to 3460
[ROCm/clr commit: fe84b3116c]
2022-04-30 03:00:07 -04:00
Jaydeep Patel 342d552ba7 SWDEV-333848 - Regression fix
Change-Id: I328770d5c51418c7f5bcb73696c81311d8dc3aef


[ROCm/clr commit: 118fad741a]
2022-04-29 13:27:46 -04:00
Saleel Kudchadker d9c2aee526 SWDEV-334152 - Set release as systemscope
Set release scope as system for dispatch AQL when events are passed to
hip*LaunchKernelGGL*

Change-Id: I93b91591e0ab023f1ecc5247f7905eca26147358


[ROCm/clr commit: 02566677cf]
2022-04-29 13:19:29 -04:00
sdashmiz 3e667fc98f 200~SWDEV-333583 : hipMallocArray bad channel format
- channel format should be consistent accross parameters

Signed-off-by: sdashmiz <shadi.dashmiz@amd.com>
Change-Id: I1e7680ab9262a66e7bea4aaa21f061044b0f7956


[ROCm/clr commit: 8ed471f210]
2022-04-29 09:15:41 -04:00
Joseph Greathouse 693fa73f53 SWDEV-332811 - Clean up and extend HIP unsafe atomic add
Update HIP's unsafeAtomicAdd to:
 - Compile properly even when not compiling for gfx90a
 - Fall back to safe atomic add on non-gfx90a architectures
 - use flat atomic add for FP64 on gfx90a, instead of dynamically
   checking memory spaces.

In addition, when the compiler is passed -munsafe-fp-atomics, it
will define __AMDGCN_UNSAFE_FP_ATOMICS__. When this happens, the
compiler is requesting that the HIP headers force all HIP
atomicAdd() calls on floats or doubles to use their unsafe versions.

This patch thus causes unsafeAtomicAdd() calls when that define
is seen. This call to unsafeAtomicAdd() is also done for atomicSub(),
since that calls atomicAdd underneath. This is not done for
system-scope atomicAdd because, on gfx90a, system-scope atomic FP
add instructions would need to target fine-grained memory, which is
always unsafe.

This patch also creates safeAtomicAdd() functions for float and double.
These functions will create a standalone safe atomic, even when the
application is compiled with -munsafe-fp-atomics.

Finally, this patch adds wrappers in the Nvidia path of HIP so that
these HIP functions call through to atomicAdd there as well.

Change-Id: I8af0621d3d28ea30c9278bfeea7393d03bbdac6d


[ROCm/clr commit: f68149eafd]
2022-04-29 07:19:58 -04:00
Sarbojit Sarkar 3a0462c981 SWDEV-330649 - Fix for QCD app crash
Change-Id: If85eb06083d2f7dbe69cde6fbd5ac54979d25693


[ROCm/clr commit: 2f973fb38b]
2022-04-29 05:37:33 -04:00
Chauncey Hui 79084d9dc3 SWDEV-2 - Change OpenCL version number from 3458 to 3459
[ROCm/clr commit: 4e225346fa]
2022-04-29 03:00:09 -04:00
Saleel Kudchadker 29752a2bbc SWDEV-334150 - Force callback to cycle commands
Enqueue a handler callback for hipEventRecords(aka marker_ts_) for every
64 submits, This recycles the memory if we dont end up calling
synchronize for the longest time.

Change-Id: I3d39fe76d52a5d81387927edd85b5663b563682c


[ROCm/clr commit: fa76f03654]
2022-04-28 12:30:23 -04:00
German Andryeyev d5bc650de9 SWDEV-307184 - Fix a regression from dafc64ea
Disable hostcall buffer in OCL for now. COv5 can add hostcallbuffer
metadata for unknown reason. OCL may fail the buffer allocation
and kernel launch.

Change-Id: I34a6a45bac86c57422b764c0d69760c96920d6c5


[ROCm/clr commit: 934149ff0a]
2022-04-28 11:57:48 -04:00
Satyanvesh Dittakavi a6f1bde5d7 SWDEV-330667 - SWDEV-333599 - Fix hipHostRegister and hipMallocPitch APIs
- hipHostRegister should return hipErrorInvalidValue when size is 0 or
size doesn't match the actual allocated size
- hipMemAllocPitch should return hipErrorInvalidValue when width or height
is 0 and elementSizeBytes should be 4, 8 or 16

Change-Id: I43c9fe4ac1ef0a6ac2f953908d301508a7bc5aa3


[ROCm/clr commit: 06203c251e]
2022-04-28 13:07:08 +00:00
Chauncey Hui 3519b49cca SWDEV-2 - Change OpenCL version number from 3457 to 3458
[ROCm/clr commit: 75bc2d75a0]
2022-04-28 03:00:03 -04:00
Christophe Paquot c2b3dd7dc5 SWDEV-322620 - Virtual Memory Management
Implemented hipMemMap and hipMemUnmap

Change-Id: Idc75e3964d88e375e445733557cfa8e421688f1f


[ROCm/clr commit: 6d73282f25]
2022-04-28 02:14:14 -04:00
haoyuan2 6ed700cca8 SWDEV-333187 - Support IPC in HIP runtime on Windows
enable shared memory based IPC

Change-Id: Ic1ad8d426863c2137747a3d468fe02d073f5d248


[ROCm/clr commit: 424c4ce5c4]
2022-04-27 23:05:56 -04:00
haoyuan2 558467643d SWDEV-333187 - Support IPC in HIP runtime on Windows
enable shared memory based IPC

Change-Id: I2657ef4713240b6f82a34f416d53f222630263ca


[ROCm/clr commit: 59b1ae0a79]
2022-04-27 11:14:59 -07:00
Julia Jiang 1d74dfe1d5 SWDEV-334574 - Rename _bkendDevice in VDI
Change-Id: I1c04dad226e08f02bca11fa0d1981fafa7ea2d2a


[ROCm/clr commit: b7c7917256]
2022-04-27 11:21:24 -04:00
Chauncey Hui 21dcdac493 SWDEV-2 - Change OpenCL version number from 3456 to 3457
[ROCm/clr commit: 77b5ca79bb]
2022-04-27 03:00:11 -04:00
pghafari 0ddbd07e0c SWDEV-327960, SWDEV-316901 - Adding Graph checks
hipGraphExecMemcpyNodeSetParamsToSymbol, fix for functional cases
failing as well

Change-Id: I9f263778f6b24e3ec35a78231a17e01c0d44f23a


[ROCm/clr commit: 63f23ec2b0]
2022-04-26 21:04:32 -04:00
Ajay 12df44b4fc SWDEV-332522 - ipcEvents Avoid deadlock b/w streamWait & Event
Using device write to set 0 to signal while streamWaitEvent is checking
the signal.
Use app in SWDEV-314307 to verify this fix
Requires vdi #668012 change to work

Change-Id: Ie329a29cfaeb5d144b92cda36773646f913ca73d


[ROCm/clr commit: 1abd0d6ecf]
2022-04-26 11:59:01 -04:00
Sarbojit Sarkar 8649f60ad7 SWDEV-333438 - Fix for hipEnablePeerAccess segfault
Change-Id: I60720d1d9b9c522d15fe17dcfbc609571a4fd266


[ROCm/clr commit: 6b15e0a1cc]
2022-04-26 05:21:52 -04:00
Chauncey Hui 1c350ebb3f SWDEV-2 - Change OpenCL version number from 3455 to 3456
[ROCm/clr commit: 8cffe6d427]
2022-04-26 03:00:06 -04:00
Ajay 9fcc7a7219 SWDEV-332522 - streamOpsWrite & streamOpsWait to accept memory offset
Change-Id: I4b6ecb4d80c093d038d86616a637c4bb465ae24e


[ROCm/clr commit: d2f837d25f]
2022-04-25 14:59:36 -04:00
German Andryeyev eccf328c14 SWDEV-307184 - Make sure runtime passes CO version into comgr
Disable devlib linking when runtime links multiple objects from
the app. Otherwise devlibs will be linked twice and may cause
undefined behavior with COv5.

Change-Id: I3b8640c64ff898893225fe3af5b4b4a32d42bf40


[ROCm/clr commit: c275d9b4b3]
2022-04-25 09:53:59 -04:00
Satyanvesh Dittakavi 1ab7f22334 SWDEV-332606 - SWDEV-333585 - Fix hipMemcpySymbol* and hipGetSymbol* APIs
- hipMemcpy[From/To]Symbol APIs to return hipErrorInvalidMemcpyDirection
if the copy kind is incorrect
- hipGetSymbolSize and hipGetSymbolAddress APIs to return hipErrorInvalidValue
if the pointer is null

Change-Id: I32f428045c804b1e4f648e91b507f749f60c09d0


[ROCm/clr commit: f1fb612774]
2022-04-25 08:25:29 -04:00
Chauncey Hui 5cf90722a3 SWDEV-2 - Change OpenCL version number from 3454 to 3455
[ROCm/clr commit: f80769ef1a]
2022-04-25 03:00:05 -04:00
Jason Tang 7bdbf61a9d SWDEV-324411 - Use blit kernel for copyBufferRect if atomic is not supported
Change-Id: I2e110fd3418117ee9c7ede379244d2c6c4f248b7


[ROCm/clr commit: ed7737564e]
2022-04-24 11:41:16 -04:00
Jason Tang 9e85fabc48 SWDEV-1 - Set CMAKE_POSITION_INDEPENDENT_CODE to ON
Change-Id: I95e4166e9fa96bde10a54a4842becce4ab554b22


[ROCm/clr commit: daf33f9d38]
2022-04-23 16:13:49 -04:00
Chauncey Hui 1609b1085b SWDEV-2 - Change OpenCL version number from 3453 to 3454
[ROCm/clr commit: 62deade03f]
2022-04-23 03:00:05 -04:00
Christophe Paquot 5f42bfd145 SWDEV-322620 - Virtual Memory Management
Implement map/unmap for PAL backend
Create commands since PAL uses the IQueue to map/unmap

Change-Id: I97e26a7d28ae5e10774c9ca65307153100945621


[ROCm/clr commit: 67657d6099]
2022-04-22 18:09:26 -04:00
Saleel Kudchadker f464cdacf4 SWDEV-333237 - Release command before queing a marker
Change-Id: I5343c4b7ade2dc68efa7454a919a6657726c45d3


[ROCm/clr commit: ddfd919a62]
2022-04-22 12:58:58 -04:00
sdashmiz dafc64ea0a SWDEV-204804 - Detecing pcie atomic support
- check pcie atomci support for printf functionality
- if not enabled printf wont work

Signed-off-by: sdashmiz <shadi.dashmiz@amd.com>
Change-Id: Ib366e8e71772b02210c4a830bca4bd8cc7a11664


[ROCm/clr commit: 15f1632dfa]
2022-04-22 08:53:16 -04:00
Chauncey Hui 4d04262d2c SWDEV-2 - Change OpenCL version number from 3452 to 3453
[ROCm/clr commit: b3a3779a06]
2022-04-22 03:00:05 -04:00