Skip to content

Commit 8059445

Browse files
committed
Fix fake_quantize_op
1 parent a0e6f41 commit 8059445

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

paddle/fluid/operators/fake_quantize_op.cu

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,8 @@ struct FindRangeAbsMaxFunctor<platform::CUDADeviceContext, T> {
119119
const framework::Tensor& last_scale,
120120
const framework::Tensor& iter, const int window_size,
121121
framework::Tensor* scales_arr, framework::Tensor* out_scale) {
122-
auto& gpu_place = boost::get<platform::CUDAPlace>(ctx.GetPlace());
122+
const auto gpu_place = boost::get<platform::CUDAPlace>(ctx.GetPlace());
123+
123124
T* scale_arr = scales_arr->mutable_data<T>(gpu_place);
124125
T* out_scale_data = out_scale->mutable_data<T>(gpu_place);
125126

paddle/scripts/paddle_build.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ function cmake_gen() {
115115
-DWITH_FLUID_ONLY=${WITH_FLUID_ONLY:-OFF}
116116
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON
117117
-DWITH_CONTRIB=${WITH_CONTRIB:-ON}
118+
-DWITH_INFERENCE=${WITH_INFERENCE:-ON}
118119
-DWITH_ANAKIN=${WITH_ANAKIN:-OFF}
119120
-DPY_VERSION=${PY_VERSION:-2.7}
120121
========================================
@@ -144,6 +145,7 @@ EOF
144145
-DWITH_FLUID_ONLY=${WITH_FLUID_ONLY:-OFF} \
145146
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
146147
-DWITH_CONTRIB=${WITH_CONTRIB:-ON} \
148+
-DWITH_INFERENCE=${WITH_INFERENCE:-ON} \
147149
-DWITH_ANAKIN=${WITH_ANAKIN:-OFF} \
148150
-DPY_VERSION=${PY_VERSION:-2.7}
149151
}

0 commit comments

Comments
 (0)