Commit 631eee37 authored by rusty1s's avatar rusty1s
Browse files

fix warnings

parent 64b0ae30
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
#include "compat.h" #include "compat.h"
#define CHECK_CPU(x) AT_ASSERTM(!x.type().is_cuda(), #x " must be CPU tensor") #define CHECK_CPU(x) AT_ASSERTM(x.device().is_cpu(), #x " must be CPU tensor")
torch::Tensor ind2ptr(torch::Tensor ind, int64_t M) { torch::Tensor ind2ptr(torch::Tensor ind, int64_t M) {
CHECK_CPU(ind); CHECK_CPU(ind);
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
#include "compat.h" #include "compat.h"
#define CHECK_CPU(x) AT_ASSERTM(!x.type().is_cuda(), #x " must be CPU tensor") #define CHECK_CPU(x) AT_ASSERTM(x.device().is_cpu(), #x " must be CPU tensor")
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) {
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
#include "compat.h" #include "compat.h"
#define CHECK_CPU(x) AT_ASSERTM(!x.type().is_cuda(), #x " must be CPU tensor") #define CHECK_CPU(x) AT_ASSERTM(x.device().is_cpu(), #x " must be CPU tensor")
enum ReductionType { SUM, MEAN, MIN, MAX }; enum ReductionType { SUM, MEAN, MIN, MAX };
......
#include <torch/script.h> #include <torch/script.h>
#define CHECK_CUDA(x) AT_ASSERTM(x.type().is_cuda(), #x " must be CUDA tensor") #define CHECK_CUDA(x) \
AT_ASSERTM(x.device().is_cuda(), #x " must be CUDA tensor")
torch::Tensor ind2ptr_cuda(torch::Tensor ind, int64_t M); torch::Tensor ind2ptr_cuda(torch::Tensor ind, int64_t M);
torch::Tensor ptr2ind_cuda(torch::Tensor ptr, int64_t E); torch::Tensor ptr2ind_cuda(torch::Tensor ptr, int64_t E);
......
#include <torch/script.h> #include <torch/script.h>
#define CHECK_CUDA(x) AT_ASSERTM(x.type().is_cuda(), #x " must be CUDA tensor") #define CHECK_CUDA(x) \
AT_ASSERTM(x.device().is_cuda(), #x " must be CUDA tensor")
torch::Tensor non_diag_mask_cuda(torch::Tensor row, torch::Tensor col, torch::Tensor non_diag_mask_cuda(torch::Tensor row, torch::Tensor col,
int64_t M, int64_t N, int64_t k); int64_t M, int64_t N, int64_t k);
......
#include <torch/script.h> #include <torch/script.h>
#define CHECK_CUDA(x) AT_ASSERTM(x.type().is_cuda(), #x " must be CUDA tensor") #define CHECK_CUDA(x) \
AT_ASSERTM(x.device().is_cuda(), #x " must be CUDA tensor")
std::tuple<torch::Tensor, torch::optional<torch::Tensor>> std::tuple<torch::Tensor, torch::optional<torch::Tensor>>
spmm_cuda(torch::Tensor rowptr, torch::Tensor col, spmm_cuda(torch::Tensor rowptr, torch::Tensor col,
......
#include <torch/script.h> #include <torch/script.h>
#define CHECK_CUDA(x) AT_ASSERTM(x.type().is_cuda(), #x " must be CUDA tensor") #define CHECK_CUDA(x) \
AT_ASSERTM(x.device().is_cuda(), #x " must be CUDA tensor")
std::tuple<torch::Tensor, torch::Tensor, torch::optional<torch::Tensor>> std::tuple<torch::Tensor, torch::Tensor, torch::optional<torch::Tensor>>
spspmm_cuda(torch::Tensor rowptrA, torch::Tensor colA, spspmm_cuda(torch::Tensor rowptrA, torch::Tensor colA,
......
#include <torch/extension.h> #include <torch/extension.h>
#define CHECK_CUDA(x) AT_ASSERTM(x.type().is_cuda(), #x " must be CUDA tensor") #define CHECK_CUDA(x) \
AT_ASSERTM(x.device().is_cuda(), #x " must be CUDA tensor")
std::tuple<at::Tensor, at::Tensor> unique_cuda(at::Tensor src); std::tuple<at::Tensor, at::Tensor> unique_cuda(at::Tensor src);
......
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