Questions tagged [cudalink]

Questions about using CUDALink, Mathematica's method to accelerate programs using NVidia graphics cards.

Filter by
Sorted by
Tagged with
28 votes
3 answers
5k views

How to find the center of a circular pattern?

I am writing an algorithm that finds the center of 500 x 500 pixels images coming from a live feed from a camera at 50 Hz. So it has to be quick! The images are images of an optical field which looks ...
Ziofil's user avatar
  • 2,470
19 votes
1 answer
2k views

How to use SparseArray in CUDA?

Sparse arrays are widely used in many scientific applications where memory and time are strictly limited. For a considerable speedup one can use CUDA. Since Mathematica 8 we can conveniently use CUDA ...
ybeltukov's user avatar
  • 43.7k
19 votes
1 answer
2k views

Why does CUDAQ (from CUDALink) download data from Wolfram servers?

I understand why functions like ElementData or CountryData need to download up-to-date data when first launched. However, when ...
F'x's user avatar
  • 10.8k
17 votes
2 answers
812 views

Combining images with CUDA

SMALL UPDATE: This question is left as unanswered, because none of the existing answers as of yet actually use CUDA (though, whilst being very useful). 2nd Edition: To make it a bit more clear, and ...
Alexey Bobrick's user avatar
15 votes
0 answers
161 views

How to use user-provided CUDA toolkits?

In the revision history, Mathematica v12.1 claims to have "support for user-provided CUDA Toolkits". But other than this line in the revision history, I cannot find any other reference to ...
njpipeorgan's user avatar
  • 1,176
13 votes
1 answer
1k views

calling CUDA library functions

Mathematica has some predefined CUDA functions, like CUDAMap, CUDAFourier, etc. My question is how can one call functions which are part of CUDA library but not part of predefined Mathematica ...
user1188038's user avatar
12 votes
4 answers
762 views

CUDA on Tesla V100 card

Context I am trying to run CUDALink with a Centos 6.10 Mathematica 12.0 [cuda 10.1]. Host has NVIDIA Corporation GV100GL [Tesla V100 PCIe 32GB] (rev a1) card ...
chris's user avatar
  • 22.9k
12 votes
3 answers
2k views

Are you able to use CUDA on Linux?

I am using Mathematica 10.2 on Ubuntu 15.04 x64. At first, I try to use CUDALink: Needs["CUDALink`"]; CUDAQ[] It returns ...
Purboo's user avatar
  • 677
11 votes
3 answers
2k views

Mathematica 12, supported GPUs

It seems that Mathematica 12 doesn't support NVidia 2xxx (i.e 2080), 16xx or 1xxx series. Could it be that the CUDA section has not yet been rewritten for 12? https://reference.wolfram.com/language/...
Jerome Ibanes's user avatar
10 votes
1 answer
541 views

How to make a volume CUDA rendering isometric?

