1#ifndef HALIDE_HALIDERUNTIMEHEXAGONHOST_H
2#define HALIDE_HALIDERUNTIMEHEXAGONHOST_H
5#ifndef HALIDE_HALIDERUNTIME_H
19#define HALIDE_RUNTIME_HEXAGON
This file declares the routines used by Halide internally in its runtime.
const struct halide_device_interface_t * halide_hexagon_device_interface()
int halide_hexagon_run(void *user_context, void *module_ptr, const char *name, halide_hexagon_handle_t *function, uint64_t arg_sizes[], void *args[], int arg_flags[])
int halide_hexagon_device_release(void *user_context)
int halide_hexagon_wrap_device_handle(void *user_context, struct halide_buffer_t *buf, void *ptr, uint64_t size)
The device handle for Hexagon is simply a pointer and size, stored in the dev field of the halide_buf...
int halide_hexagon_handle_t
void halide_hexagon_power_hvx_off_as_destructor(void *user_context, void *)
uint64_t halide_hexagon_get_device_size(void *user_context, struct halide_buffer_t *buf)
int halide_hexagon_power_hvx_off(void *user_context)
bool halide_is_hexagon_available(void *user_context)
Check if the Hexagon runtime (libhalide_hexagon_host.so) is available.
halide_hexagon_power_t halide_hvx_power_perf_t
int halide_hexagon_detach_device_handle(void *user_context, struct halide_buffer_t *buf)
Disconnect this halide_buffer_t from the device handle it was previously wrapped around.
halide_hexagon_power_mode_t
Power modes for Hexagon.
@ halide_hvx_power_default
@ halide_hexagon_power_nominal_plus
@ halide_hexagon_power_low_2
@ halide_hexagon_power_turbo
@ halide_hexagon_power_low_plus
Resets power to its default state.
@ halide_hexagon_power_nominal
@ halide_hexagon_power_low
@ halide_hexagon_power_default
@ halide_hvx_power_nominal
int halide_hexagon_power_hvx_on(void *user_context)
Power HVX on and off.
int halide_hexagon_set_thread_priority(void *user_context, int priority)
Set the default priority for Halide Hexagon user threads:
int halide_hexagon_set_performance(void *user_context, halide_hexagon_power_t *perf)
void halide_hexagon_finalize_kernels(void *user_context, void *state_ptr)
int halide_hexagon_initialize_kernels(void *user_context, void **module_ptr, const uint8_t *code, uint64_t code_size, const uint8_t *runtime, uint64_t runtime_size)
These are forward declared here to allow clients to override the Halide Hexagon runtime.
int halide_hexagon_set_performance_mode(void *user_context, halide_hexagon_power_mode_t mode)
Set a performance target for Hexagon.
void * halide_hexagon_get_device_handle(void *user_context, struct halide_buffer_t *buf)
Return the underlying device handle for a halide_buffer_t.
void * halide_hexagon_get_module_state(void *user_context, void **host)
Return a pointer to the module_state.
unsigned __INT64_TYPE__ uint64_t
unsigned __INT8_TYPE__ uint8_t
The raw representation of an image passed around by generated Halide code.
Each GPU API provides a halide_device_interface_t struct pointing to the code that manages device all...
More detailed power settings to control Hexagon.
unsigned int mipsPerThread
unsigned int bwMegabytesPerSec
unsigned short busbwUsagePercentage