Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle
提交
88b986a6
P
Paddle
项目概览
PaddlePaddle
/
Paddle
大约 1 年 前同步成功
通知
2299
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看板
未验证
提交
88b986a6
编写于
7月 07, 2023
作者:
张
张春乔
提交者:
GitHub
7月 07, 2023
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[CodeStyle][CINN] ruff F401,F632,F811 in test/cinn (#55013)
上级
3cca2a87
变更
130
展开全部
隐藏空白更改
内联
并排
Showing
130 changed file
with
53 addition
and
312 deletion
+53
-312
pyproject.toml
pyproject.toml
+0
-3
test/cinn/auto_schedule/cost_model/test_cost_model.py
test/cinn/auto_schedule/cost_model/test_cost_model.py
+0
-1
test/cinn/fake_model/naive_mul.py
test/cinn/fake_model/naive_mul.py
+0
-5
test/cinn/fake_model/naive_multi_fc.py
test/cinn/fake_model/naive_multi_fc.py
+0
-4
test/cinn/fake_model/resnet_model.py
test/cinn/fake_model/resnet_model.py
+0
-5
test/cinn/op_mappers/op_mapper_test.py
test/cinn/op_mappers/op_mapper_test.py
+2
-3
test/cinn/op_mappers/test_argsort_op.py
test/cinn/op_mappers/test_argsort_op.py
+1
-2
test/cinn/op_mappers/test_assign_value_op.py
test/cinn/op_mappers/test_assign_value_op.py
+1
-3
test/cinn/op_mappers/test_atan2_op.py
test/cinn/op_mappers/test_atan2_op.py
+1
-2
test/cinn/op_mappers/test_batch_norm_op.py
test/cinn/op_mappers/test_batch_norm_op.py
+1
-2
test/cinn/op_mappers/test_bitwise_op.py
test/cinn/op_mappers/test_bitwise_op.py
+1
-2
test/cinn/op_mappers/test_compare_op.py
test/cinn/op_mappers/test_compare_op.py
+1
-2
test/cinn/op_mappers/test_conv2d_op.py
test/cinn/op_mappers/test_conv2d_op.py
+1
-2
test/cinn/op_mappers/test_cumsum_op.py
test/cinn/op_mappers/test_cumsum_op.py
+1
-2
test/cinn/op_mappers/test_elementwise_op.py
test/cinn/op_mappers/test_elementwise_op.py
+1
-2
test/cinn/op_mappers/test_expand_op.py
test/cinn/op_mappers/test_expand_op.py
+1
-2
test/cinn/op_mappers/test_expand_v2_op.py
test/cinn/op_mappers/test_expand_v2_op.py
+1
-2
test/cinn/op_mappers/test_fill_constant_op.py
test/cinn/op_mappers/test_fill_constant_op.py
+1
-1
test/cinn/op_mappers/test_gather_nd_op.py
test/cinn/op_mappers/test_gather_nd_op.py
+1
-1
test/cinn/op_mappers/test_gather_op.py
test/cinn/op_mappers/test_gather_op.py
+1
-2
test/cinn/op_mappers/test_gaussian_random_op.py
test/cinn/op_mappers/test_gaussian_random_op.py
+1
-4
test/cinn/op_mappers/test_layer_norm_op.py
test/cinn/op_mappers/test_layer_norm_op.py
+1
-3
test/cinn/op_mappers/test_log1p_op.py
test/cinn/op_mappers/test_log1p_op.py
+1
-2
test/cinn/op_mappers/test_logical_op.py
test/cinn/op_mappers/test_logical_op.py
+1
-2
test/cinn/op_mappers/test_lookup_table_op.py
test/cinn/op_mappers/test_lookup_table_op.py
+1
-2
test/cinn/op_mappers/test_mul_op.py
test/cinn/op_mappers/test_mul_op.py
+1
-2
test/cinn/op_mappers/test_norm_op.py
test/cinn/op_mappers/test_norm_op.py
+1
-2
test/cinn/op_mappers/test_one_hot_op.py
test/cinn/op_mappers/test_one_hot_op.py
+1
-2
test/cinn/op_mappers/test_pow_op.py
test/cinn/op_mappers/test_pow_op.py
+1
-2
test/cinn/op_mappers/test_randint_op.py
test/cinn/op_mappers/test_randint_op.py
+1
-4
test/cinn/op_mappers/test_reduce_op.py
test/cinn/op_mappers/test_reduce_op.py
+1
-2
test/cinn/op_mappers/test_roll_op.py
test/cinn/op_mappers/test_roll_op.py
+1
-1
test/cinn/op_mappers/test_scale_op.py
test/cinn/op_mappers/test_scale_op.py
+1
-2
test/cinn/op_mappers/test_sign_op.py
test/cinn/op_mappers/test_sign_op.py
+1
-1
test/cinn/op_mappers/test_split_op.py
test/cinn/op_mappers/test_split_op.py
+1
-2
test/cinn/op_mappers/test_squeeze_op.py
test/cinn/op_mappers/test_squeeze_op.py
+1
-2
test/cinn/op_mappers/test_stack_op.py
test/cinn/op_mappers/test_stack_op.py
+1
-2
test/cinn/op_mappers/test_strided_slice_op.py
test/cinn/op_mappers/test_strided_slice_op.py
+1
-2
test/cinn/op_mappers/test_tile_op.py
test/cinn/op_mappers/test_tile_op.py
+1
-1
test/cinn/op_mappers/test_transpose2_op.py
test/cinn/op_mappers/test_transpose2_op.py
+1
-2
test/cinn/op_mappers/test_unary_op.py
test/cinn/op_mappers/test_unary_op.py
+1
-1
test/cinn/op_mappers/test_uniform_random_op.py
test/cinn/op_mappers/test_uniform_random_op.py
+1
-4
test/cinn/op_mappers/test_where_op.py
test/cinn/op_mappers/test_where_op.py
+1
-2
test/cinn/ops/op_test.py
test/cinn/ops/op_test.py
+0
-2
test/cinn/ops/test_abs_op.py
test/cinn/ops/test_abs_op.py
+0
-1
test/cinn/ops/test_acos_op.py
test/cinn/ops/test_acos_op.py
+0
-3
test/cinn/ops/test_acosh_op.py
test/cinn/ops/test_acosh_op.py
+0
-3
test/cinn/ops/test_asin_op.py
test/cinn/ops/test_asin_op.py
+0
-2
test/cinn/ops/test_asinh_op.py
test/cinn/ops/test_asinh_op.py
+0
-3
test/cinn/ops/test_atan_op.py
test/cinn/ops/test_atan_op.py
+0
-3
test/cinn/ops/test_atanh_op.py
test/cinn/ops/test_atanh_op.py
+0
-3
test/cinn/ops/test_batch_norm_op.py
test/cinn/ops/test_batch_norm_op.py
+0
-4
test/cinn/ops/test_binary_elementwise_op.py
test/cinn/ops/test_binary_elementwise_op.py
+0
-1
test/cinn/ops/test_bitcast_convert_op.py
test/cinn/ops/test_bitcast_convert_op.py
+0
-1
test/cinn/ops/test_broadcast_to_op.py
test/cinn/ops/test_broadcast_to_op.py
+1
-3
test/cinn/ops/test_cast_op.py
test/cinn/ops/test_cast_op.py
+0
-3
test/cinn/ops/test_conv2d_op.py
test/cinn/ops/test_conv2d_op.py
+0
-3
test/cinn/ops/test_cos_op.py
test/cinn/ops/test_cos_op.py
+0
-2
test/cinn/ops/test_cosh_op.py
test/cinn/ops/test_cosh_op.py
+0
-2
test/cinn/ops/test_depthwise_conv2d_op.py
test/cinn/ops/test_depthwise_conv2d_op.py
+0
-1
test/cinn/ops/test_divide_op.py
test/cinn/ops/test_divide_op.py
+1
-1
test/cinn/ops/test_dropout_infer_op.py
test/cinn/ops/test_dropout_infer_op.py
+2
-5
test/cinn/ops/test_erf_op.py
test/cinn/ops/test_erf_op.py
+0
-2
test/cinn/ops/test_exp_op.py
test/cinn/ops/test_exp_op.py
+0
-2
test/cinn/ops/test_floor_divide_op.py
test/cinn/ops/test_floor_divide_op.py
+0
-4
test/cinn/ops/test_floor_op.py
test/cinn/ops/test_floor_op.py
+0
-2
test/cinn/ops/test_gather_nd_op.py
test/cinn/ops/test_gather_nd_op.py
+0
-1
test/cinn/ops/test_gather_op.py
test/cinn/ops/test_gather_op.py
+0
-3
test/cinn/ops/test_gaussian_random_op.py
test/cinn/ops/test_gaussian_random_op.py
+0
-1
test/cinn/ops/test_gelu_op.py
test/cinn/ops/test_gelu_op.py
+0
-3
test/cinn/ops/test_identity_op.py
test/cinn/ops/test_identity_op.py
+0
-1
test/cinn/ops/test_is_finite_op.py
test/cinn/ops/test_is_finite_op.py
+0
-1
test/cinn/ops/test_is_inf_op.py
test/cinn/ops/test_is_inf_op.py
+0
-1
test/cinn/ops/test_is_nan_op.py
test/cinn/ops/test_is_nan_op.py
+0
-1
test/cinn/ops/test_isclose_op.py
test/cinn/ops/test_isclose_op.py
+0
-1
test/cinn/ops/test_left_shift_op.py
test/cinn/ops/test_left_shift_op.py
+0
-2
test/cinn/ops/test_log_op.py
test/cinn/ops/test_log_op.py
+0
-1
test/cinn/ops/test_logical_and_op.py
test/cinn/ops/test_logical_and_op.py
+0
-2
test/cinn/ops/test_logical_not_op.py
test/cinn/ops/test_logical_not_op.py
+0
-3
test/cinn/ops/test_logical_or_op.py
test/cinn/ops/test_logical_or_op.py
+0
-2
test/cinn/ops/test_logical_right_shift_op.py
test/cinn/ops/test_logical_right_shift_op.py
+0
-1
test/cinn/ops/test_logical_xor_op.py
test/cinn/ops/test_logical_xor_op.py
+0
-2
test/cinn/ops/test_lookup_table_op.py
test/cinn/ops/test_lookup_table_op.py
+0
-1
test/cinn/ops/test_matmul_op.py
test/cinn/ops/test_matmul_op.py
+0
-4
test/cinn/ops/test_mod_op.py
test/cinn/ops/test_mod_op.py
+0
-3
test/cinn/ops/test_negative_op.py
test/cinn/ops/test_negative_op.py
+0
-2
test/cinn/ops/test_one_hot_op.py
test/cinn/ops/test_one_hot_op.py
+0
-3
test/cinn/ops/test_pow_op.py
test/cinn/ops/test_pow_op.py
+0
-1
test/cinn/ops/test_randint_op.py
test/cinn/ops/test_randint_op.py
+0
-3
test/cinn/ops/test_reciprocal_op.py
test/cinn/ops/test_reciprocal_op.py
+1
-3
test/cinn/ops/test_reduce_op.py
test/cinn/ops/test_reduce_op.py
+0
-1
test/cinn/ops/test_reduce_op_new.py
test/cinn/ops/test_reduce_op_new.py
+0
-3
test/cinn/ops/test_relu6_op.py
test/cinn/ops/test_relu6_op.py
+0
-3
test/cinn/ops/test_remainder_op.py
test/cinn/ops/test_remainder_op.py
+0
-1
test/cinn/ops/test_resize_op.py
test/cinn/ops/test_resize_op.py
+0
-7
test/cinn/ops/test_right_shift_op.py
test/cinn/ops/test_right_shift_op.py
+0
-2
test/cinn/ops/test_round_op.py
test/cinn/ops/test_round_op.py
+0
-1
test/cinn/ops/test_rsqrt_op.py
test/cinn/ops/test_rsqrt_op.py
+0
-2
test/cinn/ops/test_scale_op.py
test/cinn/ops/test_scale_op.py
+0
-3
test/cinn/ops/test_sin_op.py
test/cinn/ops/test_sin_op.py
+0
-2
test/cinn/ops/test_sinh_op.py
test/cinn/ops/test_sinh_op.py
+0
-2
test/cinn/ops/test_sqrt_op.py
test/cinn/ops/test_sqrt_op.py
+0
-2
test/cinn/ops/test_tan_op.py
test/cinn/ops/test_tan_op.py
+0
-2
test/cinn/ops/test_tanh_op.py
test/cinn/ops/test_tanh_op.py
+0
-2
test/cinn/ops/test_trunc_op.py
test/cinn/ops/test_trunc_op.py
+0
-2
test/cinn/ops/test_unary_elementwise_op.py
test/cinn/ops/test_unary_elementwise_op.py
+0
-1
test/cinn/ops/test_uniform_random_op.py
test/cinn/ops/test_uniform_random_op.py
+0
-1
test/cinn/ops/test_zero_dim_tensor.py
test/cinn/ops/test_zero_dim_tensor.py
+0
-1
test/cinn/passes/pass_test.py
test/cinn/passes/pass_test.py
+1
-6
test/cinn/test_common.py
test/cinn/test_common.py
+0
-2
test/cinn/test_computation.py
test/cinn/test_computation.py
+0
-2
test/cinn/test_efficientnet.py
test/cinn/test_efficientnet.py
+0
-3
test/cinn/test_facedet.py
test/cinn/test_facedet.py
+0
-3
test/cinn/test_frontend.py
test/cinn/test_frontend.py
+0
-3
test/cinn/test_ir.py
test/cinn/test_ir.py
+0
-2
test/cinn/test_mobilenetv1.py
test/cinn/test_mobilenetv1.py
+0
-3
test/cinn/test_mobilenetv2.py
test/cinn/test_mobilenetv2.py
+0
-3
test/cinn/test_netbuilder.py
test/cinn/test_netbuilder.py
+0
-2
test/cinn/test_op_benchmark.py
test/cinn/test_op_benchmark.py
+2
-4
test/cinn/test_op_broadcast.py
test/cinn/test_op_broadcast.py
+1
-6
test/cinn/test_op_nn.py
test/cinn/test_op_nn.py
+1
-6
test/cinn/test_op_transform.py
test/cinn/test_op_transform.py
+1
-6
test/cinn/test_packed_func.py
test/cinn/test_packed_func.py
+1
-2
test/cinn/test_paddle_model_convertor.py
test/cinn/test_paddle_model_convertor.py
+1
-6
test/cinn/test_pe_elementwise.py
test/cinn/test_pe_elementwise.py
+0
-1
test/cinn/test_resnet.py
test/cinn/test_resnet.py
+0
-3
test/cinn/test_resnet18.py
test/cinn/test_resnet18.py
+0
-3
test/cinn/test_resnet50.py
test/cinn/test_resnet50.py
+0
-3
test/cinn/test_squeezenet.py
test/cinn/test_squeezenet.py
+0
-3
test/cinn/test_utils.py
test/cinn/test_utils.py
+1
-3
未找到文件。
pyproject.toml
浏览文件 @
88b986a6
...
@@ -103,8 +103,5 @@ ignore = [
...
@@ -103,8 +103,5 @@ ignore = [
"F403"
,
"F403"
,
]
]
"test/cinn/**"
=
[
"test/cinn/**"
=
[
"F401"
,
"F403"
,
"F403"
,
"F632"
,
"F811"
,
]
]
test/cinn/auto_schedule/cost_model/test_cost_model.py
浏览文件 @
88b986a6
...
@@ -16,7 +16,6 @@ import os
...
@@ -16,7 +16,6 @@ import os
import
shutil
import
shutil
import
unittest
import
unittest
import
cinn
import
numpy
as
np
import
numpy
as
np
from
cinn.auto_schedule.cost_model
import
CostModel
from
cinn.auto_schedule.cost_model
import
CostModel
...
...
test/cinn/fake_model/naive_mul.py
浏览文件 @
88b986a6
...
@@ -12,11 +12,6 @@
...
@@ -12,11 +12,6 @@
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
import
os
import
sys
import
numpy
import
numpy
as
np
import
paddle
import
paddle
from
paddle
import
fluid
,
static
from
paddle
import
fluid
,
static
...
...
test/cinn/fake_model/naive_multi_fc.py
浏览文件 @
88b986a6
...
@@ -14,11 +14,7 @@
...
@@ -14,11 +14,7 @@
"""
"""
A fake model with multiple FC layers to test CINN on a more complex model.
A fake model with multiple FC layers to test CINN on a more complex model.
"""
"""
import
os
import
sys
import
numpy
import
numpy
as
np
import
paddle
import
paddle
from
paddle
import
fluid
,
static
from
paddle
import
fluid
,
static
...
...
test/cinn/fake_model/resnet_model.py
浏览文件 @
88b986a6
...
@@ -12,11 +12,6 @@
...
@@ -12,11 +12,6 @@
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
import
os
import
sys
import
numpy
import
numpy
as
np
import
paddle
import
paddle
from
paddle
import
fluid
,
static
from
paddle
import
fluid
,
static
...
...
test/cinn/op_mappers/op_mapper_test.py
浏览文件 @
88b986a6
...
@@ -17,18 +17,17 @@
...
@@ -17,18 +17,17 @@
import
logging
import
logging
import
os
import
os
import
sys
import
sys
from
ast
import
arg
from
cinn.common
import
is_compiled_with_cuda
from
cinn.common
import
is_compiled_with_cuda
from
cinn.framework
import
Scope
from
cinn.framework
import
Scope
from
cinn.frontend
import
NetBuilder
,
PaddleModelConvertor
from
cinn.frontend
import
PaddleModelConvertor
import
paddle
import
paddle
from
paddle.fluid.layer_helper
import
LayerHelper
from
paddle.fluid.layer_helper
import
LayerHelper
from
paddle.static
import
Variable
as
PaddleVariable
from
paddle.static
import
Variable
as
PaddleVariable
sys
.
path
.
append
(
"/work/dev_CINN/build/python/tests"
)
sys
.
path
.
append
(
"/work/dev_CINN/build/python/tests"
)
from
test.cinn.ops.op_test
import
OpTest
,
OpTestTool
from
test.cinn.ops.op_test
import
OpTest
logging
.
basicConfig
(
level
=
os
.
environ
.
get
(
'LOG_LEVEL'
,
'INFO'
).
upper
())
logging
.
basicConfig
(
level
=
os
.
environ
.
get
(
'LOG_LEVEL'
,
'INFO'
).
upper
())
logger
=
logging
.
getLogger
(
name
=
"op_test"
)
logger
=
logging
.
getLogger
(
name
=
"op_test"
)
...
...
test/cinn/op_mappers/test_argsort_op.py
浏览文件 @
88b986a6
...
@@ -16,8 +16,7 @@
...
@@ -16,8 +16,7 @@
import
unittest
import
unittest
import
numpy
as
np
from
op_mapper_test
import
OpMapperTest
from
op_mapper_test
import
OpMapperTest
,
logger
import
paddle
import
paddle
...
...
test/cinn/op_mappers/test_assign_value_op.py
浏览文件 @
88b986a6
...
@@ -17,9 +17,7 @@
...
@@ -17,9 +17,7 @@
import
unittest
import
unittest
import
numpy
as
np
import
numpy
as
np
from
op_mapper_test
import
OpMapperTest
,
logger
from
op_mapper_test
import
OpMapperTest
import
paddle
class
TestAssignValueOp
(
OpMapperTest
):
class
TestAssignValueOp
(
OpMapperTest
):
...
...
test/cinn/op_mappers/test_atan2_op.py
浏览文件 @
88b986a6
...
@@ -16,8 +16,7 @@
...
@@ -16,8 +16,7 @@
import
unittest
import
unittest
import
numpy
as
np
from
op_mapper_test
import
OpMapperTest
from
op_mapper_test
import
OpMapperTest
,
logger
import
paddle
import
paddle
...
...
test/cinn/op_mappers/test_batch_norm_op.py
浏览文件 @
88b986a6
...
@@ -16,8 +16,7 @@
...
@@ -16,8 +16,7 @@
import
unittest
import
unittest
import
numpy
as
np
from
op_mapper_test
import
OpMapperTest
from
op_mapper_test
import
OpMapperTest
,
logger
import
paddle
import
paddle
...
...
test/cinn/op_mappers/test_bitwise_op.py
浏览文件 @
88b986a6
...
@@ -16,8 +16,7 @@
...
@@ -16,8 +16,7 @@
import
unittest
import
unittest
import
numpy
as
np
from
op_mapper_test
import
OpMapperTest
from
op_mapper_test
import
OpMapperTest
,
logger
import
paddle
import
paddle
...
...
test/cinn/op_mappers/test_compare_op.py
浏览文件 @
88b986a6
...
@@ -16,8 +16,7 @@
...
@@ -16,8 +16,7 @@
import
unittest
import
unittest
import
numpy
as
np
from
op_mapper_test
import
OpMapperTest
from
op_mapper_test
import
OpMapperTest
,
logger
import
paddle
import
paddle
...
...
test/cinn/op_mappers/test_conv2d_op.py
浏览文件 @
88b986a6
...
@@ -16,8 +16,7 @@
...
@@ -16,8 +16,7 @@
import
unittest
import
unittest
import
numpy
as
np
from
op_mapper_test
import
OpMapperTest
from
op_mapper_test
import
OpMapperTest
,
logger
import
paddle
import
paddle
...
...
test/cinn/op_mappers/test_cumsum_op.py
浏览文件 @
88b986a6
...
@@ -16,8 +16,7 @@
...
@@ -16,8 +16,7 @@
import
unittest
import
unittest
import
numpy
as
np
from
op_mapper_test
import
OpMapperTest
from
op_mapper_test
import
OpMapperTest
,
logger
import
paddle
import
paddle
...
...
test/cinn/op_mappers/test_elementwise_op.py
浏览文件 @
88b986a6
...
@@ -16,8 +16,7 @@
...
@@ -16,8 +16,7 @@
import
unittest
import
unittest
import
numpy
as
np
from
op_mapper_test
import
OpMapperTest
from
op_mapper_test
import
OpMapperTest
,
logger
import
paddle
import
paddle
...
...
test/cinn/op_mappers/test_expand_op.py
浏览文件 @
88b986a6
...
@@ -16,8 +16,7 @@
...
@@ -16,8 +16,7 @@
import
unittest
import
unittest
import
numpy
as
np
from
op_mapper_test
import
OpMapperTest
from
op_mapper_test
import
OpMapperTest
,
logger
import
paddle
import
paddle
...
...
test/cinn/op_mappers/test_expand_v2_op.py
浏览文件 @
88b986a6
...
@@ -16,8 +16,7 @@
...
@@ -16,8 +16,7 @@
import
unittest
import
unittest
import
numpy
as
np
from
op_mapper_test
import
OpMapperTest
from
op_mapper_test
import
OpMapperTest
,
logger
import
paddle
import
paddle
...
...
test/cinn/op_mappers/test_fill_constant_op.py
浏览文件 @
88b986a6
...
@@ -17,7 +17,7 @@
...
@@ -17,7 +17,7 @@
import
unittest
import
unittest
import
numpy
as
np
import
numpy
as
np
from
op_mapper_test
import
OpMapperTest
,
logger
from
op_mapper_test
import
OpMapperTest
import
paddle
import
paddle
...
...
test/cinn/op_mappers/test_gather_nd_op.py
浏览文件 @
88b986a6
...
@@ -17,7 +17,7 @@
...
@@ -17,7 +17,7 @@
import
unittest
import
unittest
import
numpy
as
np
import
numpy
as
np
from
op_mapper_test
import
OpMapperTest
,
logger
from
op_mapper_test
import
OpMapperTest
import
paddle
import
paddle
...
...
test/cinn/op_mappers/test_gather_op.py
浏览文件 @
88b986a6
...
@@ -16,8 +16,7 @@
...
@@ -16,8 +16,7 @@
import
unittest
import
unittest
import
numpy
as
np
from
op_mapper_test
import
OpMapperTest
from
op_mapper_test
import
OpMapperTest
,
logger
import
paddle
import
paddle
...
...
test/cinn/op_mappers/test_gaussian_random_op.py
浏览文件 @
88b986a6
...
@@ -16,10 +16,7 @@
...
@@ -16,10 +16,7 @@
import
unittest
import
unittest
import
numpy
as
np
from
op_mapper_test
import
OpMapperTest
from
op_mapper_test
import
OpMapperTest
,
logger
import
paddle
class
TestGaussianRandomOp
(
OpMapperTest
):
class
TestGaussianRandomOp
(
OpMapperTest
):
...
...
test/cinn/op_mappers/test_layer_norm_op.py
浏览文件 @
88b986a6
...
@@ -14,11 +14,9 @@
...
@@ -14,11 +14,9 @@
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
import
functools
import
unittest
import
unittest
import
numpy
as
np
from
op_mapper_test
import
OpMapperTest
from
op_mapper_test
import
OpMapperTest
,
logger
import
paddle
import
paddle
...
...
test/cinn/op_mappers/test_log1p_op.py
浏览文件 @
88b986a6
...
@@ -16,8 +16,7 @@
...
@@ -16,8 +16,7 @@
import
unittest
import
unittest
import
numpy
as
np
from
op_mapper_test
import
OpMapperTest
from
op_mapper_test
import
OpMapperTest
,
logger
import
paddle
import
paddle
...
...
test/cinn/op_mappers/test_logical_op.py
浏览文件 @
88b986a6
...
@@ -16,8 +16,7 @@
...
@@ -16,8 +16,7 @@
import
unittest
import
unittest
import
numpy
as
np
from
op_mapper_test
import
OpMapperTest
from
op_mapper_test
import
OpMapperTest
,
logger
import
paddle
import
paddle
...
...
test/cinn/op_mappers/test_lookup_table_op.py
浏览文件 @
88b986a6
...
@@ -14,8 +14,7 @@
...
@@ -14,8 +14,7 @@
import
unittest
import
unittest
import
numpy
as
np
from
op_mapper_test
import
OpMapperTest
from
op_mapper_test
import
OpMapperTest
,
logger
import
paddle
import
paddle
...
...
test/cinn/op_mappers/test_mul_op.py
浏览文件 @
88b986a6
...
@@ -16,8 +16,7 @@
...
@@ -16,8 +16,7 @@
import
unittest
import
unittest
import
numpy
as
np
from
op_mapper_test
import
OpMapperTest
from
op_mapper_test
import
OpMapperTest
,
logger
import
paddle
import
paddle
...
...
test/cinn/op_mappers/test_norm_op.py
浏览文件 @
88b986a6
...
@@ -16,8 +16,7 @@
...
@@ -16,8 +16,7 @@
import
unittest
import
unittest
import
numpy
as
np
from
op_mapper_test
import
OpMapperTest
from
op_mapper_test
import
OpMapperTest
,
logger
import
paddle
import
paddle
...
...
test/cinn/op_mappers/test_one_hot_op.py
浏览文件 @
88b986a6
...
@@ -14,8 +14,7 @@
...
@@ -14,8 +14,7 @@
import
unittest
import
unittest
import
numpy
as
np
from
op_mapper_test
import
OpMapperTest
from
op_mapper_test
import
OpMapperTest
,
logger
import
paddle
import
paddle
...
...
test/cinn/op_mappers/test_pow_op.py
浏览文件 @
88b986a6
...
@@ -16,8 +16,7 @@
...
@@ -16,8 +16,7 @@
import
unittest
import
unittest
import
numpy
as
np
from
op_mapper_test
import
OpMapperTest
from
op_mapper_test
import
OpMapperTest
,
logger
import
paddle
import
paddle
...
...
test/cinn/op_mappers/test_randint_op.py
浏览文件 @
88b986a6
...
@@ -16,10 +16,7 @@
...
@@ -16,10 +16,7 @@
import
unittest
import
unittest
import
numpy
as
np
from
op_mapper_test
import
OpMapperTest
from
op_mapper_test
import
OpMapperTest
,
logger
import
paddle
class
TestRandIntOp
(
OpMapperTest
):
class
TestRandIntOp
(
OpMapperTest
):
...
...
test/cinn/op_mappers/test_reduce_op.py
浏览文件 @
88b986a6
...
@@ -16,8 +16,7 @@
...
@@ -16,8 +16,7 @@
import
unittest
import
unittest
import
numpy
as
np
from
op_mapper_test
import
OpMapperTest
from
op_mapper_test
import
OpMapperTest
,
logger
import
paddle
import
paddle
...
...
test/cinn/op_mappers/test_roll_op.py
浏览文件 @
88b986a6
...
@@ -17,7 +17,7 @@
...
@@ -17,7 +17,7 @@
import
unittest
import
unittest
import
numpy
as
np
import
numpy
as
np
from
op_mapper_test
import
OpMapperTest
,
logger
from
op_mapper_test
import
OpMapperTest
import
paddle
import
paddle
...
...
test/cinn/op_mappers/test_scale_op.py
浏览文件 @
88b986a6
...
@@ -16,8 +16,7 @@
...
@@ -16,8 +16,7 @@
import
unittest
import
unittest
import
numpy
as
np
from
op_mapper_test
import
OpMapperTest
from
op_mapper_test
import
OpMapperTest
,
logger
import
paddle
import
paddle
...
...
test/cinn/op_mappers/test_sign_op.py
浏览文件 @
88b986a6
...
@@ -17,7 +17,7 @@
...
@@ -17,7 +17,7 @@
import
unittest
import
unittest
import
numpy
as
np
import
numpy
as
np
from
op_mapper_test
import
OpMapperTest
,
logger
from
op_mapper_test
import
OpMapperTest
import
paddle
import
paddle
...
...
test/cinn/op_mappers/test_split_op.py
浏览文件 @
88b986a6
...
@@ -16,8 +16,7 @@
...
@@ -16,8 +16,7 @@
import
unittest
import
unittest
import
numpy
as
np
from
op_mapper_test
import
OpMapperTest
from
op_mapper_test
import
OpMapperTest
,
logger
import
paddle
import
paddle
...
...
test/cinn/op_mappers/test_squeeze_op.py
浏览文件 @
88b986a6
...
@@ -16,8 +16,7 @@
...
@@ -16,8 +16,7 @@
import
unittest
import
unittest
import
numpy
as
np
from
op_mapper_test
import
OpMapperTest
from
op_mapper_test
import
OpMapperTest
,
logger
import
paddle
import
paddle
...
...
test/cinn/op_mappers/test_stack_op.py
浏览文件 @
88b986a6
...
@@ -16,8 +16,7 @@
...
@@ -16,8 +16,7 @@
import
unittest
import
unittest
import
numpy
as
np
from
op_mapper_test
import
OpMapperTest
from
op_mapper_test
import
OpMapperTest
,
logger
import
paddle
import
paddle
...
...
test/cinn/op_mappers/test_strided_slice_op.py
浏览文件 @
88b986a6
...
@@ -16,8 +16,7 @@
...
@@ -16,8 +16,7 @@
import
unittest
import
unittest
import
numpy
as
np
from
op_mapper_test
import
OpMapperTest
from
op_mapper_test
import
OpMapperTest
,
logger
import
paddle
import
paddle
...
...
test/cinn/op_mappers/test_tile_op.py
浏览文件 @
88b986a6
...
@@ -17,7 +17,7 @@
...
@@ -17,7 +17,7 @@
import
unittest
import
unittest
import
numpy
as
np
import
numpy
as
np
from
op_mapper_test
import
OpMapperTest
,
logger
from
op_mapper_test
import
OpMapperTest
import
paddle
import
paddle
...
...
test/cinn/op_mappers/test_transpose2_op.py
浏览文件 @
88b986a6
...
@@ -16,8 +16,7 @@
...
@@ -16,8 +16,7 @@
import
unittest
import
unittest
import
numpy
as
np
from
op_mapper_test
import
OpMapperTest
from
op_mapper_test
import
OpMapperTest
,
logger
import
paddle
import
paddle
...
...
test/cinn/op_mappers/test_unary_op.py
浏览文件 @
88b986a6
...
@@ -17,7 +17,7 @@
...
@@ -17,7 +17,7 @@
import
unittest
import
unittest
import
numpy
as
np
import
numpy
as
np
from
op_mapper_test
import
OpMapperTest
,
logger
from
op_mapper_test
import
OpMapperTest
import
paddle
import
paddle
...
...
test/cinn/op_mappers/test_uniform_random_op.py
浏览文件 @
88b986a6
...
@@ -16,10 +16,7 @@
...
@@ -16,10 +16,7 @@
import
unittest
import
unittest
import
numpy
as
np
from
op_mapper_test
import
OpMapperTest
from
op_mapper_test
import
OpMapperTest
,
logger
import
paddle
class
TestUniformRandomOp
(
OpMapperTest
):
class
TestUniformRandomOp
(
OpMapperTest
):
...
...
test/cinn/op_mappers/test_where_op.py
浏览文件 @
88b986a6
...
@@ -16,8 +16,7 @@
...
@@ -16,8 +16,7 @@
import
unittest
import
unittest
import
numpy
as
np
from
op_mapper_test
import
OpMapperTest
from
op_mapper_test
import
OpMapperTest
,
logger
import
paddle
import
paddle
...
...
test/cinn/ops/op_test.py
浏览文件 @
88b986a6
...
@@ -16,10 +16,8 @@ import logging
...
@@ -16,10 +16,8 @@ import logging
import
os
import
os
import
struct
import
struct
import
unittest
import
unittest
from
contextlib
import
contextmanager
import
numpy
as
np
import
numpy
as
np
from
cinn
import
Target
from
cinn.common
import
*
from
cinn.common
import
*
from
cinn.frontend
import
*
from
cinn.frontend
import
*
from
cinn.runtime
import
seed
as
cinn_seed
from
cinn.runtime
import
seed
as
cinn_seed
...
...
test/cinn/ops/test_abs_op.py
浏览文件 @
88b986a6
...
@@ -14,7 +14,6 @@
...
@@ -14,7 +14,6 @@
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
import
unittest
from
cinn.common
import
*
from
cinn.common
import
*
from
cinn.frontend
import
*
from
cinn.frontend
import
*
...
...
test/cinn/ops/test_acos_op.py
浏览文件 @
88b986a6
...
@@ -12,10 +12,7 @@
...
@@ -12,10 +12,7 @@
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
import
unittest
import
cinn
import
numpy
as
np
from
cinn.common
import
*
from
cinn.common
import
*
from
cinn.frontend
import
*
from
cinn.frontend
import
*
from
op_test
import
OpTest
,
OpTestTool
from
op_test
import
OpTest
,
OpTestTool
...
...
test/cinn/ops/test_acosh_op.py
浏览文件 @
88b986a6
...
@@ -12,10 +12,7 @@
...
@@ -12,10 +12,7 @@
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
import
unittest
import
cinn
import
numpy
as
np
from
cinn.common
import
*
from
cinn.common
import
*
from
cinn.frontend
import
*
from
cinn.frontend
import
*
from
op_test
import
OpTest
,
OpTestTool
from
op_test
import
OpTest
,
OpTestTool
...
...
test/cinn/ops/test_asin_op.py
浏览文件 @
88b986a6
...
@@ -14,8 +14,6 @@
...
@@ -14,8 +14,6 @@
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
import
cinn
import
numpy
as
np
from
cinn.common
import
*
from
cinn.common
import
*
from
cinn.frontend
import
*
from
cinn.frontend
import
*
from
op_test
import
OpTest
,
OpTestTool
from
op_test
import
OpTest
,
OpTestTool
...
...
test/cinn/ops/test_asinh_op.py
浏览文件 @
88b986a6
...
@@ -12,10 +12,7 @@
...
@@ -12,10 +12,7 @@
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
import
unittest
import
cinn
import
numpy
as
np
from
cinn.common
import
*
from
cinn.common
import
*
from
cinn.frontend
import
*
from
cinn.frontend
import
*
from
op_test
import
OpTest
,
OpTestTool
from
op_test
import
OpTest
,
OpTestTool
...
...
test/cinn/ops/test_atan_op.py
浏览文件 @
88b986a6
...
@@ -12,10 +12,7 @@
...
@@ -12,10 +12,7 @@
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
import
unittest
import
cinn
import
numpy
as
np
from
cinn.common
import
*
from
cinn.common
import
*
from
cinn.frontend
import
*
from
cinn.frontend
import
*
from
op_test
import
OpTest
,
OpTestTool
from
op_test
import
OpTest
,
OpTestTool
...
...
test/cinn/ops/test_atanh_op.py
浏览文件 @
88b986a6
...
@@ -12,10 +12,7 @@
...
@@ -12,10 +12,7 @@
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
import
unittest
import
cinn
import
numpy
as
np
from
cinn.common
import
*
from
cinn.common
import
*
from
cinn.frontend
import
*
from
cinn.frontend
import
*
from
op_test
import
OpTest
,
OpTestTool
from
op_test
import
OpTest
,
OpTestTool
...
...
test/cinn/ops/test_batch_norm_op.py
浏览文件 @
88b986a6
...
@@ -14,11 +14,7 @@
...
@@ -14,11 +14,7 @@
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
import
sys
import
unittest
import
cinn
import
numpy
as
np
from
cinn.common
import
*
from
cinn.common
import
*
from
cinn.frontend
import
*
from
cinn.frontend
import
*
from
op_test
import
OpTest
,
OpTestTool
from
op_test
import
OpTest
,
OpTestTool
...
...
test/cinn/ops/test_binary_elementwise_op.py
浏览文件 @
88b986a6
...
@@ -16,7 +16,6 @@
...
@@ -16,7 +16,6 @@
import
unittest
import
unittest
import
cinn
import
numpy
as
np
import
numpy
as
np
from
cinn.common
import
*
from
cinn.common
import
*
from
cinn.frontend
import
*
from
cinn.frontend
import
*
...
...
test/cinn/ops/test_bitcast_convert_op.py
浏览文件 @
88b986a6
...
@@ -15,7 +15,6 @@
...
@@ -15,7 +15,6 @@
import
unittest
import
unittest
from
struct
import
pack
,
unpack
from
struct
import
pack
,
unpack
import
cinn
import
numpy
as
np
import
numpy
as
np
from
cinn.common
import
*
from
cinn.common
import
*
from
cinn.frontend
import
*
from
cinn.frontend
import
*
...
...
test/cinn/ops/test_broadcast_to_op.py
浏览文件 @
88b986a6
...
@@ -14,14 +14,12 @@
...
@@ -14,14 +14,12 @@
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
import
sys
import
unittest
import
unittest
import
cinn
import
numpy
as
np
import
numpy
as
np
from
cinn.common
import
*
from
cinn.common
import
*
from
cinn.frontend
import
*
from
cinn.frontend
import
*
from
op_test
import
OpTest
,
OpTestTool
from
op_test
import
OpTest
import
paddle
import
paddle
...
...
test/cinn/ops/test_cast_op.py
浏览文件 @
88b986a6
...
@@ -14,10 +14,7 @@
...
@@ -14,10 +14,7 @@
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
import
unittest
import
cinn
import
numpy
as
np
from
cinn.common
import
*
from
cinn.common
import
*
from
cinn.frontend
import
*
from
cinn.frontend
import
*
from
op_test
import
OpTest
,
OpTestTool
from
op_test
import
OpTest
,
OpTestTool
...
...
test/cinn/ops/test_conv2d_op.py
浏览文件 @
88b986a6
...
@@ -13,10 +13,7 @@
...
@@ -13,10 +13,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
import
unittest
import
cinn
import
numpy
as
np
from
cinn.common
import
*
from
cinn.common
import
*
from
cinn.frontend
import
*
from
cinn.frontend
import
*
from
cinn.runtime
import
*
from
cinn.runtime
import
*
...
...
test/cinn/ops/test_cos_op.py
浏览文件 @
88b986a6
...
@@ -14,8 +14,6 @@
...
@@ -14,8 +14,6 @@
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
import
cinn
import
numpy
as
np
from
cinn.common
import
*
from
cinn.common
import
*
from
cinn.frontend
import
*
from
cinn.frontend
import
*
from
op_test
import
OpTest
,
OpTestTool
from
op_test
import
OpTest
,
OpTestTool
...
...
test/cinn/ops/test_cosh_op.py
浏览文件 @
88b986a6
...
@@ -14,8 +14,6 @@
...
@@ -14,8 +14,6 @@
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
import
cinn
import
numpy
as
np
from
cinn.common
import
*
from
cinn.common
import
*
from
cinn.frontend
import
*
from
cinn.frontend
import
*
from
op_test
import
OpTest
,
OpTestTool
from
op_test
import
OpTest
,
OpTestTool
...
...
test/cinn/ops/test_depthwise_conv2d_op.py
浏览文件 @
88b986a6
...
@@ -12,7 +12,6 @@
...
@@ -12,7 +12,6 @@
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
import
cinn
from
cinn.common
import
*
from
cinn.common
import
*
from
cinn.frontend
import
*
from
cinn.frontend
import
*
from
op_test
import
OpTest
,
OpTestTool
from
op_test
import
OpTest
,
OpTestTool
...
...
test/cinn/ops/test_divide_op.py
浏览文件 @
88b986a6
...
@@ -45,7 +45,7 @@ class TestDivOp(OpTest):
...
@@ -45,7 +45,7 @@ class TestDivOp(OpTest):
)
)
# paddle.divide does not support zero division
# paddle.divide does not support zero division
if
self
.
case
[
"y_dtype"
]
is
"int32"
or
self
.
case
[
"y_dtype"
]
is
"int64"
:
if
self
.
case
[
"y_dtype"
]
==
"int32"
or
self
.
case
[
"y_dtype"
]
==
"int64"
:
self
.
y_np
[
self
.
y_np
==
0
]
=
1
self
.
y_np
[
self
.
y_np
==
0
]
=
1
def
build_paddle_program
(
self
,
target
):
def
build_paddle_program
(
self
,
target
):
...
...
test/cinn/ops/test_dropout_infer_op.py
浏览文件 @
88b986a6
...
@@ -12,10 +12,7 @@
...
@@ -12,10 +12,7 @@
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
import
unittest
import
cinn
import
numpy
as
np
from
cinn.common
import
*
from
cinn.common
import
*
from
cinn.frontend
import
*
from
cinn.frontend
import
*
from
op_test
import
OpTest
,
OpTestTool
from
op_test
import
OpTest
,
OpTestTool
...
@@ -40,9 +37,9 @@ class TestDropoutInferOp(OpTest):
...
@@ -40,9 +37,9 @@ class TestDropoutInferOp(OpTest):
self
.
x_np
=
self
.
random
(
self
.
x_np
=
self
.
random
(
shape
=
self
.
case
[
"x_shape"
],
dtype
=
self
.
case
[
"x_dtype"
]
shape
=
self
.
case
[
"x_shape"
],
dtype
=
self
.
case
[
"x_dtype"
]
)
)
if
self
.
case
[
"mode"
]
is
'upscale_in_train'
:
if
self
.
case
[
"mode"
]
==
'upscale_in_train'
:
self
.
case
[
"cinn_mode"
]
=
'upscale_in_train'
self
.
case
[
"cinn_mode"
]
=
'upscale_in_train'
elif
self
.
case
[
"mode"
]
is
'downscale_in_infer'
:
elif
self
.
case
[
"mode"
]
==
'downscale_in_infer'
:
self
.
case
[
"cinn_mode"
]
=
'downgrade_in_infer'
self
.
case
[
"cinn_mode"
]
=
'downgrade_in_infer'
else
:
else
:
raise
f
"Unknown mode for dropout_infer:
{
self
.
case
[
'mode'
]
}
"
raise
f
"Unknown mode for dropout_infer:
{
self
.
case
[
'mode'
]
}
"
...
...
test/cinn/ops/test_erf_op.py
浏览文件 @
88b986a6
...
@@ -14,8 +14,6 @@
...
@@ -14,8 +14,6 @@
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
import
cinn
import
numpy
as
np
from
cinn.common
import
*
from
cinn.common
import
*
from
cinn.frontend
import
*
from
cinn.frontend
import
*
from
op_test
import
OpTest
,
OpTestTool
from
op_test
import
OpTest
,
OpTestTool
...
...
test/cinn/ops/test_exp_op.py
浏览文件 @
88b986a6
...
@@ -14,8 +14,6 @@
...
@@ -14,8 +14,6 @@
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
import
cinn
import
numpy
as
np
from
cinn.common
import
*
from
cinn.common
import
*
from
cinn.frontend
import
*
from
cinn.frontend
import
*
from
op_test
import
OpTest
,
OpTestTool
from
op_test
import
OpTest
,
OpTestTool
...
...
test/cinn/ops/test_floor_divide_op.py
浏览文件 @
88b986a6
...
@@ -14,17 +14,13 @@
...
@@ -14,17 +14,13 @@
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
import
unittest
import
cinn
import
numpy
as
np
from
cinn.common
import
*
from
cinn.common
import
*
from
cinn.frontend
import
*
from
cinn.frontend
import
*
from
op_test
import
OpTest
,
OpTestTool
from
op_test
import
OpTest
,
OpTestTool
from
op_test_helper
import
TestCaseHelper
from
op_test_helper
import
TestCaseHelper
import
paddle
import
paddle
import
paddle.nn.functional
as
F
@
OpTestTool
.
skip_if
(
@
OpTestTool
.
skip_if
(
...
...
test/cinn/ops/test_floor_op.py
浏览文件 @
88b986a6
...
@@ -14,8 +14,6 @@
...
@@ -14,8 +14,6 @@
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
import
cinn
import
numpy
as
np
from
cinn.common
import
*
from
cinn.common
import
*
from
cinn.frontend
import
*
from
cinn.frontend
import
*
from
op_test
import
OpTest
,
OpTestTool
from
op_test
import
OpTest
,
OpTestTool
...
...
test/cinn/ops/test_gather_nd_op.py
浏览文件 @
88b986a6
...
@@ -19,7 +19,6 @@ import os
...
@@ -19,7 +19,6 @@ import os
import
unittest
import
unittest
from
itertools
import
product
from
itertools
import
product
import
cinn
import
numpy
as
np
import
numpy
as
np
from
cinn.common
import
*
from
cinn.common
import
*
from
cinn.frontend
import
*
from
cinn.frontend
import
*
...
...
test/cinn/ops/test_gather_op.py
浏览文件 @
88b986a6
...
@@ -16,10 +16,7 @@
...
@@ -16,10 +16,7 @@
import
logging
import
logging
import
os
import
os
import
unittest
from
itertools
import
product
import
cinn
import
numpy
as
np
import
numpy
as
np
from
cinn.common
import
*
from
cinn.common
import
*
from
cinn.frontend
import
*
from
cinn.frontend
import
*
...
...
test/cinn/ops/test_gaussian_random_op.py
浏览文件 @
88b986a6
...
@@ -14,7 +14,6 @@
...
@@ -14,7 +14,6 @@
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
import
cinn
from
cinn.common
import
*
from
cinn.common
import
*
from
cinn.frontend
import
*
from
cinn.frontend
import
*
from
op_test
import
OpTest
,
OpTestTool
from
op_test
import
OpTest
,
OpTestTool
...
...
test/cinn/ops/test_gelu_op.py
浏览文件 @
88b986a6
...
@@ -14,10 +14,7 @@
...
@@ -14,10 +14,7 @@
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
import
unittest
import
cinn
import
numpy
as
np
from
cinn.common
import
*
from
cinn.common
import
*
from
cinn.frontend
import
*
from
cinn.frontend
import
*
from
op_test
import
OpTest
,
OpTestTool
from
op_test
import
OpTest
,
OpTestTool
...
...
test/cinn/ops/test_identity_op.py
浏览文件 @
88b986a6
...
@@ -14,7 +14,6 @@
...
@@ -14,7 +14,6 @@
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
import
unittest
from
cinn.common
import
*
from
cinn.common
import
*
from
cinn.frontend
import
*
from
cinn.frontend
import
*
...
...
test/cinn/ops/test_is_finite_op.py
浏览文件 @
88b986a6
...
@@ -14,7 +14,6 @@
...
@@ -14,7 +14,6 @@
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
import
unittest
import
numpy
as
np
import
numpy
as
np
from
cinn.common
import
*
from
cinn.common
import
*
...
...
test/cinn/ops/test_is_inf_op.py
浏览文件 @
88b986a6
...
@@ -14,7 +14,6 @@
...
@@ -14,7 +14,6 @@
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
import
unittest
import
numpy
as
np
import
numpy
as
np
from
cinn.common
import
*
from
cinn.common
import
*
...
...
test/cinn/ops/test_is_nan_op.py
浏览文件 @
88b986a6
...
@@ -14,7 +14,6 @@
...
@@ -14,7 +14,6 @@
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
import
unittest
import
numpy
as
np
import
numpy
as
np
from
cinn.common
import
*
from
cinn.common
import
*
...
...
test/cinn/ops/test_isclose_op.py
浏览文件 @
88b986a6
...
@@ -14,7 +14,6 @@
...
@@ -14,7 +14,6 @@
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
import
cinn
import
numpy
as
np
import
numpy
as
np
from
cinn.common
import
*
from
cinn.common
import
*
from
cinn.frontend
import
*
from
cinn.frontend
import
*
...
...
test/cinn/ops/test_left_shift_op.py
浏览文件 @
88b986a6
...
@@ -12,9 +12,7 @@
...
@@ -12,9 +12,7 @@
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
import
unittest
import
cinn
import
numpy
as
np
import
numpy
as
np
from
cinn.common
import
*
from
cinn.common
import
*
from
cinn.frontend
import
*
from
cinn.frontend
import
*
...
...
test/cinn/ops/test_log_op.py
浏览文件 @
88b986a6
...
@@ -12,7 +12,6 @@
...
@@ -12,7 +12,6 @@
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
import
cinn
from
cinn.common
import
*
from
cinn.common
import
*
from
cinn.frontend
import
*
from
cinn.frontend
import
*
from
op_test
import
OpTest
from
op_test
import
OpTest
...
...
test/cinn/ops/test_logical_and_op.py
浏览文件 @
88b986a6
...
@@ -12,9 +12,7 @@
...
@@ -12,9 +12,7 @@
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
import
unittest
import
cinn
import
numpy
as
np
import
numpy
as
np
from
cinn.common
import
*
from
cinn.common
import
*
from
cinn.frontend
import
*
from
cinn.frontend
import
*
...
...
test/cinn/ops/test_logical_not_op.py
浏览文件 @
88b986a6
...
@@ -12,10 +12,7 @@
...
@@ -12,10 +12,7 @@
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
import
unittest
import
cinn
import
numpy
as
np
from
cinn.common
import
*
from
cinn.common
import
*
from
cinn.frontend
import
*
from
cinn.frontend
import
*
from
op_test
import
OpTest
,
OpTestTool
from
op_test
import
OpTest
,
OpTestTool
...
...
test/cinn/ops/test_logical_or_op.py
浏览文件 @
88b986a6
...
@@ -12,9 +12,7 @@
...
@@ -12,9 +12,7 @@
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
import
unittest
import
cinn
import
numpy
as
np
import
numpy
as
np
from
cinn.common
import
*
from
cinn.common
import
*
from
cinn.frontend
import
*
from
cinn.frontend
import
*
...
...
test/cinn/ops/test_logical_right_shift_op.py
浏览文件 @
88b986a6
...
@@ -14,7 +14,6 @@
...
@@ -14,7 +14,6 @@
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
import
cinn
import
numpy
as
np
import
numpy
as
np
from
cinn.common
import
*
from
cinn.common
import
*
from
cinn.frontend
import
*
from
cinn.frontend
import
*
...
...
test/cinn/ops/test_logical_xor_op.py
浏览文件 @
88b986a6
...
@@ -12,9 +12,7 @@
...
@@ -12,9 +12,7 @@
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
import
unittest
import
cinn
import
numpy
as
np
import
numpy
as
np
from
cinn.common
import
*
from
cinn.common
import
*
from
cinn.frontend
import
*
from
cinn.frontend
import
*
...
...
test/cinn/ops/test_lookup_table_op.py
浏览文件 @
88b986a6
...
@@ -14,7 +14,6 @@
...
@@ -14,7 +14,6 @@
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
import
cinn
from
cinn.common
import
*
from
cinn.common
import
*
from
cinn.frontend
import
*
from
cinn.frontend
import
*
from
op_test
import
OpTest
,
OpTestTool
from
op_test
import
OpTest
,
OpTestTool
...
...
test/cinn/ops/test_matmul_op.py
浏览文件 @
88b986a6
...
@@ -14,17 +14,13 @@
...
@@ -14,17 +14,13 @@
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
import
unittest
import
cinn
import
numpy
as
np
from
cinn.common
import
*
from
cinn.common
import
*
from
cinn.frontend
import
*
from
cinn.frontend
import
*
from
op_test
import
OpTest
,
OpTestTool
from
op_test
import
OpTest
,
OpTestTool
from
op_test_helper
import
TestCaseHelper
from
op_test_helper
import
TestCaseHelper
import
paddle
import
paddle
import
paddle.nn.functional
as
F
@
OpTestTool
.
skip_if
(
@
OpTestTool
.
skip_if
(
...
...
test/cinn/ops/test_mod_op.py
浏览文件 @
88b986a6
...
@@ -14,10 +14,7 @@
...
@@ -14,10 +14,7 @@
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
import
unittest
import
cinn
import
numpy
as
np
from
cinn.common
import
*
from
cinn.common
import
*
from
cinn.frontend
import
*
from
cinn.frontend
import
*
from
op_test
import
OpTest
,
OpTestTool
from
op_test
import
OpTest
,
OpTestTool
...
...
test/cinn/ops/test_negative_op.py
浏览文件 @
88b986a6
...
@@ -14,8 +14,6 @@
...
@@ -14,8 +14,6 @@
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
import
cinn
import
numpy
as
np
from
cinn.common
import
*
from
cinn.common
import
*
from
cinn.frontend
import
*
from
cinn.frontend
import
*
from
op_test
import
OpTest
,
OpTestTool
from
op_test
import
OpTest
,
OpTestTool
...
...
test/cinn/ops/test_one_hot_op.py
浏览文件 @
88b986a6
...
@@ -14,10 +14,7 @@
...
@@ -14,10 +14,7 @@
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
import
unittest
import
cinn
import
numpy
as
np
from
cinn.common
import
*
from
cinn.common
import
*
from
cinn.frontend
import
*
from
cinn.frontend
import
*
from
op_test
import
OpTest
,
OpTestTool
from
op_test
import
OpTest
,
OpTestTool
...
...
test/cinn/ops/test_pow_op.py
浏览文件 @
88b986a6
...
@@ -14,7 +14,6 @@
...
@@ -14,7 +14,6 @@
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
import
cinn
import
numpy
as
np
import
numpy
as
np
from
cinn.common
import
*
from
cinn.common
import
*
from
cinn.frontend
import
*
from
cinn.frontend
import
*
...
...
test/cinn/ops/test_randint_op.py
浏览文件 @
88b986a6
...
@@ -15,10 +15,7 @@
...
@@ -15,10 +15,7 @@
# limitations under the License.
# limitations under the License.
import
unittest
import
unittest
from
random
import
seed
import
cinn
import
numpy
as
np
from
cinn.common
import
*
from
cinn.common
import
*
from
cinn.frontend
import
*
from
cinn.frontend
import
*
from
op_test
import
OpTest
,
OpTestTool
from
op_test
import
OpTest
,
OpTestTool
...
...
test/cinn/ops/test_reciprocal_op.py
浏览文件 @
88b986a6
...
@@ -12,13 +12,11 @@
...
@@ -12,13 +12,11 @@
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
import
unittest
import
cinn
import
numpy
as
np
import
numpy
as
np
from
cinn.common
import
*
from
cinn.common
import
*
from
cinn.frontend
import
*
from
cinn.frontend
import
*
from
op_test
import
OpTest
,
OpTestTool
from
op_test
import
OpTest
from
op_test_helper
import
TestCaseHelper
from
op_test_helper
import
TestCaseHelper
import
paddle
import
paddle
...
...
test/cinn/ops/test_reduce_op.py
浏览文件 @
88b986a6
...
@@ -16,7 +16,6 @@
...
@@ -16,7 +16,6 @@
import
unittest
import
unittest
import
cinn
import
numpy
as
np
import
numpy
as
np
from
cinn.common
import
*
from
cinn.common
import
*
from
cinn.frontend
import
*
from
cinn.frontend
import
*
...
...
test/cinn/ops/test_reduce_op_new.py
浏览文件 @
88b986a6
...
@@ -12,10 +12,7 @@
...
@@ -12,10 +12,7 @@
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
import
unittest
import
cinn
import
numpy
as
np
from
cinn.common
import
*
from
cinn.common
import
*
from
cinn.frontend
import
*
from
cinn.frontend
import
*
from
op_test
import
OpTest
,
OpTestTool
from
op_test
import
OpTest
,
OpTestTool
...
...
test/cinn/ops/test_relu6_op.py
浏览文件 @
88b986a6
...
@@ -12,10 +12,7 @@
...
@@ -12,10 +12,7 @@
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
import
unittest
import
cinn
import
numpy
as
np
from
cinn.common
import
*
from
cinn.common
import
*
from
cinn.frontend
import
*
from
cinn.frontend
import
*
from
op_test
import
OpTest
,
OpTestTool
from
op_test
import
OpTest
,
OpTestTool
...
...
test/cinn/ops/test_remainder_op.py
浏览文件 @
88b986a6
...
@@ -14,7 +14,6 @@
...
@@ -14,7 +14,6 @@
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
import
cinn
import
numpy
as
np
import
numpy
as
np
from
cinn.common
import
*
from
cinn.common
import
*
from
cinn.frontend
import
*
from
cinn.frontend
import
*
...
...
test/cinn/ops/test_resize_op.py
浏览文件 @
88b986a6
...
@@ -14,16 +14,9 @@
...
@@ -14,16 +14,9 @@
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
import
unittest
import
cinn
import
numpy
as
np
from
cinn.common
import
*
from
cinn.common
import
*
from
cinn.frontend
import
*
from
cinn.frontend
import
*
from
op_test
import
OpTest
,
OpTestTool
import
paddle
from
paddle.vision.transforms
import
functional
as
F
# paddle resize is based on cv2 module
# paddle resize is based on cv2 module
# This test requires cv2 module (pip3.6 install opencv_python==3.2.0.7)
# This test requires cv2 module (pip3.6 install opencv_python==3.2.0.7)
...
...
test/cinn/ops/test_right_shift_op.py
浏览文件 @
88b986a6
...
@@ -12,9 +12,7 @@
...
@@ -12,9 +12,7 @@
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
import
unittest
import
cinn
import
numpy
as
np
import
numpy
as
np
from
cinn.common
import
*
from
cinn.common
import
*
from
cinn.frontend
import
*
from
cinn.frontend
import
*
...
...
test/cinn/ops/test_round_op.py
浏览文件 @
88b986a6
...
@@ -12,7 +12,6 @@
...
@@ -12,7 +12,6 @@
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
import
cinn
from
cinn.common
import
*
from
cinn.common
import
*
from
cinn.frontend
import
*
from
cinn.frontend
import
*
from
op_test
import
OpTest
,
OpTestTool
from
op_test
import
OpTest
,
OpTestTool
...
...
test/cinn/ops/test_rsqrt_op.py
浏览文件 @
88b986a6
...
@@ -14,8 +14,6 @@
...
@@ -14,8 +14,6 @@
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
import
cinn
import
numpy
as
np
from
cinn.common
import
*
from
cinn.common
import
*
from
cinn.frontend
import
*
from
cinn.frontend
import
*
from
op_test
import
OpTest
,
OpTestTool
from
op_test
import
OpTest
,
OpTestTool
...
...
test/cinn/ops/test_scale_op.py
浏览文件 @
88b986a6
...
@@ -12,10 +12,7 @@
...
@@ -12,10 +12,7 @@
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
import
unittest
import
cinn
import
numpy
as
np
from
cinn.common
import
*
from
cinn.common
import
*
from
cinn.frontend
import
*
from
cinn.frontend
import
*
from
op_test
import
OpTest
,
OpTestTool
from
op_test
import
OpTest
,
OpTestTool
...
...
test/cinn/ops/test_sin_op.py
浏览文件 @
88b986a6
...
@@ -14,8 +14,6 @@
...
@@ -14,8 +14,6 @@
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
import
cinn
import
numpy
as
np
from
cinn.common
import
*
from
cinn.common
import
*
from
cinn.frontend
import
*
from
cinn.frontend
import
*
from
op_test
import
OpTest
,
OpTestTool
from
op_test
import
OpTest
,
OpTestTool
...
...
test/cinn/ops/test_sinh_op.py
浏览文件 @
88b986a6
此差异已折叠。
点击以展开。
test/cinn/ops/test_sqrt_op.py
浏览文件 @
88b986a6
此差异已折叠。
点击以展开。
test/cinn/ops/test_tan_op.py
浏览文件 @
88b986a6
此差异已折叠。
点击以展开。
test/cinn/ops/test_tanh_op.py
浏览文件 @
88b986a6
此差异已折叠。
点击以展开。
test/cinn/ops/test_trunc_op.py
浏览文件 @
88b986a6
此差异已折叠。
点击以展开。
test/cinn/ops/test_unary_elementwise_op.py
浏览文件 @
88b986a6
此差异已折叠。
点击以展开。
test/cinn/ops/test_uniform_random_op.py
浏览文件 @
88b986a6
此差异已折叠。
点击以展开。
test/cinn/ops/test_zero_dim_tensor.py
浏览文件 @
88b986a6
此差异已折叠。
点击以展开。
test/cinn/passes/pass_test.py
浏览文件 @
88b986a6
此差异已折叠。
点击以展开。
test/cinn/test_common.py
浏览文件 @
88b986a6
此差异已折叠。
点击以展开。
test/cinn/test_computation.py
浏览文件 @
88b986a6
此差异已折叠。
点击以展开。
test/cinn/test_efficientnet.py
浏览文件 @
88b986a6
此差异已折叠。
点击以展开。
test/cinn/test_facedet.py
浏览文件 @
88b986a6
此差异已折叠。
点击以展开。
test/cinn/test_frontend.py
浏览文件 @
88b986a6
此差异已折叠。
点击以展开。
test/cinn/test_ir.py
浏览文件 @
88b986a6
此差异已折叠。
点击以展开。
test/cinn/test_mobilenetv1.py
浏览文件 @
88b986a6
此差异已折叠。
点击以展开。
test/cinn/test_mobilenetv2.py
浏览文件 @
88b986a6
此差异已折叠。
点击以展开。
test/cinn/test_netbuilder.py
浏览文件 @
88b986a6
此差异已折叠。
点击以展开。
test/cinn/test_op_benchmark.py
浏览文件 @
88b986a6
此差异已折叠。
点击以展开。
test/cinn/test_op_broadcast.py
浏览文件 @
88b986a6
此差异已折叠。
点击以展开。
test/cinn/test_op_nn.py
浏览文件 @
88b986a6
此差异已折叠。
点击以展开。
test/cinn/test_op_transform.py
浏览文件 @
88b986a6
此差异已折叠。
点击以展开。
test/cinn/test_packed_func.py
浏览文件 @
88b986a6
此差异已折叠。
点击以展开。
test/cinn/test_paddle_model_convertor.py
浏览文件 @
88b986a6
此差异已折叠。
点击以展开。
test/cinn/test_pe_elementwise.py
浏览文件 @
88b986a6
此差异已折叠。
点击以展开。
test/cinn/test_resnet.py
浏览文件 @
88b986a6
此差异已折叠。
点击以展开。
test/cinn/test_resnet18.py
浏览文件 @
88b986a6
此差异已折叠。
点击以展开。
test/cinn/test_resnet50.py
浏览文件 @
88b986a6
此差异已折叠。
点击以展开。
test/cinn/test_squeezenet.py
浏览文件 @
88b986a6
此差异已折叠。
点击以展开。
test/cinn/test_utils.py
浏览文件 @
88b986a6
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录