text: // Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved.
  //
  // Licensed under the Apache License, Version 2.0 (the "License");
  // you may not use this file except in compliance with the License.
  // You may obtain a copy of the License at
  //
  //     http://www.apache.org/licenses/LICENSE-2.0
  //
  // Unless required by applicable law or agreed to in writing, software
  // distributed under the License is distributed on an "AS IS" BASIS,
  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  // See the License for the specific language governing permissions and
  // limitations under the License.
  
  #pragma once
  
  namespace nnadapter {
  
  enum {
    /**
     * Custom softmax to compute on host place
     * Computes the normalized exponential values for the input tensor
     * element-wise.
     * The output is calculated using this formula:
     *     output = exp(input) / reduce_sum(exp(input), axis=axis, keepdims=true)
     *
     * Inputs:
     * * 0: input, a NNADAPTER_FLOAT32,
     * NNADAPTER_QUANT_INT8_SYMM_PER_LAYER tensor.
     * * 1: axis, a NNADAPTER_INT32 scalar. Defaults to 1. It represents the
     * dimension along which softmax will be performed. It should be in range [-R,
     * R), where R is the rank of input, negative value works the same way as
     * axis+R.
     *
     * Outputs:
     * * 0: output, a tensor with the same shape and type as input.
     *
     * Available since version 1.
     */
    NNADAPTER_NAIVE_SOFTMAX = -1000,
  
    /**
     * Custom softmax to compute on cuda place
     * Computes the normalized exponential values for the input tensor
     * element-wise.
     * The output is calculated using this formula:
     *     output = exp(input) / reduce_sum(exp(input), axis=axis, keepdims=true)
     *
     * Inputs:
     * * 0: input, a NNADAPTER_FLOAT32,
     * NNADAPTER_QUANT_INT8_SYMM_PER_LAYER tensor.
     * * 1: axis, a NNADAPTER_INT32 scalar. Defaults to 1. It represents the
     * dimension along which softmax will be performed. It should be in range [-R,
     * R), where R is the rank of input, negative value works the same way as
     * axis+R.
     *
     * Outputs:
     * * 0: output, a tensor with the same shape and type as input.
     *
     * Available since version 1.
     */
    NNADAPTER_SPECIAL_SOFTMAX,
  };  // Custom operations type
  
  }  // namespace nnadapter
  