chromium/third_party/xnnpack/src/src/xnnpack/operator.h

// Copyright (c) Facebook, Inc. and its affiliates.
// All rights reserved.
//
// Copyright 2019 Google LLC
//
// This source code is licensed under the BSD-style license found in the
// LICENSE file in the root directory of this source tree.

#pragma once

#include <stddef.h>
#include <stdint.h>

#include "xnnpack/allocator.h"
#include "xnnpack/cache.h"
#include "xnnpack/compute.h"
#include "xnnpack/microkernel-type.h"
#include "xnnpack/microparams.h"
#include "xnnpack/operator-type.h"
#include "xnnpack/params.h"
#include "pthreadpool.h"

// Maximum number of pthreadpool parallelization invocations per operator.
#define XNN_MAX_COMPUTE_INVOCATIONS

struct xnn_ukernel_conv2d {};

struct xnn_ukernel_dwconv {};

// Direct 2D Depthwise Convolution
struct xnn_ukernel_dwconv2d {};

struct xnn_ukernel_gemm {};

struct xnn_ukernel_igemm {};

struct xnn_ukernel_spmm {};

struct xnn_ukernel_vmulcaddc {};

struct xnn_ukernel_vbinary {};

struct xnn_ukernel_vunary {};

struct xnn_ukernel {};

// Valid state transitions:
// - xnn_run_state_invalid -> xnn_run_state_skip
// - xnn_run_state_invalid -> xnn_run_state_ready
// - xnn_run_state_invalid -> xnn_run_state_needs_setup -> xnn_run_state_ready
enum xnn_run_state {};

struct subconvolution_params {};

struct f16_f32acc_mean_params {};

struct xnn_operator {};

XNN_INTERNAL enum xnn_status xnn_run_operator_with_index(
  xnn_operator_t op,
  size_t opdata_index,
  size_t operator_object_index,
  pthreadpool_t threadpool);