Skip to content

Commit 96468e2

Browse files
committed
Fix dodgy rebase.
1 parent 1da316c commit 96468e2

File tree

1 file changed

+6
-13
lines changed

1 file changed

+6
-13
lines changed

source/adapters/hip/enqueue.cpp

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -625,7 +625,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urEnqueueMemBufferCopy(
625625
std::unique_ptr<ur_event_handle_t_> RetImplEvent{nullptr};
626626

627627
try {
628-
ScopedContext Active(hQueue->getDevice());
628+
ScopedDevice Active(hQueue->getDevice());
629629
auto Stream = hQueue->getNextTransferStream();
630630

631631
if (phEventWaitList) {
@@ -1500,19 +1500,12 @@ urEnqueueUSMAdvise(ur_queue_handle_t hQueue, const void *pMem, size_t size,
15001500
// the runtime.
15011501
if (Result == UR_RESULT_ERROR_INVALID_ENUMERATION) {
15021502
releaseEvent();
1503-
// UR_RESULT_ERROR_INVALID_ENUMERATION is returned when using a valid
1504-
// but currently unmapped advice arguments as not supported by this
1505-
// platform. Therefore, warn the user instead of throwing and aborting
1506-
// the runtime.
1507-
if (Result == UR_RESULT_ERROR_INVALID_ENUMERATION) {
1508-
setErrorMessage("mem_advise is ignored as the advice argument is not "
1509-
"supported by this device",
1510-
UR_RESULT_SUCCESS);
1511-
return UR_RESULT_ERROR_ADAPTER_SPECIFIC;
1512-
} else {
1513-
throw Result;
1514-
}
1503+
setErrorMessage("mem_advise is ignored as the advice argument is not "
1504+
"supported by this device",
1505+
UR_RESULT_SUCCESS);
1506+
return UR_RESULT_ERROR_ADAPTER_SPECIFIC;
15151507
}
1508+
UR_CHECK_ERROR(Result);
15161509
}
15171510

15181511
releaseEvent();

0 commit comments

Comments
 (0)