Skip to content

Commit 1c2e9cf

Browse files
committed
delete boost::get,test=kunlun
1 parent 26f1b77 commit 1c2e9cf

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

paddle/fluid/operators/softmax_with_cross_entropy_op_xpu.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,12 @@ class SoftmaxWithCrossEntropyXPUKernel : public framework::OpKernel<T> {
6767
XPU_SUCCESS, platform::errors::InvalidArgument("XPU kernel error!"));
6868
dev_ctx.Wait();
6969
memory::Copy(platform::CPUPlace(), labels_int64_host,
70-
boost::get<platform::XPUPlace>(context.GetPlace()), p_labels,
71-
n * sizeof(int64_t));
70+
BOOST_GET_CONST(platform::XPUPlace, context.GetPlace()),
71+
p_labels, n * sizeof(int64_t));
7272
for (int i = 0; i < n; ++i) {
7373
labels_int32_host[i] = labels_int64_host[i];
7474
}
75-
memory::Copy(boost::get<platform::XPUPlace>(context.GetPlace()),
75+
memory::Copy(BOOST_GET_CONST(platform::XPUPlace, context.GetPlace()),
7676
labels_int32_device, platform::CPUPlace(), labels_int32_host,
7777
n * sizeof(int));
7878
int r = xpu::cross_entropy_forward(

0 commit comments

Comments
 (0)