CUDA Package - Maple Programming Help

CUDA Package

use CUDA(R) technology to accelerate certain LinearAlgebra routines

 Calling Sequence CUDA[command]( arguments ) command( arguments )

Introduction

 • The CUDA package allows Maple to use the graphics processing unit (GPU) of your NVIDIA(R) Compute Unified Device Architecture (CUDA)-enabled hardware to accelerate certain LinearAlgebra routines.
 • To use this package, you need NVIDIA CUDA-enabled hardware  and the most recent drivers for that hardware installed on your computer. For more information about supported hardware and a complete list of requirements, see the Supported Hardware for CUDA Acceleration help page.
 • For more information about the routines that are accelerated when CUDA technology is turned on, see the Routines Accelerated by the CUDA Package help page.

List of CUDA Package Commands

 • The Enable function turns CUDA acceleration on and off.
 • The IsEnabled function returns a value of true if CUDA acceleration is turned on and false otherwise.
 • The ComputeLevel function indicates the compute level of the CUDA-enabled devices available on your computer.
 • The HasDoubleSupport function checks whether the CUDA-enabled devices available on your computer support double precision computations.
 • The Properties function displays information about the CUDA-enabled devices available on your computer.

Examples

 > $n≔4000:$
 > $\mathrm{M1}≔\mathrm{LinearAlgebra}:-\mathrm{RandomMatrix}\left(n,n,\mathrm{datatype}=\mathrm{float}\left[4\right]\right):$
 > $\mathrm{M2}≔\mathrm{LinearAlgebra}:-\mathrm{RandomMatrix}\left(n,n,\mathrm{datatype}=\mathrm{float}\left[4\right]\right):$
 > $\mathrm{CUDA}:-\mathrm{IsEnabled}\left(\right)$
 ${\mathrm{false}}$ (1)
 > $\mathrm{tNoCUDA}≔\mathrm{time}\left[\mathrm{real}\right]\left(\mathrm{M1}·\mathrm{M2}\right)$
 ${\mathrm{tNoCUDA}}{≔}{13.823}$ (2)
 > $\mathrm{CUDA}:-\mathrm{Enable}\left(\mathrm{true}\right)$
 ${\mathrm{false}}$ (3)
 > $\mathrm{CUDA}:-\mathrm{IsEnabled}\left(\right)$
 ${\mathrm{true}}$ (4)
 > $\mathrm{tCUDA}≔\mathrm{time}\left[\mathrm{real}\right]\left(\mathrm{M1}·\mathrm{M2}\right)$
 ${\mathrm{tCUDA}}{≔}{1.163}$ (5)
 > $\mathrm{evalf}\left(\frac{\mathrm{tNoCUDA}}{\mathrm{tCUDA}}\right)$
 ${11.88564058}$ (6)
 > $\mathrm{CUDA}:-\mathrm{Enable}\left(\mathrm{false}\right)$
 ${\mathrm{true}}$ (7)
 > $\mathrm{CUDA}:-\mathrm{IsEnabled}\left(\right)$
 ${\mathrm{false}}$ (8)