Files
pytorch/caffe2/operators/softmax_utils.h
Xiaomeng Yang 821b5f138a Optimize SoftmaxOp on CPU (#18635)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/18635

Optimize SoftmaxOp on CPU

Reviewed By: houseroad

Differential Revision: D14689516

fbshipit-source-id: d2dcee2476d1a3a21f428e99bce9835f1d229d64
2019-04-10 18:52:15 -07:00

24 lines
447 B
C++

#ifndef CAFFE2_OPERATORS_SOFTMAX_UTILS_H_
#define CAFFE2_OPERATORS_SOFTMAX_UTILS_H_
#include "caffe2/core/context.h"
#include "caffe2/core/operator.h"
namespace caffe2 {
namespace softmax_utils {
template <typename T>
void SoftmaxCPU(
int N,
int D,
bool logarithmic,
const T* X,
T* Y,
T* scratch,
CPUContext* context);
} // namespace softmax_utils
} // namespace caffe2
#endif // CAFFE2_OPERATORS_SOFTMAX_UTILS_H_