Commit Graph

316 Commits

Author SHA1 Message Date
sdashmiz ed46e236d2 SWDEV-346423 - avoid race condition
- move removing the array from array set earlier to avoid race condition

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


[ROCm/clr commit: d0b9e0a4ff]
2022-07-25 15:17:10 -04:00
Sarbojit Sarkar bf38d72e0b SWDEV-346461 - Fix for QMCPack tes failure
Change-Id: I92979f0c16766c28da6b14b6e17364749fe39fe3


[ROCm/clr commit: 7d23707817]
2022-07-19 02:13:07 -04:00
Jaydeep Patel 40fda3cfe9 SWDEV-343168 - Clean ihipMallocPitch
Change-Id: Iab1c10ac2aea635ca10cc8bc98141df409ec917c


[ROCm/clr commit: 6b3b62f49e]
2022-07-14 01:15:08 -04:00
sdashmiz b0cbdea221 SWDEV-345021 - add check for pointer
add check for pAllocateArray

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


[ROCm/clr commit: 848ae2c06b]
2022-07-13 10:21:48 -04:00
Sarbojit Sarkar c9226df336 SWDEV-323441 - Phase-II : per thread default stream
Change-Id: I3c796ddaebcf0223d7faf50c425c1674de215f9d


[ROCm/clr commit: e9961fedd8]
2022-07-11 12:22:23 -04:00
Rakesh Roy 006c9b0ae8 SWDEV-344168 - Fix hipMemsetAsync API crash
- Return hipErrorInvalidValue if memset size + offset is crossing
  allocated memory size

Change-Id: I18bd7bcf90ccfce992acb4535a00a8560c0f684b


[ROCm/clr commit: 4e6e175f16]
2022-07-11 02:23:37 -04:00
Jaydeep 01e9429c97 SWDEV-343168 - return invalidValue if totalsize is more than device's global memory.
Change-Id: Ie052b9b75c9813d040fc23959df4146af98b96ed


[ROCm/clr commit: 4aa1ffcc45]
2022-07-11 02:18:54 -04:00
Ajay caa9b581b5 SWDEV-340506 - Unit_hipCreateTextureObject_Pitch2DResource fix
Change-Id: I85431036818a3eb24100b1660e806a1c80d847eb


[ROCm/clr commit: 01ea934b3e]
2022-07-07 13:05:08 -04:00
Rakesh Roy 2fcf335ee1 SWDEV-342007 - Fix hipArray Allocation APIs
- Capture error status of ihipImageCreate
- Return hipErrorOutOfMemory when image creation fails

Change-Id: If127a515447cc362d55fccd3eae304271da252d5


[ROCm/clr commit: 62069a5ae8]
2022-06-30 00:28:47 -04:00
Saleel Kudchadker 0899f2212d SWDEV-301667 - Early return if src == dst for 1D copy
Change-Id: Icaa334c6579bb5e70e92347f8bc37edcf5adf796


[ROCm/clr commit: cf07633dc8]
2022-06-28 14:21:40 -04:00
Jaydeep 4cc88db597 SWDEV-332607 - If pitch returned from hipMallocPitch is equal to pitch passed to hipMemset2D then height passed to hipMemset2D must be less than or equal to height passed to hipMallocPitch.
Change-Id: I5f9eb55cede5dff5a9e428d41fe081f043df7049


[ROCm/clr commit: 26d8603bf3]
2022-06-21 00:10:19 -04:00
Jaydeep 147485a9aa SWDEV-336548 - Check for valid hipArray pointer in hipFreeArray
Change-Id: Icf0d47eeca7b5dd390a6a9c53b622b3680688ca4


[ROCm/clr commit: 1032581ded]
2022-06-18 00:56:33 -04:00
Sourabh Betigeri 4501fb58b5 SWDEV-341994 - Fixes to returns the right error code to match CUDA spec for hipHostUnregister()
Change-Id: Ied9b5a15e841d4c201042d116b0ed535f07c17fc


[ROCm/clr commit: 3ca4c7edf7]
2022-06-17 12:16:52 -04:00
Jaydeep 4185c568da SWDEV-336542 - Return InvalidValue error for hipArrayCubemap flag.
Change-Id: I4ca996d7643158d5ccf8cb48ceaead3ceaf9aedf


[ROCm/clr commit: 0ad84364e0]
2022-06-17 00:25:18 -04:00
Jaydeep Patel 33a50636e9 SWDEV-333581 - Pass free and/or total size_t as nullptr.
Change-Id: Ib83467a351b6df22ef641c0e82284c7e0fac32e3


[ROCm/clr commit: a527c241a2]
2022-06-15 23:46:34 -04:00
haoyuan2 33ea8b153e SWDEV-338564 - fix test hang issue
only check task finish with valid queue

Change-Id: Ib2bd1360235a07f825a09c57453ccbff7951f17f


[ROCm/clr commit: cfe1efd6b0]
2022-06-14 15:34:30 -04:00
pghafari de626141ee SWDEV-337703 - nullptr check for hipMallocArray
Change-Id: I3b1077e236ccda346d337109014ef7fd2e693ec6


[ROCm/clr commit: 8e28413a9e]
2022-05-31 11:19:59 -04:00
pghafari 48350aea01 SWDEV-336550 - added nullptr check for svm
Change-Id: Icfd7dab1c7818958108385261542526d4545721d


[ROCm/clr commit: 2870b7ddd5]
2022-05-30 16:58:45 -04:00
Rakesh Roy 85f42de77c SWDEV-337119 - Validate width isn't exceeding either dpitch or spitch in
ihipMemcpy2D

Change-Id: I8ac68e033762616a42585b26f0b3aa5bbb29ce9c


[ROCm/clr commit: 01a5ddebe6]
2022-05-18 23:25:14 +05:30
Satyanvesh Dittakavi 23ba31d7bf SWDEV-332606 - SWDEV-333585 - Fix hipMemcpySymbol* and hipGetSymbol* APIs
This also fixes the QMCPack staging (SWDEV-335826) test failures related
to hipMemcpyToSymbol

Change-Id: Icc3ff04fb1e17999f5bddf12e1a7266e2289032f


[ROCm/clr commit: 8a333a989b]
2022-05-16 04:27:02 -04: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
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
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
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
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
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
Rakesh Roy cba04140c0 SWDEV-332603 - Check validity of ihipArrayCreate() first argument
Change-Id: Ifd0bdb5708c110da45e4baa9426cccd749732822


[ROCm/clr commit: 8ea74366d7]
2022-04-22 11:08:37 +05:30
Rakesh Roy 7a572e0162 SWDEV-332604 - Add nullptr check for argument pitch
Change-Id: I6d7aa5356a74b92f21f7a51a7d3e2f8d0b920e07


[ROCm/clr commit: 2613ebf157]
2022-04-22 00:13:24 -04:00
German Andryeyev ecb4165943 SWDEV-333607 - Avoid synchronization of all GPU(s)
Use the original device from creation to sync before host memory
free.

Change-Id: I510e34afa7accf69e3d01338587bbc817b981cec


[ROCm/clr commit: b4c5a01fbc]
2022-04-21 15:36:04 -04:00
Sarbojit Sarkar e22f2e1714 SWDEV-323441 - support for default stream per thread
Change-Id: I0032da0357f5cffbf5e4ec4a02435d2a128a262b


[ROCm/clr commit: fc1f02bbed]
2022-04-18 23:19:55 -04:00
Jaydeep Patel 583aa7f008 SWDEV-330661 - devicePointer null checking.
Change-Id: I3366031954330143109d0a79e86fd0e0ec996f01


[ROCm/clr commit: ff78c439ef]
2022-04-08 00:08:37 -04:00
Satyanvesh Dittakavi 83e2a8a892 SWDEV-326796 - Fix hipMemset crash when the size passed is more than allocated
Change-Id: If3b15da0960f3af347fca62beedd8003cb958c2e


[ROCm/clr commit: c0ada4320b]
2022-04-07 08:49:54 -04:00
Saleel Kudchadker 3cec88a755 SWDEV-331152 - Add back HIP_HOST_COHERENT support
Change-Id: I1971df55913498df801ad319a20b95380a2c136f


[ROCm/clr commit: b1436f6451]
2022-04-06 12:26:01 -04:00
German Andryeyev 593844fdd6 SWDEV-328670 - Pass the size of allocation
The actual size of allocation can be different from the original
request due to alignments. Pass the size of the original request
for validation during the arena object look-up

Change-Id: I30000046b1ec56abe743e43113046144fd3edbc6


[ROCm/clr commit: fb835c6f3e]
2022-04-01 11:18:55 -04:00
Satyanvesh Dittakavi cb4625e5b7 SWDEV-329082 - Return right error code for hipHostUnregister
hipErrorHostMemoryNotRegistered should be returned when an
unregistered pointer is passed to hipHostUnregister

Change-Id: Ie76086b602bde2cd7a7a2b049cd03d29454ff306


[ROCm/clr commit: ed4014e519]
2022-03-28 07:24:25 -04:00
sdashmiz c308cf0951 SWDEV-303187: find the device pointer is for
- the pointer attribute is fetched for might not be the current device

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


[ROCm/clr commit: ae506b40c0]
2022-03-22 10:55:28 -04:00
Satyanvesh Dittakavi 6a849eb690 SWDEV-327967 - Fix Segmentation fault in hipFree
Queue creation and release fails during hipFree causing seg fault
if the null queue was not created until then and there is no
device memory left.

