Commit d9be28c0 authored by rusty1s's avatar rusty1s
Browse files

gputest

parent 5d7997a0
import torch
from torch_cluster._ext import ffi
cluster = torch.cuda.LongTensor(5)
pos = torch.cuda.FloatTensor(5, 2)
size = torch.cuda.FloatTensor(2)
count = torch.cuda.LongTensor(2)
func = ffi.THCCFloatGrid
print(func)
func(cluster, pos, size, count)
#!/bin/sh
echo "Compiling kernel..."
if [ -z "$1" ]; then TORCH=$(python -c "import os; import torch; print(os.path.dirname(torch.__file__))"); else TORCH="$1"; fi
SRC_DIR=aten/THC
BUILD_DIR=aten/build
mkdir -p $BUILD_DIR
for i in THCGreedy THCGrid; do
$(which nvcc) -c -o "$BUILD_DIR/$i.so" "$SRC_DIR/$i.cu" -arch=sm_52 -Xcompiler -fPIC -shared "-I$TORCH/lib/include/TH" "-I$TORCH/lib/include" "-I$SRC_DIR"
done
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