Commit c8348c05 authored by rusty1s's avatar rusty1s
Browse files

added test

parent fe98b763
......@@ -4,9 +4,9 @@ from torch.utils.ffi import create_extension
abs_path = osp.join(osp.dirname(osp.realpath(__file__)), 'torch_scatter')
headers = ['torch_scatter/include/scatter.h']
sources = ['torch_scatter/src/scatter.c']
includes = [osp.join(abs_path, 'include'), osp.join(abs_path, 'src')]
headers = ['torch_scatter/src/cpu.h']
sources = ['torch_scatter/src/cpu.c']
includes = ['torch_scatter/src']
defines = []
extra_objects = []
with_cuda = False
......@@ -17,7 +17,7 @@ ffi = create_extension(
verbose=True,
headers=headers,
sources=sources,
includes=includes,
include_dirs=includes,
define_macros=defines,
extra_objects=extra_objects,
with_cuda=with_cuda,
......
from torch_scatter._ext import scatter
def test_scatter_add():
pass
......@@ -7,5 +7,5 @@ inline void check_inBoundaries(int idx, int size, long *free) {
if (idx < 0 || idx >= size) { THFree(free); THError("Invalid index"); }
}
#include "generic/scatter.c"
#include "generic/cpu.c"
#include "THGenerateAllTypes.h"
#ifndef TH_GENERIC_FILE
#define TH_GENERIC_FILE "generic/scatter.c"
#define TH_GENERIC_FILE "generic/cpu.c"
#else
inline void check_(asserts)(THTensor *output, THLongTensor *index, THTensor *input, int dim) {
......
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