Skip to content

Training sending undesired tensor to GPU #8035

@felipemello1

Description

@felipemello1

🐛 Bug

Embedding vector, defined outside of training loop, is sent to GPU if trainer has gpu > 0 when trainer starts to run.

Please reproduce using the BoringModel

To Reproduce

https://colab.research.google.com/gist/fmellomascarenhas/3054651c4081f1489ff8d56fe0636a1d/the-boringmodel.ipynb

Expected behavior

My embedding is too big to fit inside of my GPU. I want to be able to call the Embedding in the CPU, and then send the selected embeddings to GPU for training.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions