ProjectPhysX / FluidX3D

The fastest and most memory efficient lattice Boltzmann CFD software, running on all GPUs via OpenCL. Free for non-commercial use.
https://youtube.com/@ProjectPhysX
Other
3.48k stars 281 forks source link

Intel OpenCL CPU Runtime Usage #148

Closed wjsjtu123 closed 4 months ago

wjsjtu123 commented 4 months ago

After installing the Intel OpenCL CPU Runtime, how do I use it so that I can do the computation on the CPU?

ProjectPhysX commented 4 months ago

Hi @wjsjtu123,

once the Intel OpenCL CPU Runtime is installed, when you start FluidX3D, the CPU should appear as OpenCL device, like so:

 |----------------.------------------------------------------------------------|
 | Device ID    0 | Intel(R) Arc(TM) A750 Graphics                             |
 | Device ID    1 | Intel(R) UHD Graphics 630                                  |
+| Device ID    2 | Intel(R) Core(TM) i7-8700K CPU @ 3.70GHz                   |
 |----------------'------------------------------------------------------------|

By default, the (fastest) dedicated GPU will be selected, here device 0. To select the CPU (here device 2) manually:

On Windows:

On Linux

You should then see that it's running on the CPU:

 |----------------.------------------------------------------------------------|
+| Device ID      | 2                                                          |
+| Device Name    | Intel(R) Core(TM) i7-8700K CPU @ 3.70GHz                   |
+| Device Vendor  | Intel(R) Corporation                                       |
+| Device Driver  | 2023.16.6.0.28_042959 (Windows)                            |
+| OpenCL Version | OpenCL C 3.0                                               |
+| Compute Units  | 12 at 3700 MHz (6 cores, 0.710 TFLOPs/s)                   |
+| Memory, Cache  | 16250 MB, 256 KB global / 32 KB local                      |
+| Buffer Limits  | 8125 MB global, 128 KB constant                            |
 |----------------'------------------------------------------------------------|

Troubleshooting in case the CPU does not appear as OpenCL device when starting FluidX3D:

Kind regards, Moritz