Halide 19.0.0
Halide compiler and libraries
Loading...
Searching...
No Matches
HalideRuntimeWebGPU.h
Go to the documentation of this file.
1#ifndef HALIDE_HALIDERUNTIMEWEBGPU_H
2#define HALIDE_HALIDERUNTIMEWEBGPU_H
3
4// Don't include HalideRuntime.h if the contents of it were already pasted into a generated header above this one
5#ifndef HALIDE_HALIDERUNTIME_H
6
7#include "HalideRuntime.h"
8
9#endif
10
11#ifdef __cplusplus
12extern "C" {
13#endif
14
15/** \file
16 * Routines specific to the Halide WebGPU runtime.
17 */
18
19#define HALIDE_RUNTIME_WEBGPU
20
22
23/** These are forward declared here to allow clients to override the
24 * Halide WebGPU runtime. Do not call them. */
25// @{
26extern int halide_webgpu_initialize_kernels(void *user_context, void **state_ptr,
27 const char *src, int size);
28extern int halide_webgpu_run(void *user_context,
29 void *state_ptr,
30 const char *entry_name,
31 int blocksX, int blocksY, int blocksZ,
32 int threadsX, int threadsY, int threadsZ,
33 int shared_mem_bytes,
34 halide_type_t arg_types[],
35 void *args[],
36 int8_t arg_is_buffer[]);
37extern void halide_webgpu_finalize_kernels(void *user_context, void *state_ptr);
38// @}
39
40#ifdef __cplusplus
41} // End extern "C"
42#endif
43
44#endif // HALIDE_HALIDERUNTIMEWEBGPU_H
This file declares the routines used by Halide internally in its runtime.
void halide_webgpu_finalize_kernels(void *user_context, void *state_ptr)
const struct halide_device_interface_t * halide_webgpu_device_interface()
int halide_webgpu_run(void *user_context, void *state_ptr, const char *entry_name, int blocksX, int blocksY, int blocksZ, int threadsX, int threadsY, int threadsZ, int shared_mem_bytes, halide_type_t arg_types[], void *args[], int8_t arg_is_buffer[])
int halide_webgpu_initialize_kernels(void *user_context, void **state_ptr, const char *src, int size)
These are forward declared here to allow clients to override the Halide WebGPU runtime.
signed __INT8_TYPE__ int8_t
Each GPU API provides a halide_device_interface_t struct pointing to the code that manages device all...
A runtime tag for a type in the halide type system.