Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7004099
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T21:09:20+00:00 2026-05-27T21:09:20+00:00

In general, can Mathematica automatically (i.e. without writing code specifically for this) exploit GPU

  • 0

In general, can Mathematica automatically (i.e. without writing code specifically for this) exploit GPU hardware and/or parallelize built-in operations across multiple cores?

For example, for drawing a single very CPU-intensive plot or solving a very CPU-intensive equation, would upgrading the graphics hardware result in speed-up? Would upgrading to a CPU with more cores speed things up? (I realize that more cores mean I could solve more equations in parallel but I’m curious about the single-equation case)

Just trying to get a handle on how Mathematica exploits hardware.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T21:09:21+00:00Added an answer on May 27, 2026 at 9:09 pm

    I wouldn’t say Mathematica does automatically GPU or Paralell-CPU computing, at least in general. Since you need do something with paralell kernels, then you should initialize more kernels and/or upload CUDALink or OpenCLLink and use specific Mathematica functionality to exploit the potential of CPU and/or GPU.

    For example, I haven’t got very powerful graphics card (NVIDIA GeForce 9400 GT) but we can test how CUDALink works. First I have to upload CUDALink :

    Needs["CUDALink`"] 
    

    I am going to test multiplication of large matrices. I choose a random matrix 5000 x 5000 of real numbers in range (-1,1) :

    M = RandomReal[{-1,1}, {5000, 5000}];

    Now we can check the computing times without GPU support

      In[4]:= AbsoluteTiming[ Dot[M,M]; ]
    
      Out[4]= {26.3780000, Null}
    

    and with GPU support

    In[5]:= AbsoluteTiming[ CUDADot[M, M]; ]
    
    Out[5]= {6.6090000, Null}
    

    In this case we obtained a performance speed-up roughly of factor 4, by using CUDADot instead of Dot.

    Edit

    To add an example of parallel CPU acceleration (on a dual-core machine) I choose all prime numbers in range [2^300, 2^300 +10^6].
    First without parallelizing :

    In[139]:= AbsoluteTiming[ Select[ Range[ 2^300, 2^300 + 10^6], PrimeQ ]; ]
    
    Out[139]= {121.0860000, Null}
    

    while using Parallelize[expr], which evaluates expr using automatic parallelization

    In[141]:= AbsoluteTiming[ Parallelize[ Select[ Range[ 2^300, 2^300 + 10^6], PrimeQ ] ]; ]
    
    Out[141]= {63.8650000, Null}
    

    As one could expect we’ve got almost two times faster evaluation.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I understand this question can be general but, specifically with regards to ASP.NET MVC,
Can this be done? It seems like this should be possible. In general, I
This is a general question. And may not be specific to datagrids. How can
I want to implement this in Mathematica: I realize I can use ParametricPlot to
In general I think I can convey most programming related concepts quite well. Yet,
Can it be known in general whether or not placing a case within a
In general reflection in a base class can be put to some good and
To have a general-purpose documentation system that can extract inline documentation of multiple languages,
For general protocol message exchange, which can tolerate some packet loss. How much more
Can I set variables inside if-construct? In general, where is it allowed to set

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.