Skip to content

Commit

Permalink
Allow MatDescriptor to be pickle-able
Browse files Browse the repository at this point in the history
  • Loading branch information
jakirkham committed Mar 5, 2020
1 parent 43c3c21 commit 2d2209b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cupy/cusparse.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ def create(cls):
descr = cusparse.createMatDescr()
return MatDescriptor(descr)

def __reduce__(self):
return self.create, ()

def __del__(self, is_shutting_down=util.is_shutting_down):
if is_shutting_down():
return
Expand Down

0 comments on commit 2d2209b

Please sign in to comment.