OpenVINO™ is an open source toolkit for optimizing and deploying AI inference
C++ aicomputer-visiondeep-learningdeploy-aidiffusion-modelsgenerative-aigood-first-issueinferencellm-inferencenatural-language-processingnlpopenvinooptimize-aiperformance-boostrecommendation-systemspeech-recognitionstable-diffusiontransformersyolo
[GPU] Use errHandler to do error check for USM API (#39377)
ZackyLake7ecfa5f7ce23
diff --git a/src/plugins/intel_gpu/src/runtime/ocl/ocl_ext.hpp b/src/plugins/intel_gpu/src/runtime/ocl/ocl_ext.hppindex 7d57201a8b5..4c17ee4a33f 100644--- a/src/plugins/intel_gpu/src/runtime/ocl/ocl_ext.hpp+++ b/src/plugins/intel_gpu/src/runtime/ocl/ocl_ext.hpp@@ -854,6 +854,7 @@ public:wait_list == nullptr ? nullptr : reinterpret_cast<const cl_event*>(&wait_list->front()),ret_event == nullptr ? nullptr : &tmp);+ detail::errHandler(err, "clEnqueueMemcpyINTEL");if (ret_event != nullptr && err == CL_SUCCESS) {*ret_event = tmp;}@@ -881,6 +882,7 @@ public:wait_list == nullptr ? nullptr : reinterpret_cast<const cl_event*>(&wait_list->front()),ret_event == nullptr ? nullptr : &tmp);+ detail::errHandler(err, "clEnqueueMemFillINTEL");if (ret_event != nullptr && err == CL_SUCCESS) {*ret_event = tmp;}@@ -906,6 +908,7 @@ public:wait_list == nullptr ? nullptr : reinterpret_cast<const cl_event*>(&wait_list->front()),ret_event == nullptr ? nullptr : &tmp);+ detail::errHandler(err, "clEnqueueMemsetINTEL");if (ret_event != nullptr && err == CL_SUCCESS) {*ret_event = tmp;}diff --git a/src/plugins/intel_gpu/tests/unit/test_cases/memory_test.cpp b/src/plugins/intel_gpu/tests/unit/test_cases/memory_test.cppindex c2406e8bb70..21908f7c238 100644--- a/src/plugins/intel_gpu/tests/unit/test_cases/memory_test.cpp+++ b/src/plugins/intel_gpu/tests/unit/test_cases/memory_test.cpp@@ -425,8 +425,10 @@ public:ExecutionConfig config = get_test_default_config(*engine);config.set_property(ov::intel_gpu::optimize_data(true));+ // Must share the engine's OpenCL context with the device memory.+ auto engine_stream = engine->create_stream(config);- network::ptr network_first = get_network(*engine, topo, config, get_test_stream_ptr(), is_caching_test);+ network::ptr network_first = get_network(*engine, topo, config, engine_stream, is_caching_test);network_first->set_input_data("input", input_8);auto outputs = network_first->execute();@@ -456,7 +458,7 @@ public:topo.change_input_layout("input", input_1->get_layout());//change input layout to batch=1- network::ptr network_second = get_network(*engine, topo, config, get_test_stream_ptr(), is_caching_test);+ network::ptr network_second = get_network(*engine, topo, config, engine_stream, is_caching_test);network_second->set_input_data("input", input_1);auto outputs_second = network_second->execute();