Skip to content
This repository has been archived by the owner on Mar 21, 2024. It is now read-only.

Don't call the destruction kernel for an empty vector #1021

Merged
merged 2 commits into from
Oct 15, 2019

Conversation

brycelelbach
Copy link
Collaborator

When destroying a Thrust vector, we should avoid calling destroy if the vector is empty. For a device_vector, destroy calls into parallel algorithm machinery, which doesn't currently early exit (or early exit enough) for empty ranges.

This is a fix for Bug 2720132.

@brycelelbach brycelelbach requested a review from griwes October 10, 2019 21:14
Copy link
Collaborator

@griwes griwes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@brycelelbach
Copy link
Collaborator Author

Internal CI has passed. Merging this.

@brycelelbach brycelelbach merged commit 93ad270 into master Oct 15, 2019
@brycelelbach brycelelbach deleted the bug/nvbug-2720132-avoid-destroy-for-empty-vector branch October 15, 2019 03:54
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants