Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Sparse]Remove unused code #46021

Merged
merged 6 commits into from
Sep 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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