Skip to content

Commit be80bb4

Browse files
committed
- Fix to GPU
test=develop
1 parent 513bb6c commit be80bb4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

paddle/fluid/operators/softmax_op.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@ class SoftmaxKernel : public framework::OpKernel<T> {
3636
Tensor Out_2d = framework::ReshapeToMatrix(*Out, rank - 1);
3737

3838
#ifdef PADDLE_ON_INFERENCE
39-
math::SoftmaxFunctor<DeviceContext, T, true>()(
39+
math::SoftmaxFunctor<
40+
DeviceContext, T,
41+
std::is_same<DeviceContext, platform::CPUDeviceContext>::value>()(
4042
context.template device_context<DeviceContext>(), &X_2d, &Out_2d);
4143
#else
4244
math::SoftmaxFunctor<DeviceContext, T, false>()(

0 commit comments

Comments
 (0)