"docs/git@developer.sourcefind.cn:OpenDAS/torchaudio.git" did not exist on "7d7ae0a1b0df87ce8ac123cd8b97ade6b15bac2f"
Commit 0b9019dd authored by rusty1s's avatar rusty1s
Browse files

fixed windows build

parent bccaa10e
#include <Python.h>
#include <torch/script.h> #include <torch/script.h>
#include "cpu/convert_cpu.h" #include "cpu/convert_cpu.h"
...@@ -6,6 +7,10 @@ ...@@ -6,6 +7,10 @@
#include "cuda/convert_cuda.h" #include "cuda/convert_cuda.h"
#endif #endif
#ifdef _WIN32
PyMODINIT_FUNC PyInit__convert(void) { return NULL; }
#endif
torch::Tensor ind2ptr(torch::Tensor ind, int64_t M) { torch::Tensor ind2ptr(torch::Tensor ind, int64_t M) {
if (ind.device().is_cuda()) { if (ind.device().is_cuda()) {
#ifdef WITH_CUDA #ifdef WITH_CUDA
......
#include <Python.h>
#include <torch/script.h> #include <torch/script.h>
#include "cpu/diag_cpu.h" #include "cpu/diag_cpu.h"
...@@ -6,6 +7,10 @@ ...@@ -6,6 +7,10 @@
#include "cuda/diag_cuda.h" #include "cuda/diag_cuda.h"
#endif #endif
#ifdef _WIN32
PyMODINIT_FUNC PyInit__diag(void) { return NULL; }
#endif
torch::Tensor non_diag_mask(torch::Tensor row, torch::Tensor col, int64_t M, torch::Tensor non_diag_mask(torch::Tensor row, torch::Tensor col, int64_t M,
int64_t N, int64_t k) { int64_t N, int64_t k) {
if (row.device().is_cuda()) { if (row.device().is_cuda()) {
......
#include <Python.h>
#include <torch/script.h> #include <torch/script.h>
#include "cpu/spmm_cpu.h" #include "cpu/spmm_cpu.h"
...@@ -6,6 +7,10 @@ ...@@ -6,6 +7,10 @@
#include "cuda/spmm_cuda.h" #include "cuda/spmm_cuda.h"
#endif #endif
#ifdef _WIN32
PyMODINIT_FUNC PyInit__spmm(void) { return NULL; }
#endif
std::tuple<torch::Tensor, torch::optional<torch::Tensor>> std::tuple<torch::Tensor, torch::optional<torch::Tensor>>
spmm_fw(torch::Tensor rowptr, torch::Tensor col, spmm_fw(torch::Tensor rowptr, torch::Tensor col,
torch::optional<torch::Tensor> optional_value, torch::Tensor mat, torch::optional<torch::Tensor> optional_value, torch::Tensor mat,
......
#include <Python.h>
#include <torch/script.h> #include <torch/script.h>
#include "cpu/spspmm_cpu.h" #include "cpu/spspmm_cpu.h"
...@@ -6,6 +7,10 @@ ...@@ -6,6 +7,10 @@
#include "cuda/spspmm_cuda.h" #include "cuda/spspmm_cuda.h"
#endif #endif
#ifdef _WIN32
PyMODINIT_FUNC PyInit__spspmm(void) { return NULL; }
#endif
std::tuple<torch::Tensor, torch::Tensor, torch::optional<torch::Tensor>> std::tuple<torch::Tensor, torch::Tensor, torch::optional<torch::Tensor>>
spspmm_sum(torch::Tensor rowptrA, torch::Tensor colA, spspmm_sum(torch::Tensor rowptrA, torch::Tensor colA,
torch::optional<torch::Tensor> optional_valueA, torch::optional<torch::Tensor> optional_valueA,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment