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

Move DPR embeddings from GPU to CPU straight away #618

Merged
merged 2 commits into from
Nov 25, 2020
Merged

Conversation

brandenchan
Copy link
Contributor

This is an idea brought up by @nliu86 in #602.

DPR._get_predictions() aggregates document and query embeddings as tensors stored on GPU. This is usually fine but can become a large amount of GPU memory overhead when datasets get large. This PR aims to move them from GPU to CPU as early as possible in the pipeline.

Copy link
Member

@tholor tholor left a comment

Choose a reason for hiding this comment

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

LGTM

@brandenchan brandenchan merged commit 09690b8 into master Nov 25, 2020
@brandenchan brandenchan deleted the gpu_to_cpu branch November 25, 2020 13:22
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.

2 participants