#include "xnnpack/subgraph.h"
#include <assert.h>
#include <inttypes.h>
#include <stddef.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <fp16/fp16.h>
#include "xnnpack.h"
#include "xnnpack/allocation-type.h"
#include "xnnpack/allocator.h"
#include "xnnpack/common.h"
#include "xnnpack/hardware-config.h"
#include "xnnpack/log.h"
#include "xnnpack/math.h"
#include "xnnpack/node-type.h"
#include "xnnpack/params.h"
#ifndef XNN_ENABLE_SPARSE
#error "XNN_ENABLE_SPARSE not defined"
#endif
enum xnn_status xnn_create_subgraph(
uint32_t external_value_ids,
uint32_t flags,
xnn_subgraph_t* subgraph_out)
{ … }
struct xnn_value* xnn_subgraph_new_internal_value(xnn_subgraph_t subgraph)
{ … }
void xnn_node_clear(struct xnn_node* node) { … }
void xnn_value_clear(struct xnn_value* value) { … }
void xnn_value_copy(
struct xnn_value* dst_value,
const struct xnn_value* src_value)
{ … }
struct xnn_node* xnn_subgraph_new_node(xnn_subgraph_t subgraph)
{ … }
enum xnn_status xnn_subgraph_add_nodes(xnn_subgraph_t subgraph, size_t num_nodes)
{ … }
void xnn_subgraph_analyze_consumers_and_producers(xnn_subgraph_t subgraph)
{ … }
#define XNN_LAYOUT_FLAG_COMPATIBLE_NCHW …
#define XNN_LAYOUT_FLAG_COMPATIBLE_NHWC2NCHW …
#define XNN_LAYOUT_FLAG_COMPATIBLE_NCHW2NHWC …
#define XNN_LAYOUT_FLAG_INCOMPATIBLE_CLUSTER …
uint32_t xnn_check_nchw_compatibility(xnn_subgraph_t subgraph, struct xnn_node* node) { … }
void xnn_subgraph_rewrite_for_nchw(xnn_subgraph_t subgraph)
{ … }
bool xnn_subgraph_rewrite_for_fp16(xnn_subgraph_t subgraph)
{ … }
static void xnn_node_replace_output(struct xnn_node* node, uint32_t old_output_id, uint32_t new_output_id)
{ … }
enum xnn_status xnn_subgraph_fusion(
xnn_subgraph_t subgraph)
{ … }
enum xnn_status xnn_subgraph_optimize(
xnn_subgraph_t subgraph,
uint32_t flags)
{ … }
enum xnn_status xnn_delete_subgraph(
xnn_subgraph_t subgraph)
{ … }