Destroy CUDA stream when finished #2921

Merged
merged 1 commit into from Aug 14, 2015

Conversation

Projects
None yet
3 participants
Contributor

buaaliyi commented Aug 14, 2015

Add missing cudaStreamDestroy in BasePrefetchingDataLayer::InternalThreadEntry. cudaStreamCreate and cudaStreamDestroy function call always come in pairs.

ronghanghu added the bug label Aug 14, 2015

Member

ronghanghu commented Aug 14, 2015

@cypof I am not an expert in CUDA myself, but I believe cudaStreamDestroy was missing in #2903 (originally #2114). Although it shouldn't really matter since prefetch thread is now persistent, it is still better to call cudaStreamDestroy.

I think this PR should be the right fix. Please correct me if I'm wrong.

Contributor

cypof commented Aug 14, 2015

Ah yes, that's correct. Good catch.

@ronghanghu ronghanghu added a commit that referenced this pull request Aug 14, 2015

@ronghanghu ronghanghu Merge pull request #2921 from buaaliyi/multi_gpu
Destroy CUDA stream when finished
65c7fa6

@ronghanghu ronghanghu merged commit 65c7fa6 into BVLC:master Aug 14, 2015

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

buaaliyi deleted the buaaliyi:multi_gpu branch Aug 15, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment