Files
compute-runtime/level_zero/api/extensions/public/ze_exp_ext.cpp
Jaime Arteaga beb3c5ed05 Add support for global work offset extension in L0
Add experimental extension to set global work offest in L0.
Current L0 specification does not have interface to export
experimental function symbols, so for now, applications need
to find the symbol like with dlsym on Linux.

A blackbox test showing functionality is also added.

Signed-off-by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
2020-12-09 07:33:40 +01:00

28 lines
547 B
C++

/*
* Copyright (C) 2020 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "level_zero/api/extensions/public/ze_exp_ext.h"
#include "level_zero/core/source/kernel/kernel.h"
#if defined(__cplusplus)
extern "C" {
#endif
ZE_APIEXPORT ze_result_t ZE_APICALL
zeKernelSetGlobalOffsetExp(
ze_kernel_handle_t hKernel,
uint32_t offsetX,
uint32_t offsetY,
uint32_t offsetZ) {
return L0::Kernel::fromHandle(hKernel)->setGlobalOffsetExp(offsetX, offsetY, offsetZ);
}
#if defined(__cplusplus)
} // extern "C"
#endif