chromium/third_party/xnnpack/src/src/operators/rope-nthc.c

// 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.

#include <assert.h>
#include <stddef.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>

#include "xnnpack.h"
#include "xnnpack/allocator.h"
#include "xnnpack/common.h"
#include "xnnpack/compute.h"
#include "xnnpack/config-types.h"
#include "xnnpack/config.h"
#include "xnnpack/log.h"
#include "xnnpack/operator-type.h"
#include "xnnpack/operator.h"
#include "xnnpack/params.h"
#include "pthreadpool.h"

static enum xnn_status create_rope_nthc(
    size_t max_tokens,
    uint32_t flags,
    enum xnn_operator_type operator_type,
    const struct xnn_cmul_config* config,
    xnn_operator_t* rope_op_out)
{}

enum xnn_status xnn_create_rope_nthc_f16(
  size_t max_tokens,
  uint32_t flags,
  xnn_operator_t* rope_op_out)
{}

enum xnn_status xnn_create_rope_nthc_f32(
  size_t max_tokens,
  uint32_t flags,
  xnn_operator_t* rope_op_out)
{}

static enum xnn_status reshape_rope_nthc(
    xnn_operator_t rope_op,
    enum xnn_operator_type expected_operator_type,
    size_t batch_size,
    size_t tokens,
    size_t heads,
    size_t channels,
    uint32_t log2_data_element_size,
    uint32_t log2_weight_element_size,
    size_t num_threads)
{}

enum xnn_status xnn_reshape_rope_nthc_f16(
    xnn_operator_t rope_op,
    size_t batch_size,
    size_t tokens,
    size_t heads,
    size_t channels,
    pthreadpool_t threadpool)
{}

enum xnn_status xnn_reshape_rope_nthc_f32(
    xnn_operator_t rope_op,
    size_t batch_size,
    size_t tokens,
    size_t heads,
    size_t channels,
    pthreadpool_t threadpool)
{}

static enum xnn_status setup_rope_nthc(
    xnn_operator_t rope_op,
    enum xnn_operator_type expected_operator_type,
    const void* input,
    const void* weights,
    void* output)
{}

enum xnn_status xnn_setup_rope_nthc_f16(
  xnn_operator_t rope_op,
  const void* input,
  const void* weights,
  void* output)
{}

enum xnn_status xnn_setup_rope_nthc_f32(
  xnn_operator_t rope_op,
  const float* input,
  const float* weights,
  float* output)
{}