#include <math.h>#include <stddef.h>#include <stdint.h>#include <string.h>#include "bf16_utils.h"#include "checked_parallel.h"#include <stdatomic.h>Go to the source code of this file.
Functions | |
| static int | all_finite (const uint16_t *ptr, size_t elements) |
| int | ck_channel_l2_scale_bf16_checked (const uint16_t *input, const uint16_t *gamma, uint16_t *output, uint16_t *staged, size_t channels, size_t positions, size_t elements) |
| int | ck_video_block_mean_bf16_checked (const uint16_t *input, uint16_t *output, uint16_t *staged, size_t input_elements, size_t output_elements, size_t channels, size_t out_channels, size_t frames, size_t height, size_t width, size_t out_frames, size_t out_height, size_t out_width, size_t temporal_factor, size_t spatial_factor) |
| int | ck_video_causal_conv3d_bf16_checked (const uint16_t *input, size_t input_elements, const uint16_t *weight, size_t weight_elements, const uint16_t *bias, size_t bias_elements, uint16_t *output, size_t output_elements, uint16_t *staged, size_t staged_elements, size_t channels, size_t out_channels, size_t frames, size_t height, size_t width, size_t kernel_t, size_t kernel_h, size_t kernel_w) |
| int | ck_video_mean_patch_rows_bf16_checked (const uint16_t *moments, const uint16_t *mean, const uint16_t *inv_std, uint16_t *output, uint16_t *staged, size_t input_elements, size_t output_elements, size_t channels, size_t moment_channels, size_t frames, size_t height, size_t width, size_t selected_frames, size_t patch, size_t rows, size_t row_width) |
| int | ck_video_space_to_depth_bf16_checked (const uint16_t *input, size_t input_elements, uint16_t *output, size_t output_elements, size_t channels, size_t frames, size_t height, size_t width, size_t patch) |
| int | ck_video_spatial_attention_bf16_checked (const uint16_t *qkv, uint16_t *output, uint16_t *staged, float *scores, size_t input_elements, size_t output_elements, size_t positions, size_t channels, size_t frames, size_t height, size_t width, size_t qkv_channels) |
| int | ck_video_spatial_conv2d_bf16_checked (const uint16_t *input, size_t input_elements, const uint16_t *weight, size_t weight_elements, const uint16_t *bias, size_t bias_elements, uint16_t *output, size_t output_elements, uint16_t *staged, size_t staged_elements, size_t channels, size_t out_channels, size_t frames, size_t height, size_t width, size_t kernel_h, size_t kernel_w, size_t out_height, size_t out_width, size_t stride, size_t pad_bottom, size_t pad_right) |
| int | ck_video_temporal_stride_bf16_checked (const uint16_t *first, const uint16_t *filtered, uint16_t *output, size_t input_elements, size_t output_elements, size_t channels, size_t frames, size_t height, size_t width, size_t out_frames, size_t stride) |
| static int | extent_product (const size_t dims[], size_t n, size_t *count) |
| static int | overlap (const uint16_t *a, size_t a_count, const uint16_t *b, size_t b_count) |
| static int | region_valid (const uint16_t *ptr, size_t elements) |
| static void | video_conv_planes (size_t begin, size_t end, void *opaque) |
| static int | video_conv_run (struct video_conv_job *job, uint16_t *output, size_t output_count, size_t weight_count, size_t out_channels) |
|
static |
Definition at line 22 of file video_conv_bf16_checked.c.
References bf16_to_float().
Referenced by ck_channel_l2_scale_bf16_checked(), ck_video_block_mean_bf16_checked(), ck_video_causal_conv3d_bf16_checked(), ck_video_space_to_depth_bf16_checked(), ck_video_spatial_attention_bf16_checked(), ck_video_spatial_conv2d_bf16_checked(), and ck_video_temporal_stride_bf16_checked().
| int ck_channel_l2_scale_bf16_checked | ( | const uint16_t * | input, |
| const uint16_t * | gamma, | ||
| uint16_t * | output, | ||
| uint16_t * | staged, | ||
| size_t | channels, | ||
| size_t | positions, | ||
| size_t | elements ) |
Definition at line 199 of file video_conv_bf16_checked.c.
References all_finite(), bf16_to_float(), count, float_to_bf16(), overlap(), and region_valid().
| int ck_video_block_mean_bf16_checked | ( | const uint16_t * | input, |
| uint16_t * | output, | ||
| uint16_t * | staged, | ||
| size_t | input_elements, | ||
| size_t | output_elements, | ||
| size_t | channels, | ||
| size_t | out_channels, | ||
| size_t | frames, | ||
| size_t | height, | ||
| size_t | width, | ||
| size_t | out_frames, | ||
| size_t | out_height, | ||
| size_t | out_width, | ||
| size_t | temporal_factor, | ||
| size_t | spatial_factor ) |
Definition at line 281 of file video_conv_bf16_checked.c.
References all_finite(), bf16_to_float(), extent_product(), float_to_bf16(), overlap(), pad, and region_valid().
| int ck_video_causal_conv3d_bf16_checked | ( | const uint16_t * | input, |
| size_t | input_elements, | ||
| const uint16_t * | weight, | ||
| size_t | weight_elements, | ||
| const uint16_t * | bias, | ||
| size_t | bias_elements, | ||
| uint16_t * | output, | ||
| size_t | output_elements, | ||
| uint16_t * | staged, | ||
| size_t | staged_elements, | ||
| size_t | channels, | ||
| size_t | out_channels, | ||
| size_t | frames, | ||
| size_t | height, | ||
| size_t | width, | ||
| size_t | kernel_t, | ||
| size_t | kernel_h, | ||
| size_t | kernel_w ) |
Definition at line 163 of file video_conv_bf16_checked.c.
References all_finite(), count, extent_product(), overlap(), region_valid(), and video_conv_run().
| int ck_video_mean_patch_rows_bf16_checked | ( | const uint16_t * | moments, |
| const uint16_t * | mean, | ||
| const uint16_t * | inv_std, | ||
| uint16_t * | output, | ||
| uint16_t * | staged, | ||
| size_t | input_elements, | ||
| size_t | output_elements, | ||
| size_t | channels, | ||
| size_t | moment_channels, | ||
| size_t | frames, | ||
| size_t | height, | ||
| size_t | width, | ||
| size_t | selected_frames, | ||
| size_t | patch, | ||
| size_t | rows, | ||
| size_t | row_width ) |
Definition at line 430 of file video_conv_bf16_checked.c.
References bf16_to_float(), centered(), extent_product(), float_to_bf16(), overlap(), and region_valid().
| int ck_video_space_to_depth_bf16_checked | ( | const uint16_t * | input, |
| size_t | input_elements, | ||
| uint16_t * | output, | ||
| size_t | output_elements, | ||
| size_t | channels, | ||
| size_t | frames, | ||
| size_t | height, | ||
| size_t | width, | ||
| size_t | patch ) |
Definition at line 42 of file video_conv_bf16_checked.c.
References all_finite(), extent_product(), overlap(), and region_valid().
| int ck_video_spatial_attention_bf16_checked | ( | const uint16_t * | qkv, |
| uint16_t * | output, | ||
| uint16_t * | staged, | ||
| float * | scores, | ||
| size_t | input_elements, | ||
| size_t | output_elements, | ||
| size_t | positions, | ||
| size_t | channels, | ||
| size_t | frames, | ||
| size_t | height, | ||
| size_t | width, | ||
| size_t | qkv_channels ) |
Definition at line 367 of file video_conv_bf16_checked.c.
References all_finite(), bf16_to_float(), buffers(), count, dot(), extent_product(), float_to_bf16(), overlap(), and region_valid().
| int ck_video_spatial_conv2d_bf16_checked | ( | const uint16_t * | input, |
| size_t | input_elements, | ||
| const uint16_t * | weight, | ||
| size_t | weight_elements, | ||
| const uint16_t * | bias, | ||
| size_t | bias_elements, | ||
| uint16_t * | output, | ||
| size_t | output_elements, | ||
| uint16_t * | staged, | ||
| size_t | staged_elements, | ||
| size_t | channels, | ||
| size_t | out_channels, | ||
| size_t | frames, | ||
| size_t | height, | ||
| size_t | width, | ||
| size_t | kernel_h, | ||
| size_t | kernel_w, | ||
| size_t | out_height, | ||
| size_t | out_width, | ||
| size_t | stride, | ||
| size_t | pad_bottom, | ||
| size_t | pad_right ) |
Definition at line 239 of file video_conv_bf16_checked.c.
References all_finite(), count, extent_product(), overlap(), region_valid(), and video_conv_run().
| int ck_video_temporal_stride_bf16_checked | ( | const uint16_t * | first, |
| const uint16_t * | filtered, | ||
| uint16_t * | output, | ||
| size_t | input_elements, | ||
| size_t | output_elements, | ||
| size_t | channels, | ||
| size_t | frames, | ||
| size_t | height, | ||
| size_t | width, | ||
| size_t | out_frames, | ||
| size_t | stride ) |
Definition at line 332 of file video_conv_bf16_checked.c.
References all_finite(), extent_product(), overlap(), and region_valid().
|
static |
Definition at line 30 of file video_conv_bf16_checked.c.
References count.
Referenced by ck_video_block_mean_bf16_checked(), ck_video_causal_conv3d_bf16_checked(), ck_video_mean_patch_rows_bf16_checked(), ck_video_space_to_depth_bf16_checked(), ck_video_spatial_attention_bf16_checked(), ck_video_spatial_conv2d_bf16_checked(), and ck_video_temporal_stride_bf16_checked().
|
static |
Definition at line 16 of file video_conv_bf16_checked.c.
Referenced by ck_channel_l2_scale_bf16_checked(), ck_video_block_mean_bf16_checked(), ck_video_causal_conv3d_bf16_checked(), ck_video_mean_patch_rows_bf16_checked(), ck_video_space_to_depth_bf16_checked(), ck_video_spatial_attention_bf16_checked(), ck_video_spatial_conv2d_bf16_checked(), and ck_video_temporal_stride_bf16_checked().
|
static |
Definition at line 10 of file video_conv_bf16_checked.c.
Referenced by ck_channel_l2_scale_bf16_checked(), ck_video_block_mean_bf16_checked(), ck_video_causal_conv3d_bf16_checked(), ck_video_mean_patch_rows_bf16_checked(), ck_video_space_to_depth_bf16_checked(), ck_video_spatial_attention_bf16_checked(), ck_video_spatial_conv2d_bf16_checked(), and ck_video_temporal_stride_bf16_checked().
|
static |
Definition at line 83 of file video_conv_bf16_checked.c.
References bf16_to_float(), count, end, and float_to_bf16().
Referenced by video_conv_run().
|
static |
Definition at line 149 of file video_conv_bf16_checked.c.
References ck_checked_parallel_for(), and video_conv_planes().
Referenced by ck_video_causal_conv3d_bf16_checked(), and ck_video_spatial_conv2d_bf16_checked().