mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-24 21:18:24 +08:00
Prepare mechanism for returning GPU execution error on OCL API
translate task count value to OCL error Related-To: NEO-7412 Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
ab6af4247e
commit
1c3d5c3892
@@ -60,6 +60,18 @@ CommandQueue *CommandQueue::create(Context *context,
|
||||
return funcCreate(context, device, properties, internalUsage);
|
||||
}
|
||||
|
||||
cl_int CommandQueue::getErrorCodeFromTaskCount(uint32_t taskCount) {
|
||||
switch (taskCount) {
|
||||
case CompletionStamp::gpuHang:
|
||||
case CompletionStamp::outOfDeviceMemory:
|
||||
return CL_OUT_OF_RESOURCES;
|
||||
case CompletionStamp::outOfHostMemory:
|
||||
return CL_OUT_OF_HOST_MEMORY;
|
||||
default:
|
||||
return CL_SUCCESS;
|
||||
}
|
||||
}
|
||||
|
||||
CommandQueue::CommandQueue(Context *context, ClDevice *device, const cl_queue_properties *properties, bool internalUsage)
|
||||
: context(context), device(device), isInternalUsage(internalUsage) {
|
||||
if (context) {
|
||||
|
||||
Reference in New Issue
Block a user