Running gspgemm unit test results in:
Cuda error in file '/home/ctcyang/graphblast-ben/./graphblas/backend/cuda/sparse_matrix.hpp' in line 167 : invalid device pointer.
The way to fix this is to either:
1) add a member variable per Matrix called owner_, which is set to true only when Matrix::build is called using a non-raw GPU pointer variant; or
2) add a wrapper struct around the GPU memory and use std::shared_ptr to keep track of this structure. Then when the number drops down to 0, this can be cleared. Downsides of this approach is it makes interacting with third-party libraries more difficult.
Running gspgemm unit test results in:
Cuda error in file '/home/ctcyang/graphblast-ben/./graphblas/backend/cuda/sparse_matrix.hpp' in line 167 : invalid device pointer.
The way to fix this is to either: 1) add a member variable per Matrix called owner_, which is set to true only when Matrix::build is called using a non-raw GPU pointer variant; or 2) add a wrapper struct around the GPU memory and use std::shared_ptr to keep track of this structure. Then when the number drops down to 0, this can be cleared. Downsides of this approach is it makes interacting with third-party libraries more difficult.