mirror of
https://github.com/dmlc/dgl.git
synced 2026-06-03 19:34:33 +08:00
Co-authored-by: Rhett Ying <85214957+Rhett-Ying@users.noreply.github.com>
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
#define SPARSE_SDDMM_H_
|
||||
|
||||
#include <sparse/sparse_matrix.h>
|
||||
#include <torch/script.h>
|
||||
|
||||
namespace dgl {
|
||||
namespace sparse {
|
||||
|
||||
@@ -8,9 +8,11 @@
|
||||
|
||||
// clang-format off
|
||||
#include <sparse/dgl_headers.h>
|
||||
#include <sparse/torch_headers.h>
|
||||
// clang-format on
|
||||
|
||||
#include <torch/custom_class.h>
|
||||
#include <torch/script.h>
|
||||
|
||||
#include <memory>
|
||||
#include <utility>
|
||||
|
||||
|
||||
@@ -8,10 +8,11 @@
|
||||
|
||||
// clang-format off
|
||||
#include <sparse/dgl_headers.h>
|
||||
#include <sparse/torch_headers.h>
|
||||
// clang-format on
|
||||
|
||||
#include <sparse/sparse_format.h>
|
||||
#include <torch/custom_class.h>
|
||||
#include <torch/script.h>
|
||||
|
||||
#include <memory>
|
||||
#include <tuple>
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#define SPARSE_SPMM_H_
|
||||
|
||||
#include <sparse/sparse_matrix.h>
|
||||
#include <torch/script.h>
|
||||
|
||||
namespace dgl {
|
||||
namespace sparse {
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#define SPARSE_SPSPMM_H_
|
||||
|
||||
#include <sparse/sparse_matrix.h>
|
||||
#include <torch/script.h>
|
||||
|
||||
namespace dgl {
|
||||
namespace sparse {
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
/**
|
||||
* Copyright (c) 2022 by Contributors
|
||||
* @file sparse/torch_headers.h
|
||||
* @brief Pytorch headers used in the sparse library. Since Pytorch 2.1.0
|
||||
* introduced a dependency on <windows.h>, we need to define NOMINMAX to avoid
|
||||
* the conflict with std::min/std::max macros before including Pytorch headers.
|
||||
* See more in
|
||||
* https://stackoverflow.com/questions/4913922/possible-problems-with-nominmax-on-visual-c.
|
||||
*/
|
||||
|
||||
#ifndef SPARSE_TORCH_HEADERS_H_
|
||||
#define SPARSE_TORCH_HEADERS_H_
|
||||
|
||||
#ifdef _WIN32
|
||||
#ifndef NOMINMAX
|
||||
#define SPARSE_TORCH_HEADERS_H_NOMINMAX
|
||||
#define NOMINMAX
|
||||
#endif // NOMINMAX
|
||||
#endif // _WIN32
|
||||
|
||||
#include <ATen/DLConvertor.h>
|
||||
#include <c10/util/Logging.h>
|
||||
#include <torch/custom_class.h>
|
||||
#include <torch/script.h>
|
||||
|
||||
#ifdef SPARSE_TORCH_HEADERS_H_NOMINMAX
|
||||
#undef NOMINMAX
|
||||
#endif // SPARSE_TORCH_HEADERS_H_NOMINMAX
|
||||
|
||||
#endif // SPARSE_TORCH_HEADERS_H_
|
||||
@@ -7,6 +7,7 @@
|
||||
#include <sparse/elementwise_op.h>
|
||||
#include <sparse/matrix_ops.h>
|
||||
#include <sparse/sparse_matrix.h>
|
||||
#include <torch/script.h>
|
||||
|
||||
#include <memory>
|
||||
|
||||
|
||||
@@ -7,10 +7,10 @@
|
||||
|
||||
// clang-format off
|
||||
#include <sparse/dgl_headers.h>
|
||||
#include <sparse/torch_headers.h>
|
||||
// clang-format on
|
||||
|
||||
#include <sparse/sparse_matrix.h>
|
||||
#include <torch/script.h>
|
||||
|
||||
#include "./utils.h"
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#define DGL_SPARSE_MATMUL_H_
|
||||
|
||||
#include <sparse/sparse_matrix.h>
|
||||
#include <torch/script.h>
|
||||
|
||||
#include <string>
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
* @brief DGL C++ matrix operators.
|
||||
*/
|
||||
#include <sparse/matrix_ops.h>
|
||||
#include <torch/script.h>
|
||||
|
||||
namespace dgl {
|
||||
namespace sparse {
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
*/
|
||||
// clang-format off
|
||||
#include <sparse/dgl_headers.h>
|
||||
#include <sparse/torch_headers.h>
|
||||
// clang-format on
|
||||
|
||||
#include <sparse/elementwise_op.h>
|
||||
@@ -16,6 +15,8 @@
|
||||
#include <sparse/sparse_matrix.h>
|
||||
#include <sparse/spmm.h>
|
||||
#include <sparse/spspmm.h>
|
||||
#include <torch/custom_class.h>
|
||||
#include <torch/script.h>
|
||||
|
||||
namespace dgl {
|
||||
namespace sparse {
|
||||
|
||||
@@ -5,12 +5,12 @@
|
||||
*/
|
||||
// clang-format off
|
||||
#include <sparse/dgl_headers.h>
|
||||
#include <sparse/torch_headers.h>
|
||||
// clang-format on
|
||||
|
||||
#include <sparse/elementwise_op.h>
|
||||
#include <sparse/reduction.h>
|
||||
#include <sparse/sparse_matrix.h>
|
||||
#include <torch/script.h>
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
*/
|
||||
#include <sparse/sparse_matrix.h>
|
||||
#include <sparse/spmm.h>
|
||||
#include <torch/script.h>
|
||||
|
||||
#include <sstream>
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
|
||||
#include <sparse/reduction.h>
|
||||
#include <sparse/sparse_matrix.h>
|
||||
#include <torch/script.h>
|
||||
|
||||
#include "./matmul.h"
|
||||
#include "./utils.h"
|
||||
|
||||
@@ -7,8 +7,10 @@
|
||||
#include <sparse/dgl_headers.h>
|
||||
// clang-format on
|
||||
|
||||
#include <c10/util/Logging.h>
|
||||
#include <sparse/elementwise_op.h>
|
||||
#include <sparse/sparse_matrix.h>
|
||||
#include <torch/script.h>
|
||||
|
||||
#include "./utils.h"
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#include <sparse/sddmm.h>
|
||||
#include <sparse/sparse_matrix.h>
|
||||
#include <sparse/spmm.h>
|
||||
#include <torch/script.h>
|
||||
|
||||
#include <sstream>
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#include <sparse/sddmm.h>
|
||||
#include <sparse/sparse_matrix.h>
|
||||
#include <sparse/spspmm.h>
|
||||
#include <torch/script.h>
|
||||
|
||||
#include "./matmul.h"
|
||||
#include "./utils.h"
|
||||
|
||||
@@ -8,10 +8,12 @@
|
||||
|
||||
// clang-format off
|
||||
#include <sparse/dgl_headers.h>
|
||||
#include <sparse/torch_headers.h>
|
||||
// clang-format on
|
||||
|
||||
#include <ATen/DLConvertor.h>
|
||||
#include <sparse/sparse_matrix.h>
|
||||
#include <torch/custom_class.h>
|
||||
#include <torch/script.h>
|
||||
|
||||
namespace dgl {
|
||||
namespace sparse {
|
||||
|
||||
Reference in New Issue
Block a user