Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mark stage buffers as consumed with stream callback #712

Merged
merged 1 commit into from Apr 3, 2019

Conversation

klecki
Copy link
Contributor

@klecki klecki commented Mar 29, 2019

This fixes an issue of marking CPU buffers as free
before they are consumed by async GPU kernels
of Mixed stage (simialr thing for Support stage).

Alternative to #708.

Signed-off-by: Krzysztof Lecki klecki@nvidia.com

if (HasPreviousStage(stage)) {
ReleaseStageIdx(PreviousStage(stage), idxs);
}
// TODO(klecki) when we move to CUDA 10, we should move to cudaLaunchHostFunc
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe ifdef for CUDA 10? We have CUDA 10 already.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This API is described as to be deprecated in some future, but is still available in both CUDA 9 and 10. Maybe it is better to not have build dependent code paths until we actually need to.

@klecki
Copy link
Contributor Author

klecki commented Apr 2, 2019

Tested in #718, as rebased on #699.

@klecki
Copy link
Contributor Author

klecki commented Apr 2, 2019

Build 692185.

@klecki
Copy link
Contributor Author

klecki commented Apr 2, 2019

Rebased on #699, to reduce the CI workload.

@klecki klecki force-pushed the callback-release branch 3 times, most recently from 1073488 to b6523f5 Compare April 3, 2019 11:25
@klecki
Copy link
Contributor Author

klecki commented Apr 3, 2019

Proper changes only in last commit, rest is #699

This fixes an issue of marking CPU buffers as free
before they are consumed by async GPU kernels
of Mixed stage (simialr thing for Support stage).

Short circuit ReleaseIdx for invalid idxs

Introduce kInvalidIdx in queue policy

Check if indexes are valid before processing

Signed-off-by: Krzysztof Lecki <klecki@nvidia.com>
@klecki
Copy link
Contributor Author

klecki commented Apr 3, 2019

Build 693777

@Kh4L Kh4L merged commit a74ac99 into NVIDIA:master Apr 3, 2019
haoxintong pushed a commit to haoxintong/DALI that referenced this pull request Jul 16, 2019
This fixes an issue of marking CPU buffers as free
before they are consumed by async GPU kernels
of Mixed stage (simialr thing for Support stage).

Short circuit ReleaseIdx for invalid idxs

Introduce kInvalidIdx in queue policy

Check if indexes are valid before processing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants