Skip to content

Commit

Permalink
[Sparse]Remove unused code (#46021)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangkaihuo authored Sep 14, 2022
1 parent 61012a7 commit 0b82fb3
Show file tree
Hide file tree
Showing 8 changed files with 2 additions and 247 deletions.
10 changes: 2 additions & 8 deletions paddle/phi/api/lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -370,11 +370,6 @@ cc_library(
SRCS api_custom_impl.cc
DEPS phi_tensor_raw phi kernel_dispatch api_gen_utils backward_infermeta
phi_data_transform)
cc_library(
sparse_api_custom_impl
SRCS sparse_api_custom_impl.cc
DEPS phi_tensor_raw phi kernel_dispatch api_gen_utils phi_data_transform
tensor_copy)

cc_library(
phi_function_api
Expand All @@ -396,12 +391,11 @@ cc_library(
cc_library(
sparse_api
SRCS ${sparse_api_source_file}
DEPS phi_tensor_raw phi kernel_dispatch api_gen_utils sparse_api_custom_impl)
DEPS phi_tensor_raw phi kernel_dispatch api_gen_utils)
cc_library(
sparse_bw_api
SRCS ${sparse_bw_api_source_file}
DEPS phi_tensor_raw phi kernel_dispatch api_gen_utils sparse_api
sparse_api_custom_impl)
DEPS phi_tensor_raw phi kernel_dispatch api_gen_utils sparse_api)
cc_library(
phi_dygraph_api
SRCS ${dygraph_api_source_file}
Expand Down
202 changes: 0 additions & 202 deletions paddle/phi/api/lib/sparse_api_custom_impl.cc

This file was deleted.

32 changes: 0 additions & 32 deletions paddle/phi/api/lib/sparse_api_custom_impl.h

This file was deleted.

1 change: 0 additions & 1 deletion paddle/phi/api/yaml/generator/intermediate_api_gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ def source_include(header_file_path):
#include "paddle/phi/api/lib/api_gen_utils.h"
#include "paddle/phi/api/lib/data_transform.h"
#include "paddle/phi/api/lib/kernel_dispatch.h"
#include "paddle/phi/api/lib/sparse_api_custom_impl.h"
#include "paddle/phi/core/kernel_registry.h"
#include "paddle/phi/infermeta/binary.h"
#include "paddle/phi/infermeta/multiary.h"
Expand Down
1 change: 0 additions & 1 deletion paddle/phi/api/yaml/generator/sparse_api_gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,6 @@ def source_include(header_file_path):
#include "paddle/phi/api/lib/api_gen_utils.h"
#include "paddle/phi/api/lib/data_transform.h"
#include "paddle/phi/api/lib/kernel_dispatch.h"
#include "paddle/phi/api/lib/sparse_api_custom_impl.h"
#include "paddle/phi/core/kernel_registry.h"
"""

Expand Down
1 change: 0 additions & 1 deletion paddle/phi/api/yaml/generator/sparse_bw_api_gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ def source_include(header_file_path):
#include "paddle/phi/api/include/sparse_api.h"
#include "paddle/phi/api/lib/api_gen_utils.h"
#include "paddle/phi/api/lib/kernel_dispatch.h"
#include "paddle/phi/api/lib/sparse_api_custom_impl.h"
#include "paddle/phi/core/kernel_registry.h"
"""

Expand Down
1 change: 0 additions & 1 deletion paddle/phi/tests/core/test_sparse_coo_tensor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ TEST(sparse_coo_tensor, construct) {
CHECK_EQ(sparse.numel(), 9);
CHECK(sparse.dims() == dense_dims);
CHECK(sparse.dtype() == DataType::FLOAT32);
CHECK(sparse.layout() == DataLayout::SPARSE_COO);
CHECK(sparse.place() == phi::CPUPlace());
}

Expand Down
1 change: 0 additions & 1 deletion paddle/phi/tests/core/test_sparse_csr_tensor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ TEST(sparse_csr_tensor, construct) {
CHECK_EQ(sparse.numel(), 9);
CHECK(sparse.dims() == dense_dims);
CHECK(sparse.dtype() == DataType::FLOAT32);
CHECK(sparse.layout() == DataLayout::SPARSE_CSR);
CHECK(sparse.place() == paddle::platform::CPUPlace());
CHECK(sparse.initialized() == true);
}
Expand Down

0 comments on commit 0b82fb3

Please sign in to comment.