Darknet/YOLO v6.0-37-gb57f9029
Object Detection Framework
 
Loading...
Searching...
No Matches
Metal Backend

Minimal Metal compute wrapper used by the Apple MPS path. More...

Functions

void metal_begin_frame ()
 Begin/end a logical frame (enqueue work for a command buffer).
 
bool metal_buffer_alloc (size_t size, MetalBuffer *out)
 
bool metal_buffer_download (const MetalBuffer *buffer, size_t offset, void *data, size_t length)
 
bool metal_buffer_fill (const MetalBuffer *buffer, size_t offset, uint8_t value, size_t length)
 
void metal_buffer_free (MetalBuffer *buffer)
 
bool metal_buffer_upload (const MetalBuffer *buffer, size_t offset, const void *data, size_t length)
 
bool metal_dispatch_1d (const char *kernel_name, size_t threads, size_t threads_per_group, const MetalDispatchTexture *textures, size_t texture_count, const MetalDispatchBuffer *buffers, size_t buffer_count, const MetalDispatchBytes *bytes, size_t bytes_count, void *command_buffer)
 Dispatch a 1D compute kernel.
 
bool metal_dispatch_2d (const char *kernel_name, size_t width, size_t height, size_t threads_per_group_x, size_t threads_per_group_y, const MetalDispatchTexture *textures, size_t texture_count, const MetalDispatchBuffer *buffers, size_t buffer_count, const MetalDispatchBytes *bytes, size_t bytes_count, void *command_buffer)
 Dispatch a 2D compute kernel.
 
bool metal_dispatch_texture_kernel (const char *kernel_name, void *grid_texture_handle, size_t threads_per_group_x, size_t threads_per_group_y, const MetalDispatchTexture *textures, size_t texture_count, const MetalDispatchBuffer *buffers, size_t buffer_count, const MetalDispatchBytes *bytes, size_t bytes_count, void *command_buffer)
 Dispatch a kernel using a texture as the grid shape source.
 
void metal_end_frame ()
 Commit and wait for the thread-local command buffer.
 
void metal_flush ()
 Commit and wait for outstanding thread-local work, if any.
 
bool metal_init ()
 
bool metal_is_available ()
 
bool metal_self_test ()
 
void metal_shutdown ()
 

Detailed Description

Minimal Metal compute wrapper used by the Apple MPS path.

Function Documentation

◆ metal_begin_frame()

void metal_begin_frame ( )

Begin/end a logical frame (enqueue work for a command buffer).

Begin/end a logical frame (enqueue work for a command buffer).

Here is the call graph for this function:

◆ metal_buffer_alloc()

bool metal_buffer_alloc ( size_t  size,
MetalBuffer out 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ metal_buffer_download()

bool metal_buffer_download ( const MetalBuffer buffer,
size_t  offset,
void *  data,
size_t  length 
)
Here is the caller graph for this function:

◆ metal_buffer_fill()

bool metal_buffer_fill ( const MetalBuffer buffer,
size_t  offset,
uint8_t  value,
size_t  length 
)

◆ metal_buffer_free()

void metal_buffer_free ( MetalBuffer buffer)
Here is the caller graph for this function:

◆ metal_buffer_upload()

bool metal_buffer_upload ( const MetalBuffer buffer,
size_t  offset,
const void *  data,
size_t  length 
)
Here is the caller graph for this function:

◆ metal_dispatch_1d()

bool metal_dispatch_1d ( const char *  kernel_name,
size_t  threads,
size_t  threads_per_group,
const MetalDispatchTexture textures,
size_t  texture_count,
const MetalDispatchBuffer buffers,
size_t  buffer_count,
const MetalDispatchBytes bytes,
size_t  bytes_count,
void *  command_buffer 
)

Dispatch a 1D compute kernel.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ metal_dispatch_2d()

bool metal_dispatch_2d ( const char *  kernel_name,
size_t  width,
size_t  height,
size_t  threads_per_group_x,
size_t  threads_per_group_y,
const MetalDispatchTexture textures,
size_t  texture_count,
const MetalDispatchBuffer buffers,
size_t  buffer_count,
const MetalDispatchBytes bytes,
size_t  bytes_count,
void *  command_buffer 
)

Dispatch a 2D compute kernel.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ metal_dispatch_texture_kernel()

bool metal_dispatch_texture_kernel ( const char *  kernel_name,
void *  grid_texture_handle,
size_t  threads_per_group_x,
size_t  threads_per_group_y,
const MetalDispatchTexture textures,
size_t  texture_count,
const MetalDispatchBuffer buffers,
size_t  buffer_count,
const MetalDispatchBytes bytes,
size_t  bytes_count,
void *  command_buffer 
)

Dispatch a kernel using a texture as the grid shape source.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ metal_end_frame()

void metal_end_frame ( )

Commit and wait for the thread-local command buffer.

◆ metal_flush()

void metal_flush ( )

Commit and wait for outstanding thread-local work, if any.

◆ metal_init()

bool metal_init ( )
Here is the call graph for this function:

◆ metal_is_available()

bool metal_is_available ( )
Here is the caller graph for this function:

◆ metal_self_test()

bool metal_self_test ( )
Here is the call graph for this function:

◆ metal_shutdown()

void metal_shutdown ( )