joo: I take it that if we want to pass a two-dimensional/multidimensional array with data to the GPU, we can use the data representation as a structure and pass the structure?
I tried it through a structure - it worked! I never would have guessed to pass multidimensional arrays this way myself :) Thanks!
I have attached small example, using two-dimensional arrays - it works just fine. The example is a little crooked - but in general it demonstrates the possibility of such a perversion quite well :)
PS: Your UGA + OpenCL - it's just no emotions :) How we used to live - it's creepy to remember...
MetaDriver: Stats on the board. For all devices. :)
CL_USE_ANY
2012.04.12 23:27:29 Struct_OpenCL (GBPUSD,H1) Difference in calculation between GPY and CPY: 0.0 2012.04.12 23:27:28 Struct_OpenCL (GBPUSD,H1) CPY/GPU= 1.326 2012.04.12 23:27:28 Struct_OpenCL (GBPUSD,H1) GPU time = 141 ms
2012.04.12 23:27:28 Struct_OpenCL (GBPUSD,H1) SPU time = 187 ms
CL_USE_GPU_ONLY
2012.04.12 23:29:11 Struct_OpenCL (GBPUSD,H1) Difference in calculation between GPY and CPY: 0.0 2012.04.12 23:29:11 Struct_OpenCL (GBPUSD,H1) CPY/GPU= 1.376 2012.04.12 23:29:11 Struct_OpenCL (GBPUSD,H1) GPU time = 125 ms
2012.04.12 23:29:11 Struct_OpenCL (GBPUSD,H1) SPU Time = 172 ms
1
2012.04.12 23:30:12 Struct_OpenCL (GBPUSD,H1) Difference in calculation between GPY and CPY: 0.0 2012.04.12 23:30:12 Struct_OpenCL (GBPUSD,H1) CPY/GPU= 2.397 2012.04.12 23:30:12 Struct_OpenCL (GBPUSD,H1) GPU time = 78 ms
2012.04.12 23:30:12 Struct_OpenCL (GBPUSD,H1) SPU Time = 187 ms
I recommend everyone to try the same way as I did, it is quite possible that you will find a faster device than the helpless discrete graphics. :D
PS. I suspect that CL_USE_ANY and CL_USE_GPU_ONLY are the same - calculation on CPU, but device 1 is my GPU. It's an elementary confusion in the standard constants.
I recommend everyone to mess around with it like I did, you'll probably find a faster device than the useless discrete graphics. :D
PS. I suspect that CL_USE_ANY and CL_USE_GPU_ONLY are the same thing - it's a CPU calculation, but device 1 is my GPU. It's an elementary confusion in the standard constants.
Here's what I read! It wasn't in the terminal's help! Tweaked the code to reflect these changes. See what you get. I've got it like this:
23:17:00 SPU time = 1155 ms 23:17:01 Total OpenCL enabled devices: 2 23:17:02 GPU Time #0 = 249 ms 23:17:02 CPY/GPU #0 = 4.639 23:17:03 GPU #1 Time = 265 ms 23:17:03 CPY/GPU #1= 4.358
GPU: Advanced Micro Devices, Inc. Turks with OpenCL 1.1 (6 units, 725 MHz, 1024 Mb, version CAL 1.4.1703 (VM)) CPU: GenuineIntel Intel(R) Core(TM) i3-2310M CPU @ 2.10GHz with OpenCL 1.1 (4 units, 2095 MHz, 5990 Mb, version 2.0)
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
I take it that if we want to pass a two-dimensional/multidimensional array with data to the GPU, we can use the data representation as a structure and pass the structure?
I tried it through a structure - it worked! I never would have guessed to pass multidimensional arrays this way myself :) Thanks!
I have attached small example, using two-dimensional arrays - it works just fine. The example is a little crooked - but in general it demonstrates the possibility of such a perversion quite well :)
PS: Your UGA + OpenCL - it's just no emotions :) How we used to live - it's creepy to remember...
PS: Your UGA + OpenCL is just no emotion at all. :) How we used to live is eerie to remember...
CL_DEVICE_ANY and CL_DEVICE_GPU obsolete?
Are CL_USE_ANY and CL_USE_GPU_ONLY relevant now?
CL_DEVICE_ANY and CL_DEVICE_GPU obsolete?
Are CL_USE_ANY and CL_USE_GPU_ONLY relevant now?
Yes.
Discovered by Prof. Tychkov's method a mysterious device 1 in my computer, which is faster than CL_USE_ANY and even faster than CL_USE_GPU_ONLY.
What is it? :O
Found a mysterious device 1 in my computer, using Professor Tychkov's method, that runs faster than CL_USE_ANY and even faster than CL_USE_GPU_ONLY.
What is it? :O
Stats on the board. For all devices. :)
CL_USE_ANY2012.04.12 23:27:29 Struct_OpenCL (GBPUSD,H1) Difference in calculation between GPY and CPY: 0.0
2012.04.12 23:27:28 Struct_OpenCL (GBPUSD,H1) CPY/GPU= 1.326
2012.04.12 23:27:28 Struct_OpenCL (GBPUSD,H1) GPU time = 141 ms
2012.04.12 23:27:28 Struct_OpenCL (GBPUSD,H1) SPU time = 187 ms
CL_USE_GPU_ONLY2012.04.12 23:29:11 Struct_OpenCL (GBPUSD,H1) Difference in calculation between GPY and CPY: 0.0
2012.04.12 23:29:11 Struct_OpenCL (GBPUSD,H1) CPY/GPU= 1.376
2012.04.12 23:29:11 Struct_OpenCL (GBPUSD,H1) GPU time = 125 ms
2012.04.12 23:29:11 Struct_OpenCL (GBPUSD,H1) SPU Time = 172 ms
12012.04.12 23:30:12 Struct_OpenCL (GBPUSD,H1) Difference in calculation between GPY and CPY: 0.0
2012.04.12 23:30:12 Struct_OpenCL (GBPUSD,H1) CPY/GPU= 2.397
2012.04.12 23:30:12 Struct_OpenCL (GBPUSD,H1) GPU time = 78 ms
2012.04.12 23:30:12 Struct_OpenCL (GBPUSD,H1) SPU Time = 187 ms
I recommend everyone to try the same way as I did, it is quite possible that you will find a faster device than the helpless discrete graphics. :D
PS. I suspect that CL_USE_ANY and CL_USE_GPU_ONLY are the same - calculation on CPU, but device 1 is my GPU. It's an elementary confusion in the standard constants.
I recommend everyone to mess around with it like I did, you'll probably find a faster device than the useless discrete graphics. :D
PS. I suspect that CL_USE_ANY and CL_USE_GPU_ONLY are the same thing - it's a CPU calculation, but device 1 is my GPU. It's an elementary confusion in the standard constants.
Here's what I read! It wasn't in the terminal's help! Tweaked the code to reflect these changes. See what you get. I've got it like this:
23:17:00 SPU time = 1155 ms
23:17:01 Total OpenCL enabled devices: 2
23:17:02 GPU Time #0 = 249 ms
23:17:02 CPY/GPU #0 = 4.639
23:17:03 GPU #1 Time = 265 ms
23:17:03 CPY/GPU #1= 4.358
CPU: GenuineIntel Intel(R) Core(TM) i3-2310M CPU @ 2.10GHz with OpenCL 1.1 (4 units, 2095 MHz, 5990 Mb, version 2.0)
Try using this structure, it didn't work for me (I suspect the second dimension has to be a fixed size, that's why it didn't work for me):
And, for convenience, a function like this to resize both dimensions: