Skip to content

Commit 7401931

Browse files
authored
Merge pull request #1710 from frasercrmck/fix-hip-mem-buffer-fill
[HIP] Remove overly restrictive urEnqueueMemBufferFill validation
2 parents 94e8395 + 18a13b6 commit 7401931

File tree

2 files changed

+0
-17
lines changed

2 files changed

+0
-17
lines changed

source/adapters/hip/enqueue.cpp

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -789,21 +789,6 @@ UR_APIEXPORT ur_result_t UR_APICALL urEnqueueMemBufferFill(
789789
ur_event_handle_t *phEvent) {
790790
UR_ASSERT(size + offset <= std::get<BufferMem>(hBuffer->Mem).getSize(),
791791
UR_RESULT_ERROR_INVALID_SIZE);
792-
auto ArgsAreMultiplesOfPatternSize =
793-
(offset % patternSize == 0) || (size % patternSize == 0);
794-
795-
auto PatternIsValid = (pPattern != nullptr);
796-
797-
auto PatternSizeIsValid =
798-
((patternSize & (patternSize - 1)) == 0) && // is power of two
799-
(patternSize > 0) && (patternSize <= 128); // falls within valid range
800-
801-
UR_ASSERT(ArgsAreMultiplesOfPatternSize && PatternIsValid &&
802-
PatternSizeIsValid,
803-
UR_RESULT_ERROR_INVALID_VALUE);
804-
std::ignore = ArgsAreMultiplesOfPatternSize;
805-
std::ignore = PatternIsValid;
806-
std::ignore = PatternSizeIsValid;
807792

808793
std::unique_ptr<ur_event_handle_t_> RetImplEvent{nullptr};
809794
hBuffer->setLastQueueWritingToMemObj(hQueue);

test/conformance/enqueue/enqueue_adapter_hip.match

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ urEnqueueKernelLaunchKernelSubGroupTest.Success/AMD_HIP_BACKEND___{{.*}}_
55
urEnqueueKernelLaunchUSMLinkedList.Success/AMD_HIP_BACKEND___{{.*}}___UsePoolEnabled
66
{{OPT}}urEnqueueMemBufferCopyRectTestWithParam.Success/AMD_HIP_BACKEND___{{.*}}___copy_row_2D
77
{{OPT}}urEnqueueMemBufferCopyRectTestWithParam.Success/AMD_HIP_BACKEND___{{.*}}___copy_3d_2d
8-
urEnqueueMemBufferFillTest.Success/AMD_HIP_BACKEND___{{.*}}___size__256__patternSize__256
9-
urEnqueueMemBufferFillTest.Success/AMD_HIP_BACKEND___{{.*}}___size__1024__patternSize__256
108
{{OPT}}urEnqueueMemBufferWriteRectTestWithParam.Success/AMD_HIP_BACKEND___{{.*}}___write_row_2D
119
{{OPT}}urEnqueueMemBufferWriteRectTestWithParam.Success/AMD_HIP_BACKEND___{{.*}}___write_3d_2d
1210
urEnqueueUSMAdviseWithParamTest.Success/AMD_HIP_BACKEND___{{.*}}___UR_USM_ADVICE_FLAG_DEFAULT

0 commit comments

Comments
 (0)