Commit 6aad98c2 authored by rusty1s's avatar rusty1s
Browse files

bugfix

parent e95d789b
...@@ -43,6 +43,7 @@ def grid_cluster(position, size, batch=None): ...@@ -43,6 +43,7 @@ def grid_cluster(position, size, batch=None):
func = get_func('grid', position) func = get_func('grid', position)
func(C, cluster, position, size, c_max) func(C, cluster, position, size, c_max)
cluster = cluster.squeeze(dim=-1) cluster = cluster.squeeze(dim=-1)
cluster = consecutive(cluster) if not cluster.is_cuda:
cluster = consecutive(cluster)
return cluster return cluster
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
#else #else
void cluster_(grid)(THCState *state, int C, THCudaLongTensor *output, THCTensor *position, THCTensor *size, THCudaLongTensor *count) { void cluster_(grid)(THCState *state, int C, THCudaLongTensor *output, THCTensor *position, THCTensor *size, THCudaLongTensor *count) {
printf("drin");
} }
#endif #endif
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
#include "kernel.h" #include "kernel.h"
#define cluster_(NAME) TH_CONCAT_4(cluster, NAME, _kernel_, Real) #define cluster_(NAME) TH_CONCAT_4(cluster_, NAME, _kernel_, Real)
#include "generic/kernel.cu" #include "generic/kernel.cu"
#include "THCGenerateAllTypes.h" #include "THCGenerateAllTypes.h"
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
#else #else
void cluster_(grid)(int C, THCudaLongTensor *output, THCTensor *position, THCTensor *size, THCudaLongTensor *count) { void cluster_(grid)(int C, THCudaLongTensor *output, THCTensor *position, THCTensor *size, THCudaLongTensor *count) {
/* return cluster_kernel_(grid)(state, C, output, position, size, count); */ cluster_kernel_(grid)(state, C, output, position, size, count);
} }
#endif #endif
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