Skip to content

Commit

Permalink
[CleanOps]del isfinite op (PaddlePaddle#57892)
Browse files Browse the repository at this point in the history
* del isfinite op
  • Loading branch information
wanghuancoder authored Oct 10, 2023
1 parent 8b55144 commit 42f107f
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 201 deletions.
8 changes: 0 additions & 8 deletions paddle/fluid/operators/isfinite_op.cc
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,6 @@ namespace ops = paddle::operators;

REGISTER_OP_MAKER(isinf, "isinf(X)");
REGISTER_OP_MAKER(isnan, "isnan(X)");
REGISTER_OP_MAKER(isfinite, "isfinite(X)");

REGISTER_OP_CPU_KERNEL(
isinf,
Expand All @@ -139,10 +138,3 @@ REGISTER_OP_CPU_KERNEL(
ops::OverflowKernel<phi::CPUContext, int64_t, ops::NANFunctor>,
ops::OverflowKernel<phi::CPUContext, float, ops::NANFunctor>,
ops::OverflowKernel<phi::CPUContext, double, ops::NANFunctor>);

REGISTER_OP_CPU_KERNEL(
isfinite,
ops::OverflowKernel<phi::CPUContext, int, ops::IsfiniteFunctor>,
ops::OverflowKernel<phi::CPUContext, int64_t, ops::IsfiniteFunctor>,
ops::OverflowKernel<phi::CPUContext, float, ops::IsfiniteFunctor>,
ops::OverflowKernel<phi::CPUContext, double, ops::IsfiniteFunctor>);
8 changes: 0 additions & 8 deletions paddle/fluid/operators/isfinite_op.cu
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,3 @@ REGISTER_OP_CUDA_KERNEL(
ops::OverflowKernel<phi::GPUContext, double, ops::NANFunctor>,
ops::OverflowKernel<phi::GPUContext, plat::float16, ops::NANFunctor>,
ops::OverflowKernel<phi::GPUContext, plat::bfloat16, ops::NANFunctor>);

REGISTER_OP_CUDA_KERNEL(
isfinite,
ops::OverflowKernel<phi::GPUContext, int, ops::IsfiniteFunctor>,
ops::OverflowKernel<phi::GPUContext, float, ops::IsfiniteFunctor>,
ops::OverflowKernel<phi::GPUContext, double, ops::IsfiniteFunctor>,
ops::OverflowKernel<phi::GPUContext, plat::float16, ops::IsfiniteFunctor>,
ops::OverflowKernel<phi::GPUContext, plat::bfloat16, ops::IsfiniteFunctor>);
6 changes: 0 additions & 6 deletions paddle/fluid/operators/isfinite_op.h
Original file line number Diff line number Diff line change
Expand Up @@ -156,12 +156,6 @@ struct NANFunctor {
}
};

struct IsfiniteFunctor {
void operator()(const phi::DenseTensor& tensor, phi::DenseTensor* out) {
framework::TensorIsfinite(tensor, out);
}
};

template <typename DeviceContext, typename T, typename Functor>
class OverflowKernel : public framework::OpKernel<T> {
public:
Expand Down
175 changes: 0 additions & 175 deletions test/legacy_test/test_isfinite_op.py

This file was deleted.

2 changes: 0 additions & 2 deletions tools/parallel_UT_rule.py
Original file line number Diff line number Diff line change
Expand Up @@ -1295,7 +1295,6 @@
'test_quantization_scale_pass',
'test_segment_ops',
'test_layers',
'test_isfinite_op',
'test_imperative_qat_channelwise',
'test_eye_op',
'test_imperative_framework',
Expand Down Expand Up @@ -2836,7 +2835,6 @@
'test_shape_op',
'test_strided_slice_op',
'test_switch_case',
'test_isfinite_op',
'test_conv_elementwise_add_act_fuse_pass',
'test_unbind_op',
'test_size_op',
Expand Down
2 changes: 0 additions & 2 deletions tools/static_mode_white_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,8 +284,6 @@
'test_io_save_load',
'test_iou_similarity_op',
'test_ir_memory_optimize_pass',
'test_is_empty_op',
'test_isfinite_op',
'test_kldiv_loss_op',
'test_kron_op',
'test_l1_norm_op',
Expand Down

0 comments on commit 42f107f

Please sign in to comment.