Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion backends/ze/gen_ze.rb
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,10 @@ def gen_struct_printer(namespace, types)
puts <<EOF
_init_tracer();
EOF
if c.name == 'zeInit'
# _init_tracer_dump() calls the real zeInit (ZE_INIT_PTR) and dumps device
# properties. zesInit piggybacks on it so a pure-Sysman program (no zeInit)
# still initializes the ze backend it depends on.
if %w[zeInit zesInit].include?(c.name)
puts <<EOF
_init_tracer_dump();
EOF
Expand Down
6 changes: 5 additions & 1 deletion backends/ze/ze_model.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,11 @@
gen_struct_map(typedefs, structs)
gen_ffi_type_map(typedefs)

INIT_FUNCTIONS = /zeInit|zeLoaderInit|zeInitDrivers/
# zesInit is included here so that a pure-Sysman program (one that only calls
# zesInit, never zeInit) still triggers the tracer initialization.
# Ideally we would split this into INIT_ZE_FUNCTIONS / INIT_ZES_FUNCTIONS
# so each namespace initializes its own symbols.
INIT_FUNCTIONS = /zeInit|zeLoaderInit|zeInitDrivers|zesInit/

$struct_type_conversion_table = {
'ZE_STRUCTURE_TYPE_IMAGE_MEMORY_PROPERTIES_EXP' => 'ZE_STRUCTURE_TYPE_IMAGE_MEMORY_EXP_PROPERTIES',
Expand Down
Loading