While working on the PR #452 , Matt discovered that in the movement assignment and constructor, we needed to manually reset other.param_.d_data_ = nullptr after the move operator. Otherwise, the cudaFree will be performed twice for the same device data and an error will be triggered later.
It will be better to add a test for this so that we won't be trapped by this again.
While working on the PR #452 , Matt discovered that in the movement assignment and constructor, we needed to manually reset
other.param_.d_data_ = nullptr
after the move operator. Otherwise, thecudaFree
will be performed twice for the same device data and an error will be triggered later.It will be better to add a test for this so that we won't be trapped by this again.