Giter VIP home page Giter VIP logo

Comments (3)

SunQpark avatar SunQpark commented on August 25, 2024

If you have 3 GPUs, then they will be indexed as 0, 1, 2, not 1, 2, 3. So, you should use CUDA_VISIBLE_DEVICES=1,2 to use last two. Adding -d 1,2 to the command does the same thing.

But I don't understand why does it use GPU:0 (not 2) too, and this problem is not being reproduced in my machines.
Can you try python train.py -c config.json -d 1,2 and tell me how it goes?

from pytorch-template.

EzoBear avatar EzoBear commented on August 25, 2024

Someone is using gpu 0, and I wanted to use 1 and 2.
when i set gpu option with the -d option that you told, i do not get an error.

but i wonder why work when set device index from args.device to os.environ["CUDA_VISIBLE_DEVICES"] in train.py. but CUDA_VISIBLE_DEVICES=2,3 is not working. i think it's same operator.

thank you.

from pytorch-template.

EzoBear avatar EzoBear commented on August 25, 2024

but this solution make error.
because tensor use "cuda:0".
so data parallel module is occur error following.

File "/home/yjk931004/anaconda2/envs/mypython3/lib/python3.7/site-packages/torch/nn/parallel/_functions.py", line 54, in forward
assert all(map(lambda i: i.is_cuda, inputs))

image

from pytorch-template.

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.