mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
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
24 lines
447 B
C++
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_
|