Skip to content

Commit 0b82fb3

Browse files
author
zhangkaihuo
authored
[Sparse]Remove unused code (#46021)
1 parent 61012a7 commit 0b82fb3

File tree

8 files changed

+2
-247
lines changed

8 files changed

+2
-247
lines changed

paddle/phi/api/lib/CMakeLists.txt

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -370,11 +370,6 @@ cc_library(
370370
SRCS api_custom_impl.cc
371371
DEPS phi_tensor_raw phi kernel_dispatch api_gen_utils backward_infermeta
372372
phi_data_transform)
373-
cc_library(
374-
sparse_api_custom_impl
375-
SRCS sparse_api_custom_impl.cc
376-
DEPS phi_tensor_raw phi kernel_dispatch api_gen_utils phi_data_transform
377-
tensor_copy)
378373

379374
cc_library(
380375
phi_function_api
@@ -396,12 +391,11 @@ cc_library(
396391
cc_library(
397392
sparse_api
398393
SRCS ${sparse_api_source_file}
399-
DEPS phi_tensor_raw phi kernel_dispatch api_gen_utils sparse_api_custom_impl)
394+
DEPS phi_tensor_raw phi kernel_dispatch api_gen_utils)
400395
cc_library(
401396
sparse_bw_api
402397
SRCS ${sparse_bw_api_source_file}
403-
DEPS phi_tensor_raw phi kernel_dispatch api_gen_utils sparse_api
404-
sparse_api_custom_impl)
398+
DEPS phi_tensor_raw phi kernel_dispatch api_gen_utils sparse_api)
405399
cc_library(
406400
phi_dygraph_api
407401
SRCS ${dygraph_api_source_file}

paddle/phi/api/lib/sparse_api_custom_impl.cc

Lines changed: 0 additions & 202 deletions
This file was deleted.

paddle/phi/api/lib/sparse_api_custom_impl.h

Lines changed: 0 additions & 32 deletions
This file was deleted.

paddle/phi/api/yaml/generator/intermediate_api_gen.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ def source_include(header_file_path):
4343
#include "paddle/phi/api/lib/api_gen_utils.h"
4444
#include "paddle/phi/api/lib/data_transform.h"
4545
#include "paddle/phi/api/lib/kernel_dispatch.h"
46-
#include "paddle/phi/api/lib/sparse_api_custom_impl.h"
4746
#include "paddle/phi/core/kernel_registry.h"
4847
#include "paddle/phi/infermeta/binary.h"
4948
#include "paddle/phi/infermeta/multiary.h"

paddle/phi/api/yaml/generator/sparse_api_gen.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,6 @@ def source_include(header_file_path):
229229
#include "paddle/phi/api/lib/api_gen_utils.h"
230230
#include "paddle/phi/api/lib/data_transform.h"
231231
#include "paddle/phi/api/lib/kernel_dispatch.h"
232-
#include "paddle/phi/api/lib/sparse_api_custom_impl.h"
233232
#include "paddle/phi/core/kernel_registry.h"
234233
"""
235234

paddle/phi/api/yaml/generator/sparse_bw_api_gen.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@ def source_include(header_file_path):
111111
#include "paddle/phi/api/include/sparse_api.h"
112112
#include "paddle/phi/api/lib/api_gen_utils.h"
113113
#include "paddle/phi/api/lib/kernel_dispatch.h"
114-
#include "paddle/phi/api/lib/sparse_api_custom_impl.h"
115114
#include "paddle/phi/core/kernel_registry.h"
116115
"""
117116

paddle/phi/tests/core/test_sparse_coo_tensor.cc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ TEST(sparse_coo_tensor, construct) {
5252
CHECK_EQ(sparse.numel(), 9);
5353
CHECK(sparse.dims() == dense_dims);
5454
CHECK(sparse.dtype() == DataType::FLOAT32);
55-
CHECK(sparse.layout() == DataLayout::SPARSE_COO);
5655
CHECK(sparse.place() == phi::CPUPlace());
5756
}
5857

paddle/phi/tests/core/test_sparse_csr_tensor.cc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ TEST(sparse_csr_tensor, construct) {
6262
CHECK_EQ(sparse.numel(), 9);
6363
CHECK(sparse.dims() == dense_dims);
6464
CHECK(sparse.dtype() == DataType::FLOAT32);
65-
CHECK(sparse.layout() == DataLayout::SPARSE_CSR);
6665
CHECK(sparse.place() == paddle::platform::CPUPlace());
6766
CHECK(sparse.initialized() == true);
6867
}

0 commit comments

Comments
 (0)