Giter Site home page Giter Site logo

Comments (2)

gyeongin avatar gyeongin commented on September 18, 2024

When we build PyTorch from source, we should also build torchvision from source because of the issue you've mentioned: pip-installing torchvision will reinstall different version of PyTorch.

You should:

  1. clone torchvision repo
  2. checkout to v0.5.0 tag (because torchvision v0.5.0 is the latest version compatible with PyTorch v1.4.1)
  3. run python setup.py install

Note that running torchvision's NMS operation with Nimble will have a problem.
Nimble is built for optimized GPU task scheduling, so the PyTorch module passed to Nimble should perform all computation on GPU.
However, torchvision's NMS implementation does not satisfy this constraint, as it performs some logic on CPU.

You can try these two options.

  1. Carve out "GPU-only" "static" part(s) from your PyTorch module, apply Nimble on those parts separately, and wire the resulting Nimble modules and the rest of your PyTorch module.
  2. Adopt GPU-only NMS implementation. TensorRT's batchedNMS and NMS plugin could be a good choice.

from nimble.

jp7c5 avatar jp7c5 commented on September 18, 2024

Thanks for the quick reply.

By following your suggestion, I built torchvision from source and surprisingly, the error related to nms doesn't show up.
But still, I'm having the following error
AttributeError: module 'torch.distributed' has no attribute 'init_process_group'.
I saw #1 , so is this expected for the current status?

Without distributed setting, the default training code runs smoothly.
In the process of applying nimble for this single GPU setup, I noticed that the model to be wrapped by nimble should have strict input and output format (mostly comprising of torch Tensors).
I don't know if this a must, but if not, the relaxation of this condition would make nimble easier to use :)

from nimble.

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.