Skip to content

Commit 59bb540

Browse files
czkkkkkkRhett-Ying
andauthored
Revert "[Sparse] Fix Windows.h dependency issue (#6741)" (#6843)
Co-authored-by: Rhett Ying <[email protected]>
1 parent aa7e352 commit 59bb540

18 files changed

+24
-36
lines changed

dgl_sparse/include/sparse/sddmm.h

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#define SPARSE_SDDMM_H_
88

99
#include <sparse/sparse_matrix.h>
10+
#include <torch/script.h>
1011

1112
namespace dgl {
1213
namespace sparse {

dgl_sparse/include/sparse/sparse_format.h

+3-1
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,11 @@
88

99
// clang-format off
1010
#include <sparse/dgl_headers.h>
11-
#include <sparse/torch_headers.h>
1211
// clang-format on
1312

13+
#include <torch/custom_class.h>
14+
#include <torch/script.h>
15+
1416
#include <memory>
1517
#include <utility>
1618

dgl_sparse/include/sparse/sparse_matrix.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,11 @@
88

99
// clang-format off
1010
#include <sparse/dgl_headers.h>
11-
#include <sparse/torch_headers.h>
1211
// clang-format on
1312

1413
#include <sparse/sparse_format.h>
14+
#include <torch/custom_class.h>
15+
#include <torch/script.h>
1516

1617
#include <memory>
1718
#include <tuple>

dgl_sparse/include/sparse/spmm.h

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#define SPARSE_SPMM_H_
88

99
#include <sparse/sparse_matrix.h>
10+
#include <torch/script.h>
1011

1112
namespace dgl {
1213
namespace sparse {

dgl_sparse/include/sparse/spspmm.h

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#define SPARSE_SPSPMM_H_
88

99
#include <sparse/sparse_matrix.h>
10+
#include <torch/script.h>
1011

1112
namespace dgl {
1213
namespace sparse {

dgl_sparse/include/sparse/torch_headers.h

-30
This file was deleted.

dgl_sparse/src/elemenwise_op.cc

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#include <sparse/elementwise_op.h>
88
#include <sparse/matrix_ops.h>
99
#include <sparse/sparse_matrix.h>
10+
#include <torch/script.h>
1011

1112
#include <memory>
1213

dgl_sparse/src/matmul.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77

88
// clang-format off
99
#include <sparse/dgl_headers.h>
10-
#include <sparse/torch_headers.h>
1110
// clang-format on
1211

1312
#include <sparse/sparse_matrix.h>
13+
#include <torch/script.h>
1414

1515
#include "./utils.h"
1616

dgl_sparse/src/matmul.h

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#define DGL_SPARSE_MATMUL_H_
88

99
#include <sparse/sparse_matrix.h>
10+
#include <torch/script.h>
1011

1112
#include <string>
1213

dgl_sparse/src/matrix_ops.cc

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
* @brief DGL C++ matrix operators.
55
*/
66
#include <sparse/matrix_ops.h>
7+
#include <torch/script.h>
78

89
namespace dgl {
910
namespace sparse {

dgl_sparse/src/python_binding.cc

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
*/
66
// clang-format off
77
#include <sparse/dgl_headers.h>
8-
#include <sparse/torch_headers.h>
98
// clang-format on
109

1110
#include <sparse/elementwise_op.h>
@@ -16,6 +15,8 @@
1615
#include <sparse/sparse_matrix.h>
1716
#include <sparse/spmm.h>
1817
#include <sparse/spspmm.h>
18+
#include <torch/custom_class.h>
19+
#include <torch/script.h>
1920

2021
namespace dgl {
2122
namespace sparse {

dgl_sparse/src/reduction.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
*/
66
// clang-format off
77
#include <sparse/dgl_headers.h>
8-
#include <sparse/torch_headers.h>
98
// clang-format on
109

1110
#include <sparse/elementwise_op.h>
1211
#include <sparse/reduction.h>
1312
#include <sparse/sparse_matrix.h>
13+
#include <torch/script.h>
1414

1515
#include <string>
1616
#include <vector>

dgl_sparse/src/sddmm.cc

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
*/
66
#include <sparse/sparse_matrix.h>
77
#include <sparse/spmm.h>
8+
#include <torch/script.h>
89

910
#include <sstream>
1011

dgl_sparse/src/softmax.cc

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
#include <sparse/reduction.h>
88
#include <sparse/sparse_matrix.h>
9+
#include <torch/script.h>
910

1011
#include "./matmul.h"
1112
#include "./utils.h"

dgl_sparse/src/sparse_matrix.cc

+2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,10 @@
77
#include <sparse/dgl_headers.h>
88
// clang-format on
99

10+
#include <c10/util/Logging.h>
1011
#include <sparse/elementwise_op.h>
1112
#include <sparse/sparse_matrix.h>
13+
#include <torch/script.h>
1214

1315
#include "./utils.h"
1416

dgl_sparse/src/spmm.cc

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#include <sparse/sddmm.h>
88
#include <sparse/sparse_matrix.h>
99
#include <sparse/spmm.h>
10+
#include <torch/script.h>
1011

1112
#include <sstream>
1213

dgl_sparse/src/spspmm.cc

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#include <sparse/sddmm.h>
88
#include <sparse/sparse_matrix.h>
99
#include <sparse/spspmm.h>
10+
#include <torch/script.h>
1011

1112
#include "./matmul.h"
1213
#include "./utils.h"

dgl_sparse/src/utils.h

+3-1
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,12 @@
88

99
// clang-format off
1010
#include <sparse/dgl_headers.h>
11-
#include <sparse/torch_headers.h>
1211
// clang-format on
1312

13+
#include <ATen/DLConvertor.h>
1414
#include <sparse/sparse_matrix.h>
15+
#include <torch/custom_class.h>
16+
#include <torch/script.h>
1517

1618
namespace dgl {
1719
namespace sparse {

0 commit comments

Comments
 (0)