I just realized that the output of CUDAVolumetricRender[] uses (quite marked) perspective, which I do not want (for scientific data representation, it can be very ...
F'x's user avatar
  • 10.8k
10 votes
2 answers
3k views

CUDA and GPU hardware and compatibility questions?

We have iMac desktops and have just begun to parallelize computations across them see: Wolfram Light Weight Grid and parallel computing. This still does not look like it will give us the performance ...
Jagra's user avatar
  • 14.3k
10 votes
1 answer
995 views

CUDALink not working on Mac OS X

On my MacBook Pro, I have a CUDA enabled video card, yet Mathematica does not seem to recognize this. For example, following the CUDALink Setup, I get ...
rcollyer's user avatar
  • 34k
9 votes
2 answers
2k views

Mathematica cannot find CUDA driver

I have successfully installed CUDA 5.0 on my Ubuntu 12.10, with driver 304.54, toolkit and samples. Running deviceQuery gives me a successful output: ...
Ziofil's user avatar
  • 2,470
9 votes
0 answers
1k views

Poor CUDALink performance, when calling a kernel multiple times

When working on a project of mine I noticed that CUDALink shows very poor performance when calling CUDA kernels multiple times in a loop-construct. To demonstrate this I put together this little ...
definitely.uncertain's user avatar
8 votes
2 answers
573 views

Use of Cellular Automaton or Discrete Convolution to calculate Potts Energy of a 2D Matrix

In a project of Monte Carlo Modelling of Grain Growth (Link) one of the most costly subroutines is the calculation of the Potts-Energy of an Monte Carlo Grid cell by comparing the center cell value ...
Rainer's user avatar
  • 2,891
8 votes
1 answer
268 views

Can CUDAVolumetricRender be combined with other 3D graphics?

I have volumetric data, which I can render using CUDAVolumetricRender[]. However, I cannot seem to find a way to combine it with other 3D graphics, such as adding a ...
F'x's user avatar
  • 10.8k
8 votes
1 answer
714 views

Can't use CUDA shared memory

CUDALink is properly installed and up to date, all built-in functions work fine, and all little functions I did worked fine... Until I tried using shared memory. The only example I found on the help ...
Rojo's user avatar
  • 42.6k
7 votes
2 answers
667 views

CUDA image processing

I am having an issue with image processing involving CUDALink. ...
Richard's user avatar
  • 73
7 votes
2 answers
993 views

CUDAQ not working in Mathematica 10.2.0.0 on Windows 7 (using CUDA 7.5)

I have been trying to get CUDA to work in Mathematica for kernel development. I downloaded and installed Visual Studio 2013 Community and the latest NVIDIA developers toolkit 7.5 (in that order). ...
Julian Francis's user avatar
7 votes
1 answer
1k views

CUDA for linear equations

TLDR; Is there a way to solve linear equations of a sparse matrix (discretized laplace operator) efficiently using CUDALink in Mathematica? I didn't find a CUDALinearSolve or CUDAMatrixInverse or ...
Chalky's user avatar
  • 73
7 votes
2 answers
983 views

CUDALink not working on Linux-64 and Asus GTX460

On my hardware I have a CUDA enabled video card an ASUS GTX460, yet Mathematica does not seem to recognize this. I have: CUDA Toolkit 4.1 CUDA SDK 4.0 NVIDIA Driver 295.49 on Sabayon Linux 64 bit ...
image_doctor's user avatar
  • 10.2k
7 votes
1 answer
1k views

make mathematica recognize CCompiler and compile CUDA code on remote Windows machine

I have set up a Mathematica remote kernel on a Windows 7 64 bit machine, which has Microsoft Visual Studio 2010 installed. When I start Mathematica on the windows machine Mathematica recognizes the C-...
Wizard's user avatar
  • 2,720
7 votes
1 answer
228 views

A simple experiment to understand CUDAFunctionLoad

In an attempt to answer my own question (Beginner CUDA: two dimensional blocks and two dimensional threads?). Please excuse the long post, it contains for examples I constructed as an experiment to ...
Craig Carter's user avatar
  • 4,415
7 votes
1 answer
1k views

CUDALink is not initialized

I've upgraded to Mathematica 9.0 on Ubuntu 12.04 with the latest Nvidia driver (304.64). I load CUDA by using, as usual, Needs["CUDALink`"]. ...
HopfMap's user avatar
  • 71
7 votes
0 answers
191 views

Extremely Long GPU Initialization Times on Mathematica 12.2 and RTX3090 [closed]

I'm having trouble getting my new GPU system to work with Mathematica 12.2. I have two RTX3090 cards in my setup. My NVIDIA drivers are version 460.89 (the latest). I have installed CUDAToolkit 11.0 ...
Gianni Tallarita's user avatar
7 votes
0 answers
241 views

Getting CUDALink (Toolkit 7.5) to work on Linux, Mathematica 10.0.2, GTX750

I want to make use of some CUDA functionality on my machine. It is running Gentoo Linux (64bit), Mathematica 10.0.2 on an Intel Xeon E5-1620v3 with a Geforce GTX750. So everything on the hardware/OS ...
Lukas's user avatar
  • 2,702
6 votes
3 answers
818 views

How to properly remove the CUDAResources paclet?

I have Mathematica 8.0.0.0 installed on my Mac, and while I tried to see what it could do with CUDA, it downloaded a large directory (~1 GB) named ...
F'x's user avatar
  • 10.8k
6 votes
2 answers
738 views

CUDA: setting grid dimensions

I'm new to CUDA, and CUDALink. I see how CUDAFunctionLoad allows one to set the block dimensions. On calling the function, you can also either pass as argument or have MMA automatically select the ...
Rojo's user avatar
  • 42.6k
6 votes
1 answer
782 views

CUDALink support-Mathematica 11

Greetings & Salutations, I have Mathematica 11.0 on a Windows 10(Home) system with a Nvidia GTX1050Ti gpu, driver version 382.33 and CUDA version 8.0.61; I am getting CUDALink is not supported ...
Vectorizer's user avatar
6 votes
1 answer
5k views

How is the dimensionality of an OpenCL problem specified?

When writing an OpenCL kernel, calls to get_global_id() are used to determine the "position" within the problem that a particular instance of the kernel is working ...
Chris's user avatar
  • 163
6 votes
1 answer
433 views

CUDALink Error: A CUDALink kernel timed out?

I'm following the CUDALink tutorial [ http://reference.wolfram.com/language/CUDALink/tutorial/Introduction.html ] and everything is going fine until I get to the part that calls CUDADot on the ...
Edmund's user avatar
  • 42.3k
6 votes
0 answers
338 views

Does OpenCL/Cuda memory leak if not Unloaded? Problem with allocating/loading GPU memory in Module

The GPU memory manager documentation is not too clear, does GPU memory leak if not explicitly unloaded or if the symbol that holds the reference to the GPU memory gets collected, the GPU memory gets ...
Angelo Pesce's user avatar
5 votes
1 answer
513 views

Volumetric Rendering of cylinder symmetric radial image

I would like to render a cylinder symmetric radial cross-section with Image3D. As an example one could use the propagation of a Bessel Beam through a Lens: Here the cylinder axis is the bottom of the ...
Rainer's user avatar
  • 2,891
5 votes
1 answer
412 views

cannot load CUDAFunction from cubin, ptx or library file

According to the documentation of CUDAFunctionLoad it should be easy to specify a compiled file (cubin, ptx, dll should all work) as the source for loading a ...
Wizard's user avatar
  • 2,720
5 votes
2 answers
566 views

CUDA 6.5, Mathematica 10.0.2, and Ubuntu 14.04

I have CUDA 6.5 working fine on Ubuntu 14.04. Mathematica recognizes the driver (Nvidia 340), but CUDAQ[] returns False and I cannot get any CUDA functions to work in Mathematica. I have created ...
Sean Lawton's user avatar
5 votes
0 answers
168 views

Target Device->"GPU" Not Working For Machine Learning: LibraryFunction error

I'm running Wolfram Desktop version 13.2.1, and after downloading Visual Studio, Nvidia Toolkit version 12.1 and 11.2, and verifying that ...
Daniel Berkowitz's user avatar
5 votes
0 answers
174 views

Is there a Mathematica CUDA ode solver?

I have a system of ODEs which I'd like to solve with many (thousands) different initial conditions. In the net there are articles that CUDA can speed up such computations, but I haven't found ...
Andrew's user avatar
  • 2,513
5 votes
0 answers
205 views

Fast N-Body Simulation with CUDA [closed]

There is a Mathematica code for 3 body simulation ...
vito's user avatar
  • 8,958
5 votes
0 answers
700 views

How to invert a matrix with 100 trillion elements?

I have a $10^{7}\times 10^{7}$ matrix with the following properties: it is sparse it is gamma-5 it is almost Hermitian. If $M$ is the matrix we are trying to invert, we know $M=A M^{\dagger} A$ ...
M.R.'s user avatar
  • 31.5k
5 votes
0 answers
988 views

Beginner CUDA: two dimensional blocks and two dimensional threads?

This is a follow up question to: CUDA: setting grid dimensions. The purpose of the question is to understand how Mathematica is interfacing with CUDA's architecture. I have a related question/request ...
Craig Carter's user avatar
  • 4,415
4 votes
1 answer
634 views

Help with CUDA nvcc error in Mandelbulb example Mathematica 11.0 NVIDIA GTX 1070 on Ubuntu

I am exploring the Nvidia GTX 1070 with Mathematica, I tried this example from the Help guide and it fails with a nvcc complier error. A little google research seems to indicate that I need the nvcc ...
Dave's user avatar
  • 258
4 votes
1 answer
763 views

CreateLibrary for CUDA with NVCCCompiler

I am currently learning to use CUDA to speed up calculations. The book I am working with uses C code on the CPU to supply certain variables etc.. So I would like to compile the give code in ...
Eisbär's user avatar
  • 1,476
4 votes
1 answer
591 views

CUDAQ[] returns False in version 9 while True in version 8

CUDA works in version 8 but not in version 9. Is there a way to fix the problem in version 9? I've installed the latest CUDA from the official website https://developer.nvidia.com/cuda-downloads
xslittlegrass's user avatar
4 votes
1 answer
345 views

How to determine MMA/CUDA support for specific GPUs?

This question asked how to target an Nvidia GTX 1080 with MMA 11.0.1 (which is also my current version) and from the comments it is clear that the user was then able to use this card successfully even ...
Julian Moore's user avatar
  • 2,560
4 votes
1 answer
438 views

How to troubleshoot CUDALink?

This is a follow-up question from linking the libraries for CUDALlink in Ubuntu 12.10. The tests that I execute (CUDAQ[], ...
Ziofil's user avatar
  • 2,470
4 votes
2 answers
482 views

CUDALink gives wrong results but no error on Mathematica 13.2

I installed Mathematica 13.2 under Linux Mint 21.1 (Ubuntu 22.04). After installing cuda-toolkit-11-8. I get True as answer from CUDAQ[], but if I start some calculations I get wrong results. ...
Tschibi's user avatar
  • 877
4 votes
0 answers
215 views

Interactive CUDAFluidDynamics example without CUDA?

On Macbooks OpenCL works but not CUDA. I saw this fun example CUDAFluidDynamics in the CUDALink package and I wanted to play with it, but couldn't. Perhaps someone ...
M.R.'s user avatar
  • 31.5k
4 votes
0 answers
507 views

NVCC CUDA Compiler not showing up

I am trying to follow instructions for "Compiling for CUDA", so that I can write my own functions to run on the GPU. However, CUDAFunctionLoad gives me errors. ...
wutch's user avatar
  • 141
4 votes
0 answers
151 views

CUDA not recognized on MacBookPro

I am running Mma 11.1.0 on MacOS 10.12.4 on MacBook Pro (Retina, 15-inch, Mid 2014) with NVIDIA GeForce GT 750M 2048 MB I installed the Nvidia CUDA driver 8.0.71. I evaluate ...
abwatson's user avatar
  • 1,919
4 votes
0 answers
308 views

CUDADot runs slowly and writes "CUDALink experienced a kernel launch failure" with matrix size > 3300

I am trying to learn CUDA and start from the help examples. It turnes out that CPU calculation is much faster for matrix sizes < 3200 than CUDA, while CUDADot gives the error for sizes > 3300. I ...
user40532's user avatar
  • 215