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 auto tinytc::get_support_level(ze_device_handle_t device) -> support_level#
Get support level of Level Zero device.
- Parameters:
device – Device handle
- Returns:
Support level
make_core_info(ze_device_handle_t)#
Kernel#
Functions
Kernel Functions#
compile_to_binary#
-
inline auto tinytc::compile_to_binary(source const &src, std::uint32_t ip_version, bundle_format format, source_context ctx = {}) -> binary#
Compile source to binary.
- Parameters:
src – Source object
ip_version – IP version (pass tinytc_intel_gpu_architecture_t here)
format – Bundle format (SPIR-V or Native)
ctx – Source context for improved error reporting
- Returns:
Binary
get_group_count#
-
inline auto tinytc::get_group_count(std::int64_t howmany) -> ze_group_count_t#
Convert group size to Level Zero group count.
- Parameters:
howmany – Group size
- Returns:
Group count
get_group_size(ze_kernel_handle_t)#
-
inline auto tinytc::get_group_size(ze_kernel_handle_t kernel) -> std::array<std::uint32_t, 3u>#
Get work group size.
- Parameters:
kernel – kernel
- Returns:
Work-group size
make_kernel(ze_module_handle_t,char const *)#
-
inline auto tinytc::make_kernel(ze_module_handle_t mod, char const *name) -> unique_handle<ze_kernel_handle_t>#
Make a Level Zero kernel and set its group size.
- Parameters:
mod – Module
name – Kernel name
- Returns:
Level Zero kernel (unique handle)
make_kernel_bundle(ze_context_handle_t,ze_device_handle_t,binary const&,source_context)#
-
inline auto tinytc::make_kernel_bundle(ze_context_handle_t context, ze_device_handle_t device, binary const &bin, source_context source_ctx = {}) -> unique_handle<ze_module_handle_t>#
Make a Level Zero module from a tinytc binary.
- Parameters:
context – Context
device – Device
bin – Binary
source_ctx – Source context for improved error reporting
- Returns:
Level Zero module (unique handle)
make_kernel_bundle(ze_context_handle_t,ze_device_handle_t,prog,tinytc_core_feature_flags_t,source_context)#
-
inline auto tinytc::make_kernel_bundle(ze_context_handle_t context, ze_device_handle_t device, prog prg, tinytc_core_feature_flags_t core_features = 0, source_context source_ctx = {}) -> unique_handle<ze_module_handle_t>#
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
source_ctx – Source context for improved error reporting
- Returns:
Level Zero module (unique handle)
make_kernel_bundle(ze_context_handle_t,ze_device_handle_t,source const&,source_context)#
-
inline auto tinytc::make_kernel_bundle(ze_context_handle_t context, ze_device_handle_t device, source const &src, source_context source_ctx = {}) -> unique_handle<ze_module_handle_t>#
Make a Level Zero module from a tinytc source.
- Parameters:
context – Context
device – Device
src – Source
source_ctx – Source context for improved error reporting
- Returns:
Level Zero module (unique handle)
Recipe#
Functions
Classes
Recipe Functions#
make_recipe_handler(ze_context_handle_t,ze_device_handle_t,recipe const&,source_context)#
-
inline auto tinytc::make_recipe_handler(ze_context_handle_t context, ze_device_handle_t device, recipe const &rec, source_context source_ctx = {}) -> level_zero_recipe_handler#
Make recipe handler.
- Parameters:
context – Context
device – Device
rec – Recipe
source_ctx – Source context for improved error reporting
- Returns:
Level Zero recipe handler
Recipe Classes#
level_zero_recipe_handler#
-
class level_zero_recipe_handler : public tinytc::recipe_handler#
Recipe handler for the Level Zero runtime.
Public Functions
-
inline void submit(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:
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
-
inline void submit(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)#