turn on or turn off CUDA(R) acceleration
Enable( bool )
( truefalse ) turn on or turn off CUDA acceleration
The Enable function turns Compute Unified Device Architecture (CUDA) acceleration on and off. By default, CUDA acceleration is turned off.
Note: The Enable function returns the previous setting for CUDA acceleration. For example, if you run the CUDA:-Enable(true) function when CUDA acceleration is turned off, CUDA acceleration will then be turned on, but the function will return a value of false because CUDA acceleration was previously turned off. See the examples below.
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=float:
M2 ≔ LinearAlgebra:-RandomMatrix⁡n,n,datatype=float:
tNoCUDA ≔ time[real]⁡M1.M2
tNoCUDA ≔ 13.823
tCUDA ≔ time[real]⁡M1.M2
tCUDA ≔ 1.163
Supported Hardware for CUDA Acceleration
Download Help Document
What kind of issue would you like to report? (Optional)
Thank you for submitting feedback on this help document. Your feedback will be used
to improve Maple's help in the future.