Change-Id: I118b86b58e777dac5415bc9ba0c4e23c986efa7d


[ROCm/clr commit: 4a90c3ccaf]
2022-03-22 00:34:40 -04:00
Satyanvesh Dittakavi 90e339cf95 SWDEV-324016 - Refactor hipDrvPointerGetAttributes
Addresses the negative scenarios and assigns default NULL values to
the queried attributes when the pointer encountered is not valid.
This is to match the corresponding API's behavior in CUDA.

Change-Id: I4ce400b02416d455ec9649f731af2e327dccfe71


[ROCm/clr commit: a554d03b9a]
2022-03-16 05:30:28 -04:00
Sourabh Betigeri 7649115859 SWDEV-326791 - Fixes hipHostRegister's inconsistent behavior when invalid parameter is passed
Change-Id: I5d5d979485cfd99908f84cc92648177cb8a569c7


[ROCm/clr commit: 0a76232c97]
2022-03-11 12:24:35 -05:00
Sourabh Betigeri 9a25ec266b SWDEV-326380 - Fixes a regression by verifying the device virtual address already exists in the memObjMap
Change-Id: Ibe29f3c6b77385a8e264ab523cafa4b5d2b41325


[ROCm/clr commit: 85a25a4be2]
2022-03-09 20:52:45 -05:00
Satyanvesh Dittakavi 98fef69edd SWDEV-313867 - SWDEV-314101 - Address Negative scenarios with hipGraphAddMemcpyNode and hipGraphAddMemsetNode
Change-Id: I51527ce6953aee9a3ef7d821754819b6c8087939


[ROCm/clr commit: c58ba64a0b]
2022-03-05 07:37:46 -05:00
Sourabh Betigeri eca06b35b9 SWDEV-273026 - Fixes a bug that skipped looping through all devices to book keep its corresponding memory in roclr
Change-Id: I404f6d2bcd0c0e31b9b0237903f26f0af19bc735


[ROCm/clr commit: 545cfaf428]
2022-03-02 20:26:28 -05:00
Saleel Kudchadker 49a1d54a5d SWDEV-321723 - Refactor hipHostMalloc flags
Always choose fing grain memory pool for hipHostMalloc
Choose coarse grain only if hipHostMallocNonCoherent is passed.

Change-Id: I9a67ba77335d4f373d32fea4ecd7848c77f9c190


[ROCm/clr commit: 0da908ec79]
2022-03-02 16:24:40 -05:00
Saleel Kudchadker 57b1cd0cf2 SWDEV-321723 - Pass correct flags
Pass CL_MEM_SVM_ATOMICS with hipHostMallocNumaUser.

Change-Id: I7b8010c5584ffd2fbebb964832dcfa270d430830


[ROCm/clr commit: a3f4d9410c]
2022-02-23 18:23:35 -08:00
Julia Jiang e6f8c4dc23 SWDEV-321654 - fix hipPointerGetAttribute API
Change-Id: Icafdda147eb16e08048d6c435c0c5714f3f8d143


[ROCm/clr commit: dabed031a0]
2022-02-22 21:32:28 -05:00
Payam 01bd9ba844 SWDEV-316050, SWDEV-316292 - Graph api matching error with Cuda
Change-Id: I80c9358e9ad3a2d57fca53e6ff7679f1e3953328


[ROCm/clr commit: c0b859641f]
2022-02-21 16:29:50 -05:00
Satyanvesh Dittakavi 51f8fc06e1 SWDEV-306940 - Fix hipamd errors/warnings found by CppCheck
Change-Id: Ia93d4f5262ea4269d8031edbfd27033b887e5300


[ROCm/clr commit: 6e562f4d83]
2022-02-05 08:42:47 -05:00
Satyanvesh Dittakavi 6bbcf08fc8 SWDEV-292714 - Added support for hipPointerGetAttribute and
hipDrvPointerGetAttributes

Change-Id: I44a0b5c5d9eb5a9a63406b11e8de83e5cb245a59


[ROCm/clr commit: 760f275861]
2022-02-02 05:33:07 -05:00
Ajay 91ba078604 SWDEV-313082 - hipGraphMemsetNodeSetParams invalid params
Change-Id: Ibe57df8d7d583daf9ba9c7a86863eacca4868f3a


[ROCm/clr commit: cb79dc7486]
2022-01-28 19:27:32 -05:00
Maneesh Gupta 501b613442 Revert "SWDEV-316155 - Fix for P2P sample failure"
This reverts commit 74269eb547.

Reason for revert: Fixed via a different patch

Change-Id: I1743afdd7b8516b39501839d74bbed6bdb797e0c


[ROCm/clr commit: ff1f1ba867]
2022-01-13 02:27:47 -05:00