Skip to content

Commit

Permalink
Pass cpu build
Browse files Browse the repository at this point in the history
  • Loading branch information
panyx0718 committed Mar 25, 2018
1 parent 904fa05 commit 1a4be55
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions paddle/fluid/operators/layer_norm_op.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ struct RowwiseMean2D {
const framework::Tensor& input, framework::Tensor* vec);
};

#ifdef PADDLE_WITH_CUDA
template <typename T>
class RowwiseMean2D<platform::CUDADeviceContext, T> {
public:
Expand All @@ -55,6 +56,7 @@ class RowwiseMean2D<platform::CUDADeviceContext, T> {
int right_;
framework::Tensor divisor_;
};
#endif

template <typename T>
class RowwiseMean2D<platform::CPUDeviceContext, T> {
Expand All @@ -78,6 +80,7 @@ struct ColwiseSum2D {
const framework::Tensor& input, framework::Tensor* vec);
};

#ifdef PADDLE_WITH_CUDA
template <typename T>
class ColwiseSum2D<platform::CUDADeviceContext, T> {
public:
Expand All @@ -100,6 +103,7 @@ class ColwiseSum2D<platform::CUDADeviceContext, T> {
int right_;
framework::Tensor divisor_;
};
#endif

template <typename T>
class ColwiseSum2D<platform::CPUDeviceContext, T> {
Expand Down

0 comments on commit 1a4be55

Please sign in to comment.