i9a:> maple23 test_cuda.mpl
|\^/| Maple 2023 (X86 64 LINUX)
._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2023
\ MAPLE / All rights reserved. Maple is a trademark of
<____ ____> Waterloo Maple Inc.
| Type ? for help.
> CUDA:-IsEnabled();
false
> CUDA:-Enable(true);
false
> CUDA:-IsEnabled();
true
> CUDA:-HasDoubleSupport();
table([0 = true])
> with(LinearAlgebra):
> M:=RandomMatrix(8000,outputoptions=[datatype=float[4]]);
memory used=245.6MB, alloc=252.5MB, time=14.01
M :=
[46. , -45. , -87. , 53. , 30. , 10. , 55. , -85. , 63. , 16. , ...]
[12. , -20. , -46. , 92. , 49. , -12. , -36. , 76. , -97. , -15. , ...]
[-60. , 10. , 25. , -90. , -23. , 22. , 16. , -39. , 0. , 74. , ...]
[-52. , -99. , -32. , 48. , -19. , 58. , -34. , -39. , 62. , -16. , ...]
[13. , -48. , 45. , -68. , 99. , 43. , 34. , 45. , -35. , -22. , ...]
[-4. , -67. , 5. , -50. , -70. , 0. , -7. , -64. , 44. , -88. , ...]
[-33. , 12. , 83. , -63. , -69. , -31. , 23. , -61. , -49. , 58. , ...]
[3. , -67. , 40. , -76. , -37. , 98. , 5. , -49. , 72. , 4. , ...]
[-92. , 43. , 14. , 58. , 94. , -13. , -48. , -77. , 87. , 97. , ...]
[-50. , 1. , 11. , 16. , -55. , 1. , 78. , 40. , -36. , 80. , ...]
[: , : , : , : , : , : , : , : , : , : , "8000 x 8000 Matrix"]
> N:=RandomMatrix(8000,outputoptions=[datatype=float[4]]);
memory used=491.5MB, alloc=528.6MB, time=15.56
N :=
[5. , 96. , 19. , 92. , 64. , 87. , -71. , -98. , 52. , -80. , ...]
[3. , 1. , 93. , -75. , 87. , -50. , -2. , -99. , -49. , 95. , ...]
[-46. , 81. , 20. , 69. , -11. , -84. , 82. , -51. , 97. , 74. , ...]
[-24. , 59. , -41. , 86. , 23. , 65. , 52. , 52. , 61. , 64. , ...]
[65. , -69. , -57. , -67. , -19. , -80. , -79. , 70. , -44. , 57. , ...]
[98. , 38. , -81. , 81. , -7. , -97. , -54. , -79. , 97. , -45. , ...]
[-60. , -2. , 60. , 21. , 36. , -71. , -28. , -15. , 87. , 56. , ...]
[-57. , -53. , 93. , 78. , 97. , -50. , -98. , -24. , 91. , -69. , ...]
[-14. , -95. , -95. , -95. , -80. , 42. , -76. , 15. , 94. , -24. , ...]
[84. , -83. , -30. , -22. , -65. , -90. , -55. , -75. , 38. , 68. , ...]
[: , : , : , : , : , : , : , : , : , : , "8000 x 8000 Matrix"]
> time[real](MatrixMatrixMultiply(M,N));
memory used=980.3MB, alloc=1016.9MB, time=15.68
memory used=1468.5MB, alloc=1505.2MB, time=15.80
memory used=1956.8MB, alloc=1993.5MB, time=15.92
5.797
> CUDA:-Enable(false);
true
> CUDA:-IsEnabled();
false
> time[real](MatrixMatrixMultiply(M,N));
2.319
> CUDA:-Enable(true);
false
> CUDA:-IsEnabled();
true
> M:=RandomMatrix(8000,outputoptions=[datatype=float[8]]);
memory used=3910.1MB, alloc=1505.2MB, time=34.18
M :=
[85. , -81. , -28. , 71. , -28. , -9. , 11. , 86. , 6. , 65. , ...]
[25. , -65. , -90. , -21. , -76. , -41. , 54. , -57. , 59. , 63. , ...]
[26. , 19. , -46. , -70. , -27. , 87. , -3. , -10. , -40. , -5. , ...]
[-39. , -15. , 15. , 89. , -46. , 59. , 89. , 82. , -8. , 78. , ...]
[88. , 80. , -99. , 95. , 87. , 89. , -92. , -69. , 3. , 42. , ...]
[-25. , 48. , 87. , -28. , -61. , -97. , 53. , 68. , -71. , 17. , ...]
[14. , 82. , 59. , -77. , 57. , -94. , 71. , 58. , -20. , -5. , ...]
[-65. , -74. , -72. , 64. , -37. , 69. , -56. , -34. , -96. , -30. , ...]
[-28. , -30. , -18. , -75. , 93. , 91. , -90. , 28. , -81. , 57. , ...]
[1. , 10. , -79. , -66. , 56. , 69. , -71. , -9. , -61. , 70. , ...]
[: , : , : , : , : , : , : , : , : , : , "8000 x 8000 Matrix"]
> N:=RandomMatrix(8000,outputoptions=[datatype=float[8]]);
N :=
[-10. , -65. , 36. , -25. , -51. , 11. , 40. , 66. , -28. , -85. , ...]
[94. , 27. , 86. , -87. , 17. , -66. , 66. , -51. , -83. , 14. , ...]
[-41. , -64. , 28. , 79. , 44. , 70. , -45. , 19. , -45. , 10. , ...]
[-22. , 78. , -64. , 22. , 50. , 40. , 48. , 33. , 74. , 33. , ...]
[14. , 91. , -66. , -72. , 50. , -38. , -27. , -53. , 89. , -77. , ...]
[-75. , 17. , 12. , 48. , -92. , -31. , 16. , -20. , -91. , 39. , ...]
[16. , 55. , -2. , 65. , 74. , -52. , -73. , 3. , -46. , 19. , ...]
[-35. , 32. , 89. , 58. , 27. , 69. , 57. , -76. , 93. , -71. , ...]
[-17. , -49. , 47. , 39. , 25. , 19. , 45. , 99. , -74. , 7. , ...]
[-42. , -36. , -98. , -35. , 99. , -13. , -49. , 5. , -96. , -45. , ...]
[: , : , : , : , : , : , : , : , : , : , "8000 x 8000 Matrix"]
> time[real](MatrixMatrixMultiply(M,N));
5.555
> CUDA:-Enable(false);
true
> CUDA:-IsEnabled();
false
> time[real](MatrixMatrixMultiply(M,N));
2.090
> CUDA:-Properties();
[table(["Max Threads Dimensions" = [1024, 1024, 64], "Clock Rate" = 1200000, "Max Threads Per Block" = 1024, "Device Overlap" = 1, "Name" = "NVIDIA RTX A2000", "Resisters Per Block" = 65536,
"Total Constant Memory" = 65536, "Memory Pitch" = 2147483647, "Max Grid Size" = [2147483647, 65535, 65535], "Kernel Exec Timeout Enabled" = true, "ID" = 0, "Shared Memory Per Block" = 49152, "Texture Alignment" = 512,
"Warp Size" = 32, "MultiProcessor Count" = 26, "Total Global Memory" = 4294967295, "Major" = 8,
"Minor" = 6
])]
> quit
memory used=5375.8MB, alloc=2970.0MB, time=51.46