Skip to content

Error with nested models "Caffe2 uses a lazy allocation..." #1129

Open

Description

@Emanuele97x

I am trying to run a FSDP training built on top of metaseq:

I have a model with two other models nested inside it:

  • FSDP(model);
    • FSDP(submodel)
    • FSDP(submodel);

However I get this error: ""RuntimeError: The tensor has a non-zero number of elements, but its data is not allocated yet. Caffe2 uses a lazy allocation, so you will need to call mutable_data() or raw_mutable"" during the forward pass of the first submodule, do you ever encountered this error? Thanks a lot!

Activity

  1. changed the title [-]Error with nested models[/-] [+]Error with nested models "Caffe2 uses a lazy allocation..."[/+] on Jul 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions