Skip to content
New issue

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

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

Already on GitHub? # to your account

add device argument to Processor class #80

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

erceguder
Copy link

Hey, I've basically added a device argument for the Processor class constructor to allow for cuda, although defaults to cpu. Directly built upon this PR. Backward compatible.

@patrickvonplaten
Copy link
Contributor

Hmm is this really necessary? Couldn't we just do the device conversion after loading?

@erceguder
Copy link
Author

Surely we can do as such. Yet, this might be useful when the processor_id argument passed to the Processor class constructor is a variable, and we want to utilize cuda for checkpoint-based processors. In this case, the proposed change avoids the need for explicitly type-checking whether the processor needs a checkpoint, to load it on cuda.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants