Giter Site home page Giter Site logo

Comments (4)

krishansubudhi avatar krishansubudhi commented on May 21, 2024 1

I am working on the fix will raise a PR soon.

from pymarlin.

krishansubudhi avatar krishansubudhi commented on May 21, 2024

From more debugging it seems like a bug in gather_tensors_on_cpu

def gather_tensors_on_cpu(self, x: torch.tensor):
        n_samples = len(x)
        self._set_gather_frequency(n_samples)
        gathered = []
        n_chunks = n_samples // self.gather_frequency + 1
        print(n_chunks, n_samples, self.gather_frequency) # Debug code introduced

Output

1510 3018 2

This bug is because of self._set_gather_frequency(n_samples).
In case of multiple outputs, if dimension 0 of first output was 2, then gather_frequency will be set as 2 for rest of the outputs. Class variable assignment needs to be avoided here.

from pymarlin.

krishansubudhi avatar krishansubudhi commented on May 21, 2024

Also if n_chunks is different in 2 processes, all-gather gets stuck as the process with higher number of chunks keeps waiting. For this, either make num_chunks = 1 or gather the num_chunks tensor first and take the maximum.

from pymarlin.

jsleep avatar jsleep commented on May 21, 2024

Thanks for debugging this @krishansubudhi - any chance you'd be able to put these changes in or should we try to resource for next sprint?

from pymarlin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.