CUDA
IsEnabled
check if CUDA(R) acceleration is turned on
Calling Sequence
Description
Examples
IsEnabled( )
The IsEnabled function returns a value of true if Compute Unified Device Architecture (CUDA) acceleration is turned on and false otherwise.
Use the Enable function to turn CUDA acceleration on and off.
If your computer does not support CUDA, an error will be displayed. For more information about supported hardware, see Supported Hardware for CUDA Acceleration.
Run these examples on a computer that supports CUDA.
n≔4000:
M1≔LinearAlgebra:-RandomMatrix⁡n,n,datatype=float4:
M2≔LinearAlgebra:-RandomMatrix⁡n,n,datatype=float4:
CUDA:-IsEnabled⁡
false
tNoCUDA≔timereal⁡M1·M2
tNoCUDA≔13.823
CUDA:-Enable⁡true
true
tCUDA≔timereal⁡M1·M2
tCUDA≔1.163
evalf⁡tNoCUDAtCUDA
11.88564058
CUDA:-Enable⁡false
See Also
CUDA[Enable]
CUDA[Properties]
Supported Hardware for CUDA Acceleration
Download Help Document