Skip to content

Commit

Permalink
Uses getCurrentCUDASparseHandle() instead of THCState
Browse files Browse the repository at this point in the history
  • Loading branch information
alokpathy committed Oct 16, 2020
1 parent 86f00ab commit 8b565a9
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 16 deletions.
15 changes: 0 additions & 15 deletions sparse-extension/build.out

This file was deleted.

Binary file not shown.
Binary file modified sparse-extension/build/temp.linux-ppc64le-3.6/sparse_coo_tensor.o
Binary file not shown.
Binary file not shown.
4 changes: 3 additions & 1 deletion sparse-extension/sparse_coo_tensor.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include <ATen/ATen.h>
#include <ATen/cuda/CUDAContext.h>
#include <ATen/Layout.h>
#include <ATen/Parallel.h>
#include <ATen/SparseTensorImpl.h>
Expand Down Expand Up @@ -122,7 +123,8 @@ void spmm_gpu(const at::Tensor& A_rowindices,
// cusparseHandle_t handle;
// CHECK_CUSPARSE(cusparseCreate(&handle));
auto state = at::globalContext().lazyInitCUDA();
auto handle = THCState_getCurrentSparseHandle(state);
// auto handle = THCState_getCurrentSparseHandle(state);
auto handle = at::cuda::getCurrentCUDASparseHandle();

// Impl1 -- coo2csr + csrmm2
int nnz = A_values.size(0);
Expand Down

0 comments on commit 8b565a9

Please sign in to comment.