diff --git a/misc/test_gpu_sm_op.py b/misc/test_gpu_sm_op.py index e7f640db8d1dfd..2de61af1d9a482 100644 --- a/misc/test_gpu_sm_op.py +++ b/misc/test_gpu_sm_op.py @@ -25,7 +25,7 @@ data_rvs=rvs).astype(np_dtype) S2 = random(rows, cols, density=0.5, random_state=rng, data_rvs=rvs).astype(np_dtype) -# S2 = S2.T + nnz_A = len(S1.data) nnz_B = len(S2.data) diff --git a/taichi/program/sparse_matrix.h b/taichi/program/sparse_matrix.h index 859f4eeea6a4d1..eaab4db2cd7988 100644 --- a/taichi/program/sparse_matrix.h +++ b/taichi/program/sparse_matrix.h @@ -225,6 +225,7 @@ class CuSparseMatrix : public SparseMatrix { virtual ~CuSparseMatrix(); + // TODO: Overload +=, -= and *= friend std::unique_ptr operator+(const CuSparseMatrix &lhs, const CuSparseMatrix &rhs) { auto m = lhs.addition(rhs, 1.0, 1.0); @@ -236,7 +237,6 @@ class CuSparseMatrix : public SparseMatrix { return lhs.addition(rhs, 1.0, -1.0); }; - // TODO: Overload *= friend std::unique_ptr operator*(const CuSparseMatrix &sm, float scale) { return sm.addition(sm, scale, 0.0);