Features of the mql5 language, subtleties and tricks - page 322
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Perhaps using GPU (OpenCL) will give some results, but this is only in case there are multiple operations on one buffer or more complex calculations than just sum. For a single sum - GPU can be comparable or even slower due to transfer overhead.
For the sake of curiosity I generated the test code using OpenCL with AI assistant.
It is important to understand that this is the result on a very weak integrated laptop video card with Intel Iris Xe Graphics RAM.
If you put a video card for about 500 quid (e.g. NVIDIA RTX 4070), the GPU memory load speed will increase by 4-5 times and the computation speed by about 10 times compared to my card.
Expected results on RTX 4070
*PCIe 4.0 x16 = ~25 GB/s theoretical
**real through PCIe, not VRAM bandwidth
It will be interesting to see the result of this test for advanced graphics cards. If anyone has it, please show the result.
PS The second test of array loading into GPU is always faster because of the L3 cache where our array ends up. It is especially noticeable when the array size is smaller than the L3 cache size.
The best option is to have all the logic inside a C++ DLL
and include OMP there
https://learn.microsoft.com/ru-ru/cpp/parallel/openmp/reference/openmp-directives?view=msvc-170
https://stackoverflow.com/questions/27056090/how-to-parallelize-this-array-sum-using-openmp
For the sake of curiosity, I generated test code using OpenCL with AI assistant
Is the dialogue saved?
I get ERR_OPENCL_NOT_SUPPORTED.
Is the dialogue still intact?
I get ERR_OPENCL_NOT_SUPPORTED.
Do MT examples work? Maybe the drivers are not installed.
I have such a problem:
Forum on trading, automated trading systems and testing trading strategies
OpenCL in trading
Rorschach, 2024.11.13 20:37
I installed AMD APP SDK 3.0, the terminal writes opencl.dll not found, please install OpenCL drivers. Processors are no longer supported? Third-party software sees and works.loss of auto-vectorisation (does not recognise pattern)
This is the problem https://www.mql5.com/ru/forum/495741/page2#comment_58102015
Do the MT examples work? Maybe the drivers are not installed.
I don't know where to look.
You can download a free utility Geeks3D GPU Caps Viewer and see your video card and whether it supports OpenCL. And then manually download and install drivers.
OpenCL drivers are automatically installed on fresh hardware. Perhaps GPU hardware is old.
You can download a free utility Geeks3D GPU Caps Viewer and see your video card and whether it supports OpenCL. And then manually download and install drivers.
just for the record: to use graphics for calculations and CPU for rendering (and Blend2d is pure CPU) is to some extent a mega solution :-) With all sympathy to Blend, honestly thought that there will be a move to Skia, it is more hardware dense.
modern way
Of course, the performance of calculations on a GPU card (NVIDIA GeForce RTX 3060), even at a cost of ~300 USD, compared to a CPU, is impressive. More than 1000 times. 0.017 nanoseconds per computational iteration sum += (long)(sin(x) * cos(x) * 1000.0f);
It is even hard to imagine the result on NVidia GPU cluster costing ~30000USD, the sale of which is strictly quoted by the US government and for which many countries of the world, especially China, are hunting.
Recently Kazakhstan got a handful of such clusters. And, as far as I understand, that's why Pavel Durov came to Kazakhstan and met with President Tokayev.
It's gotten to the point that in the world one company NVidia determines the strategic security of states.
PS. We should make sure that there is no optimisation due to caching of the last calculations, as we have a very primitive array [1,2,3....100,1,2,....100,1,2............100]
please insert this line into line 117:
and double-check the result to make sure that caching has nothing to do with it.
I just had to mention: using graphics for calculations and CPU for rendering (and Blend2d is pure CPU) is to some extent a mega solution :-) With all the sympathy for Blend, honestly I thought that there will be a move to Skia, it is more hardware dense.
modern way
Yes, I agree. Still cloud providers are starting to actively populate GPU solutions into their infrastructure. Mainly for LLM.
I already have experience installing and using local LLM LLAMA 3.1 and understand how important a powerful GPU is. For such an LLM, you will have to shell out 3000 USD for a GPU to run comfortably. CPUs do not pull at all