@@ -1410,6 +1410,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urEnqueueUSMPrefetch(
14101410 releaseEvent ();
14111411 logger::warning (" mem_advise ignored as device does not support "
14121412 " managed memory access." );
1413+ return UR_RESULT_SUCCESS;
14131414 }
14141415
14151416 hipPointerAttribute_t attribs;
@@ -1423,7 +1424,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urEnqueueUSMPrefetch(
14231424 if (!attribs.isManaged ) {
14241425 releaseEvent ();
14251426 logger::warning (" Prefetch hint ignored as prefetch only works with USM." );
1426- return UR_RESULT_ERROR_ADAPTER_SPECIFIC ;
1427+ return UR_RESULT_SUCCESS ;
14271428 }
14281429
14291430 UR_CHECK_ERROR (
@@ -1480,6 +1481,7 @@ urEnqueueUSMAdvise(ur_queue_handle_t hQueue, const void *pMem, size_t size,
14801481 releaseEvent ();
14811482 logger::warning (" mem_advise ignored as device does not support "
14821483 " managed memory access." );
1484+ return UR_RESULT_SUCCESS;
14831485 }
14841486
14851487 // Passing MEM_ADVICE_SET/MEM_ADVICE_CLEAR_PREFERRED_LOCATION to
@@ -1496,6 +1498,7 @@ urEnqueueUSMAdvise(ur_queue_handle_t hQueue, const void *pMem, size_t size,
14961498 releaseEvent ();
14971499 logger::warning (" mem_advise ignored as device does not support "
14981500 " concurrent memory access." );
1501+ return UR_RESULT_SUCCESS;
14991502 }
15001503
15011504 // TODO: If pMem points to valid system-allocated pageable memory, we
@@ -1515,7 +1518,7 @@ urEnqueueUSMAdvise(ur_queue_handle_t hQueue, const void *pMem, size_t size,
15151518 releaseEvent ();
15161519 logger::warning (" mem_advise is ignored as the pointer argument is not "
15171520 " a shared USM pointer." );
1518- return UR_RESULT_ERROR_ADAPTER_SPECIFIC ;
1521+ return UR_RESULT_SUCCESS ;
15191522 }
15201523
15211524 const auto DeviceID = Device->get ();
@@ -1544,6 +1547,7 @@ urEnqueueUSMAdvise(ur_queue_handle_t hQueue, const void *pMem, size_t size,
15441547 releaseEvent ();
15451548 logger::warning (" mem_advise is ignored as the advice argument is not "
15461549 " supported by this device." );
1550+ return UR_RESULT_SUCCESS;
15471551 }
15481552 UR_CHECK_ERROR (Result);
15491553 }
0 commit comments