Giter Site home page Giter Site logo

GPU performance worse than CPU about simit HOT 4 OPEN

touste avatar touste commented on June 11, 2024
GPU performance worse than CPU

from simit.

Comments (4)

fredrikbk avatar fredrikbk commented on June 11, 2024

Hi @touste. Thank you for your interest and I'm glad it has made your job easier! The GPU backend has sadly not been maintained for too long. Are you mapping arguments to the GPU every iteration, thus incurring costs in moving data? Perhaps @gkanwar can provide some further suggestions? Could it be due to the cost of sending a run command to the GPU every time step?

Regarding a roadmap, I completely agree. Simit has, unfortunately, been neglected for about a year while we have worked on the tensor algebra compiler (tensor-compiler.org). We built it to become the new compiler for Simit, but it has taken on a life of its own. However, we are trying to find the time to integrate the tensor compiler with Simit and use it to carry out several improvements to the Simit language.

from simit.

gkanwar avatar gkanwar commented on June 11, 2024

Unfortunately, as @fredrikbk mentioned, the GPU backend certainly needs some maintenance at this point. I am happy to help work through the issues you're seeing, but it would be helpful if you can provide a small code sample that demonstrates the performance bug. Thanks!

from simit.

touste avatar touste commented on June 11, 2024

Thank you for your suggestions, I was indeed able to get better performances by reducing the number of mappings between the cpu and gpu. One thing that also helped was to build simit with the release flag. Now I get a 4x speedup on gpu compared to cpu, which is reasonnable I suppose.
@fredrikbk it's nice to know that there are still plans to improve the language, I was starting to worry about the project being abandonned.
On a side note, I tried to look for other solutions (ex: theano) to implement my code, but nothing approaches the combined simplicity and performance of Simit. This is perfect for me, as I'm more versed in mechanical engineering than computer science, I can rely on the language to achieve the best possible performance without digging too deep into gpu programming. By the way, taco is also promising to write code for continuum mechanics, I can't wait to see it integrated with Simit.
Performance-wise, are there plans to support vectorization and multiprocessing? Also, a nice feature would be the possibility to perform multiple assembly maps in parallel when possible.

Thanks again!

from simit.

fredrikbk avatar fredrikbk commented on June 11, 2024

@touste, yes, we want to get back to it. Integrating taco with Simit will let us make it much more general, including arbitrary blocked matrices and even general sparse tensor computations. It has just been a time management issue, since taco itself has required a lot of work over the last year. Also, we'll be talking to Nvidia about tricks to get fast GPU support in taco, so when they are combined you might get a nice GPU speedup.

I'm so glad to hear that it's useful to you! It really makes the work worth it.

In the mean time, taco is a C++ library so you can use it apart from Simit if you wish. Of course, when it's integrated with Simit, especially tensor assemblies, then it will be much more convenient.

taco does support multiprocessing to some degree, so Simit will get that with taco integration. It also has some vectorization that it gets from the compiler, but I'm hoping to find a keen master student to improve on that. Multiple concurrent assemblies is a great idea that we'll think about.

from simit.

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.