blob: 3fb422cd7a30328ed95b6378b621a67b8737f170 [file] [log] [blame]
#include "caffe2/core/context_gpu.h"
#include "caffe2/operators/math_ops.h"
namespace caffe2 {
struct LogCUDAFunctor {
template <typename T>
inline void
operator()(const int n, const T* x, T* y, CUDAContext* device_context) {
math::Log<T, CUDAContext>(n, x, y, device_context);
}
};
REGISTER_CUDA_OPERATOR(
Log,
UnaryElementwiseOp<TensorTypes<float>, CUDAContext, LogCUDAFunctor>);
}