C++-API#
Common#
Functions
Common Functions#
ZE_CHECK_STATUS#
-
inline void tinytc::ZE_CHECK_STATUS(ze_result_t result)#
Throw exception for unsuccessful call to C-API and convert result code to tinytc status.
Device Info#
Device Info Functions#
get_support_level(ze_device_handle_t)#
-
inline support_level tinytc::get_support_level(ze_device_handle_t device)#
Get support level of Level Zero device.
- Parameters:
device – Device handle
- Returns:
Support level
create_core_info(ze_device_handle_t)#
-
inline shared_handle<tinytc_core_info_t> tinytc::create_core_info(ze_device_handle_t device)#
Query core info from level zero runtime.
- Parameters:
device – device handle
- Returns:
core info
Kernel#
Functions
Kernel Functions#
get_group_size(ze_kernel_handle_t)#
-
inline std::array<std::uint32_t, 3u> tinytc::get_group_size(ze_kernel_handle_t kernel)#
Get work group size.
- Parameters:
kernel – kernel
- Returns:
Work-group size
create_kernel(ze_module_handle_t,char const *)#
-
inline unique_handle<ze_kernel_handle_t> tinytc::create_kernel(ze_module_handle_t mod, char const *name)#
Make a Level Zero kernel and set its group size.
- Parameters:
mod – Module
name – Kernel name
- Returns:
Level Zero kernel (unique handle)
create_kernel_bundle(ze_context_handle_t,ze_device_handle_t,const_tinytc_binary_t)#
-
inline unique_handle<ze_module_handle_t> tinytc::create_kernel_bundle(ze_context_handle_t context, ze_device_handle_t device, const_tinytc_binary_t bin)#
Make a Level Zero module from a tinytc binary.
- Parameters:
context – Context
device – Device
bin – Binary
- Returns:
Level Zero module (unique handle)
create_kernel_bundle(ze_context_handle_t,ze_device_handle_t,tinytc_prog_t,tinytc_core_feature_flags_t)#
-
inline unique_handle<ze_module_handle_t> tinytc::create_kernel_bundle(ze_context_handle_t context, ze_device_handle_t device, tinytc_prog_t prg, tinytc_core_feature_flags_t core_features = 0)#
Make a Level Zero module from a tinytc program.
- Parameters:
context – Context
device – Device
prg – Program
core_features – requested core features; must be 0 (default) or a combination of tinytc_core_feature_flag_t
- Returns:
Level Zero module (unique handle)
Recipe#
Functions
Recipe Functions#
create_recipe_handler(ze_context_handle_t,ze_device_handle_t,tinytc_recipe_t)#
-
inline shared_handle<tinytc_recipe_handler_t> tinytc::create_recipe_handler(ze_context_handle_t context, ze_device_handle_t device, tinytc_recipe_t rec)#
Make recipe handler.
- Parameters:
context – Context
device – Device
rec – Recipe
- Returns:
Level Zero recipe handler
submit(tinytc_recipe_handler_t,ze_command_list_handle_t,ze_event_handle_t,uint32_t,ze_event_handle_t*)#
-
inline void tinytc::submit(tinytc_recipe_handler_t handler, ze_command_list_handle_t list, ze_event_handle_t signal_event = nullptr, uint32_t num_wait_events = 0, ze_event_handle_t *wait_events = nullptr)#
Append recipe to command list.
Cf. tinytc_ze_recipe_handler_submit
- Parameters:
handler – Recipe handler
list – Command list
signal_event – Event to be signalled on completetion
num_wait_events – Number of wait events to wait on
wait_events – Array of num_wait_events events to wait on