Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle
提交
f12f2a9d
P
Paddle
项目概览
PaddlePaddle
/
Paddle
大约 1 年 前同步成功
通知
2298
Star
20931
Fork
5422
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1423
列表
看板
标记
里程碑
合并请求
543
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1,423
Issue
1,423
列表
看板
标记
里程碑
合并请求
543
合并请求
543
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
f12f2a9d
编写于
1月 30, 2023
作者:
R
Ryan
提交者:
GitHub
1月 30, 2023
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
bool => bool_ (#49961)
上级
cb525d4e
变更
14
隐藏空白更改
内联
并排
Showing
14 changed file
with
24 addition
and
24 deletion
+24
-24
python/paddle/fluid/tests/unittests/ipu/test_flip_op_ipu.py
python/paddle/fluid/tests/unittests/ipu/test_flip_op_ipu.py
+2
-2
python/paddle/fluid/tests/unittests/ir/inference/test_trt_convert_compare_and_logical.py
...ests/ir/inference/test_trt_convert_compare_and_logical.py
+2
-2
python/paddle/fluid/tests/unittests/ir/inference/test_trt_convert_fill_any_like.py
.../unittests/ir/inference/test_trt_convert_fill_any_like.py
+1
-1
python/paddle/fluid/tests/unittests/ir/inference/test_trt_convert_one_hot.py
.../tests/unittests/ir/inference/test_trt_convert_one_hot.py
+1
-1
python/paddle/fluid/tests/unittests/ir/inference/test_trt_convert_unary.py
...id/tests/unittests/ir/inference/test_trt_convert_unary.py
+2
-2
python/paddle/fluid/tests/unittests/ir/inference/test_trt_convert_where.py
...id/tests/unittests/ir/inference/test_trt_convert_where.py
+2
-2
python/paddle/fluid/tests/unittests/npu/test_assign_value_op_npu.py
...dle/fluid/tests/unittests/npu/test_assign_value_op_npu.py
+2
-2
python/paddle/fluid/tests/unittests/test_assign_value_op.py
python/paddle/fluid/tests/unittests/test_assign_value_op.py
+2
-2
python/paddle/fluid/tests/unittests/test_fused_multi_transformer_int8_op.py
...d/tests/unittests/test_fused_multi_transformer_int8_op.py
+1
-1
python/paddle/fluid/tests/unittests/test_fused_multi_transformer_op.py
.../fluid/tests/unittests/test_fused_multi_transformer_op.py
+1
-1
python/paddle/fluid/tests/unittests/test_update_loss_scaling_op.py
...ddle/fluid/tests/unittests/test_update_loss_scaling_op.py
+1
-1
python/paddle/fluid/tests/unittests/xpu/test_assign_value_op_xpu.py
...dle/fluid/tests/unittests/xpu/test_assign_value_op_xpu.py
+2
-2
python/paddle/fluid/tests/unittests/xpu/test_bitwise_op_xpu.py
...n/paddle/fluid/tests/unittests/xpu/test_bitwise_op_xpu.py
+1
-1
python/paddle/fluid/tests/unittests/xpu/test_logical_op_xpu.py
...n/paddle/fluid/tests/unittests/xpu/test_logical_op_xpu.py
+4
-4
未找到文件。
python/paddle/fluid/tests/unittests/ipu/test_flip_op_ipu.py
浏览文件 @
f12f2a9d
...
...
@@ -80,8 +80,8 @@ class TestCase1(TestBase):
class
TestCase2
(
TestBase
):
def
set_feed
(
self
):
data
=
np
.
random
.
randint
(
0
,
2
,
size
=
[
4
,
3
,
2
,
2
])
self
.
feed_fp32
=
{
'x'
:
data
.
astype
(
np
.
bool
)}
self
.
feed_fp16
=
{
'x'
:
data
.
astype
(
np
.
bool
)}
self
.
feed_fp32
=
{
'x'
:
data
.
astype
(
np
.
bool
_
)}
self
.
feed_fp16
=
{
'x'
:
data
.
astype
(
np
.
bool
_
)}
if
__name__
==
"__main__"
:
...
...
python/paddle/fluid/tests/unittests/ir/inference/test_trt_convert_compare_and_logical.py
浏览文件 @
f12f2a9d
...
...
@@ -46,14 +46,14 @@ class TrtConvertLogicalTest(TrtLayerAutoScanTest):
"op_inputs"
:
{
"X"
:
[
"input_data1"
]},
"op_outputs"
:
{
"Out"
:
[
"cast_output_data1"
]},
"op_attrs"
:
dics
[
1
],
"outputs_dtype"
:
{
"cast_output_data1"
:
np
.
bool
},
"outputs_dtype"
:
{
"cast_output_data1"
:
np
.
bool
_
},
},
{
"op_type"
:
"cast"
,
"op_inputs"
:
{
"X"
:
[
"input_data2"
]},
"op_outputs"
:
{
"Out"
:
[
"cast_output_data3"
]},
"op_attrs"
:
dics
[
1
],
"outputs_dtype"
:
{
"cast_output_data3"
:
np
.
bool
},
"outputs_dtype"
:
{
"cast_output_data3"
:
np
.
bool
_
},
},
{
"op_type"
:
op_type
,
...
...
python/paddle/fluid/tests/unittests/ir/inference/test_trt_convert_fill_any_like.py
浏览文件 @
f12f2a9d
...
...
@@ -36,7 +36,7 @@ class TrtConvertExpandV2Test(TrtLayerAutoScanTest):
if
self
.
dims
==
4
:
self
.
input_shape
=
[
1
,
1
,
4
,
6
]
if
self
.
dtype
==
0
:
return
np
.
random
.
random
([
1
,
1
,
4
,
6
]).
astype
(
np
.
bool
)
return
np
.
random
.
random
([
1
,
1
,
4
,
6
]).
astype
(
np
.
bool
_
)
elif
self
.
dtype
==
2
or
self
.
dtype
==
-
1
:
return
np
.
random
.
random
([
1
,
1
,
4
,
6
]).
astype
(
np
.
int32
)
elif
self
.
dtype
==
3
:
...
...
python/paddle/fluid/tests/unittests/ir/inference/test_trt_convert_one_hot.py
浏览文件 @
f12f2a9d
...
...
@@ -59,7 +59,7 @@ class TrtConvertOneHotTest(TrtLayerAutoScanTest):
},
"op_outputs"
:
{
"Out"
:
[
"output_data"
]},
"op_attrs"
:
dics
[
0
],
"outputs_dtype"
:
{
"output_data"
:
np
.
int
},
"outputs_dtype"
:
{
"output_data"
:
np
.
int
64
},
},
]
ops
=
self
.
generate_op_config
(
ops_config
)
...
...
python/paddle/fluid/tests/unittests/ir/inference/test_trt_convert_unary.py
浏览文件 @
f12f2a9d
...
...
@@ -193,7 +193,7 @@ class TrtConvertLogicalNotTest(TrtLayerAutoScanTest):
"op_inputs"
:
{
"X"
:
[
"input_data"
]},
"op_outputs"
:
{
"Out"
:
[
"cast_output_data1"
]},
"op_attrs"
:
dics
[
1
],
"outputs_dtype"
:
{
"cast_output_data1"
:
np
.
bool
},
"outputs_dtype"
:
{
"cast_output_data1"
:
np
.
bool
_
},
},
{
"op_type"
:
op_type
,
...
...
@@ -202,7 +202,7 @@ class TrtConvertLogicalNotTest(TrtLayerAutoScanTest):
},
"op_outputs"
:
{
"Out"
:
[
"cast_output_data0"
]},
"op_attrs"
:
dics
[
0
],
"outputs_dtype"
:
{
"cast_output_data0"
:
np
.
bool
},
"outputs_dtype"
:
{
"cast_output_data0"
:
np
.
bool
_
},
},
{
"op_type"
:
"cast"
,
...
...
python/paddle/fluid/tests/unittests/ir/inference/test_trt_convert_where.py
浏览文件 @
f12f2a9d
...
...
@@ -73,7 +73,7 @@ class TrtConvertActivationTest(TrtLayerAutoScanTest):
"op_inputs"
:
{
"X"
:
[
"condition_data"
]},
"op_outputs"
:
{
"Out"
:
[
"condition_data_bool"
]},
"op_attrs"
:
{
"in_dtype"
:
5
,
"out_dtype"
:
0
},
"outputs_dtype"
:
{
"condition_data_bool"
:
np
.
bool
},
"outputs_dtype"
:
{
"condition_data_bool"
:
np
.
bool
_
},
},
{
"op_type"
:
"where"
,
...
...
@@ -84,7 +84,7 @@ class TrtConvertActivationTest(TrtLayerAutoScanTest):
},
"op_outputs"
:
{
"Out"
:
[
"output_data"
]},
"op_attrs"
:
dics
[
0
],
"outputs_dtype"
:
{
"condition_data_bool"
:
np
.
bool
},
"outputs_dtype"
:
{
"condition_data_bool"
:
np
.
bool
_
},
},
]
ops
=
self
.
generate_op_config
(
ops_config
)
...
...
python/paddle/fluid/tests/unittests/npu/test_assign_value_op_npu.py
浏览文件 @
f12f2a9d
...
...
@@ -70,7 +70,7 @@ class TestAssignValueNPUOp3(TestAssignValueNPUOp):
class
TestAssignValueNPUOp4
(
TestAssignValueNPUOp
):
def
init_data
(
self
):
self
.
value
=
np
.
random
.
choice
(
a
=
[
False
,
True
],
size
=
(
2
,
5
)).
astype
(
np
.
bool
np
.
bool
_
)
self
.
attrs
[
"bool_values"
]
=
[
int
(
v
)
for
v
in
self
.
value
.
flat
]
...
...
@@ -116,7 +116,7 @@ class TestAssignApi4(TestAssignApi):
def
setUp
(
self
):
self
.
init_dtype
()
self
.
value
=
np
.
random
.
choice
(
a
=
[
False
,
True
],
size
=
(
2
,
5
)).
astype
(
np
.
bool
np
.
bool
_
)
self
.
place
=
(
fluid
.
NPUPlace
(
0
)
...
...
python/paddle/fluid/tests/unittests/test_assign_value_op.py
浏览文件 @
f12f2a9d
...
...
@@ -60,7 +60,7 @@ class TestAssignValueOp3(TestAssignValueOp):
class
TestAssignValueOp4
(
TestAssignValueOp
):
def
init_data
(
self
):
self
.
value
=
np
.
random
.
choice
(
a
=
[
False
,
True
],
size
=
(
2
,
5
)).
astype
(
np
.
bool
np
.
bool
_
)
self
.
attrs
[
"bool_values"
]
=
[
int
(
v
)
for
v
in
self
.
value
.
flat
]
...
...
@@ -106,7 +106,7 @@ class TestAssignApi4(TestAssignApi):
def
setUp
(
self
):
self
.
init_dtype
()
self
.
value
=
np
.
random
.
choice
(
a
=
[
False
,
True
],
size
=
(
2
,
5
)).
astype
(
np
.
bool
np
.
bool
_
)
self
.
place
=
(
fluid
.
CUDAPlace
(
0
)
...
...
python/paddle/fluid/tests/unittests/test_fused_multi_transformer_int8_op.py
浏览文件 @
f12f2a9d
...
...
@@ -175,7 +175,7 @@ class TestFusedMultiTransformerInt8Op(unittest.TestCase):
self
.
x_type
=
np
.
float32
self
.
attn_mask_type
=
np
.
float64
# self.attn_mask_type = np.bool
# self.attn_mask_type = np.bool
_
self
.
pre_layer_norm
=
True
self
.
has_attn_mask
=
True
...
...
python/paddle/fluid/tests/unittests/test_fused_multi_transformer_op.py
浏览文件 @
f12f2a9d
...
...
@@ -109,7 +109,7 @@ class TestFusedMultiTransformerOp(OpTest):
self
.
x_type
=
np
.
float32
self
.
attn_mask_type
=
np
.
float64
# self.attn_mask_type = np.bool
# self.attn_mask_type = np.bool
_
self
.
pre_layer_norm
=
True
self
.
has_attn_mask
=
True
...
...
python/paddle/fluid/tests/unittests/test_update_loss_scaling_op.py
浏览文件 @
f12f2a9d
...
...
@@ -85,7 +85,7 @@ class TestUpdateLossScalingOp(OpTest):
self
.
num_good_steps
=
np
.
array
([
999
],
dtype
=
np
.
int32
)
self
.
num_bad_steps
=
np
.
array
([
1
],
dtype
=
np
.
int32
)
self
.
zero_steps
=
np
.
array
([
0
],
dtype
=
np
.
int32
)
self
.
stop_update
=
np
.
array
([
False
],
dtype
=
np
.
bool
)
self
.
stop_update
=
np
.
array
([
False
],
dtype
=
np
.
bool
_
)
self
.
attrs
=
{
'incr_every_n_steps'
:
1000
,
'decr_every_n_nan_or_inf'
:
2
,
...
...
python/paddle/fluid/tests/unittests/xpu/test_assign_value_op_xpu.py
浏览文件 @
f12f2a9d
...
...
@@ -75,7 +75,7 @@ class XPUTestAssignValueOp(XPUOpTestWrapper):
class
TestAssignValueOp4
(
TestAssignValueOp
):
def
init_data
(
self
):
self
.
value
=
np
.
random
.
choice
(
a
=
[
False
,
True
],
size
=
(
2
,
5
)).
astype
(
np
.
bool
np
.
bool
_
)
self
.
attrs
[
"bool_values"
]
=
[
int
(
v
)
for
v
in
self
.
value
.
flat
]
...
...
@@ -117,7 +117,7 @@ class TestAssignApi4(TestAssignApi):
def
setUp
(
self
):
self
.
init_dtype
()
self
.
value
=
np
.
random
.
choice
(
a
=
[
False
,
True
],
size
=
(
2
,
5
)).
astype
(
np
.
bool
np
.
bool
_
)
self
.
place
=
fluid
.
XPUPlace
(
0
)
...
...
python/paddle/fluid/tests/unittests/xpu/test_bitwise_op_xpu.py
浏览文件 @
f12f2a9d
...
...
@@ -300,7 +300,7 @@ class XPUTestBitwiseNot(XPUOpTestWrapper):
self
.
outputs
=
{
'Out'
:
out
}
def
init_case
(
self
):
self
.
dtype
=
np
.
bool
self
.
dtype
=
np
.
bool
_
self
.
x_shape
=
[
2
,
3
,
4
,
5
]
...
...
python/paddle/fluid/tests/unittests/xpu/test_logical_op_xpu.py
浏览文件 @
f12f2a9d
...
...
@@ -47,7 +47,7 @@ class XPUTestLogicalAnd(XPUOpTestWrapper):
self
.
op_type
=
'logical_and'
# special range for bool dtype
if
self
.
dtype
==
np
.
dtype
(
np
.
bool
):
if
self
.
dtype
==
np
.
dtype
(
np
.
bool
_
):
self
.
low
=
0
self
.
high
=
2
...
...
@@ -108,7 +108,7 @@ class XPUTestLogicalOr(XPUOpTestWrapper):
self
.
op_type
=
'logical_or'
# special range for bool dtype
if
self
.
dtype
==
np
.
dtype
(
np
.
bool
):
if
self
.
dtype
==
np
.
dtype
(
np
.
bool
_
):
self
.
low
=
0
self
.
high
=
2
...
...
@@ -169,7 +169,7 @@ class XPUTestLogicalXor(XPUOpTestWrapper):
self
.
op_type
=
'logical_xor'
# special range for bool dtype
if
self
.
dtype
==
np
.
dtype
(
np
.
bool
):
if
self
.
dtype
==
np
.
dtype
(
np
.
bool
_
):
self
.
low
=
0
self
.
high
=
2
...
...
@@ -230,7 +230,7 @@ class XPUTestLogicalNot(XPUOpTestWrapper):
self
.
op_type
=
'logical_not'
# special range for bool dtype
if
self
.
dtype
==
np
.
dtype
(
np
.
bool
):
if
self
.
dtype
==
np
.
dtype
(
np
.
bool
_
):
self
.
low
=
0
self
.
high
=
2
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录