Skip to content

Commit 2fdd753

Browse files
committed
change default quant to float for fp32
1 parent 8f215f8 commit 2fdd753

File tree

4 files changed

+1
-12
lines changed

4 files changed

+1
-12
lines changed

paddle/phi/kernels/xpu/xpu_api_wrapper.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ inline XPUFCCalcType FCCalcType() {
6666
{"XPU_PADDLE_FC_INT32_WITH_LL", XPUFCCalcType::FC_INT32_WITH_LL},
6767
};
6868
#ifdef PADDLE_WITH_XPU_XRE5
69-
auto default_calc_type = XPUFCCalcType::FC_TF32;
69+
auto default_calc_type = XPUFCCalcType::FC_FLOAT;
7070
#else
7171
auto default_calc_type = XPUFCCalcType::FC_INT16;
7272
#endif

test/xpu/test_conv2d_op_xpu.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
import os
1615
import unittest
1716

1817
import numpy as np
@@ -205,8 +204,6 @@ def setUp(self):
205204
self.init_dilation()
206205
self.init_test_case()
207206

208-
os.environ["XPU_PADDLE_CONV_FLOAT"] = "1"
209-
210207
conv2d_param = {
211208
'stride': self.stride,
212209
'pad': self.pad,
@@ -363,8 +360,6 @@ def setUp(self):
363360
self.init_paddings()
364361
self.init_test_case_2()
365362

366-
os.environ["XPU_PADDLE_CONV_FLOAT"] = "1"
367-
368363
conv2d_param = {
369364
'stride': self.stride,
370365
'pad': self.pad,

test/xpu/test_conv3d_op_xpu.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
import os
1615
import unittest
1716

1817
import numpy as np
@@ -219,8 +218,6 @@ def setUp(self):
219218
self.init_dilation()
220219
self.init_test_case()
221220

222-
os.environ["XPU_PADDLE_CONV_FLOAT"] = "1"
223-
224221
conv3d_param = {
225222
'stride': self.stride,
226223
'pad': self.pad,
@@ -393,8 +390,6 @@ def setUp(self):
393390

394391
self.init_test_case_2()
395392

396-
os.environ["XPU_PADDLE_CONV_FLOAT"] = "1"
397-
398393
conv3d_param = {
399394
'stride': self.stride,
400395
'pad': self.pad,

test/xpu/test_matmul_v2_op_xpu.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ def setUp(self):
7777
import os
7878

7979
os.environ["XPU_PADDLE_L3_SIZE"] = str(13 * 1024 * 1024)
80-
os.environ["XPU_PADDLE_FC_FLOAT"] = "1"
8180
x = np.random.random(self.x_shape)
8281
y = np.random.random(self.y_shape)
8382

0 commit comments

Comments
 (0)