Giter Site home page Giter Site logo

Multiple GPU Issue about gpujpeg HOT 4 CLOSED

cesnet avatar cesnet commented on August 20, 2024
Multiple GPU Issue

from gpujpeg.

Comments (4)

MartinPulec avatar MartinPulec commented on August 20, 2024

Hi Tony,

I am not sure if I'll be able to reproduce the problem because I am not sure if am able to make a mac supporting CUDA with multiple GPUs. I've, however, tried to do so in Linux and it worked fine for me using UltraGrid:

xpulec@bunny:~$ nvidia-smi

| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
|    0      3054      C   bin/uv                                       117MiB |
|    1      3109      C   bin/uv                                       117MiB |
+-----------------------------------------------------------------------------+

These are just 2 independent processes using the GPU with GPUJPEG.

Would you be able to provide a working example code presenting the problem? Or at least instructions how to replicate (eg. timing of the processes etc.).

Thanks,
Martin

EDIT: I've also tested Mac (although only 10.11) with NV 960+680 and it seemed to work.

from gpujpeg.

wolfviking0 avatar wolfviking0 commented on August 20, 2024

Hi Martin,

Here my configuration, currently I am using Python (I create a wrapper using swig). So I am creating the process using the multiprocessing API.
I will test with pycuda to see if It give me the same error when I try to initialize cuda from a subprocess.
I was able to use another approach, inside the main process python, I instantiate two GPUJPEG instance and then pass them to the process, now it seems to be working.

Unfortunately I still have one trouble, when I try to set the device_id to the GPU 1 it seems to be running on 0.
In order to choose the device I did 'gpujpeg_init_device(device_id, flags)' it should be enough ? I don't have to specify something else ?

from gpujpeg.

wolfviking0 avatar wolfviking0 commented on August 20, 2024

@MartinPulec There is something in my code for sure, If I test the gpujpeg binary I can use the other GPU when I use -D 1. I am still searching my mistake.

from gpujpeg.

wolfviking0 avatar wolfviking0 commented on August 20, 2024

So the issue was related to the multiprocessing in python. I was able to change in my code how python start a process and now I am able to run 4 instance of gpujpeg on two GPU. It work really well thanks

from gpujpeg.

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.