Closed gaoyang-li closed 4 months ago
Hi @gaoyang-li , do you mean running in parallel on the CPU?
That program is valid, and you will run the sequential code on the CPU via the Java runtime. The @Parallel
annotation is only applied if you build a Task-Graph and a Tornado Execution Plan to run on an accelerator. You can use a multi-core CPU as an accelerator (E.g., using the Intel OpenCL runtime).
Hi @gaoyang-li , do you mean running in parallel on the CPU?
That program is valid, and you will run the sequential code on the CPU via the Java runtime. The
@Parallel
annotation is only applied if you build a Task-Graph and a Tornado Execution Plan to run on an accelerator. You can use a multi-core CPU as an accelerator (E.g., using the Intel OpenCL runtime).
Hi @jjfumero. Thanks for your reply.
Does "using the Intel OpenCL runtime" mean make BACKEND=opencl
? Does this ensure the whole program running on CPU only?
No. make BACKEND=opencl
links TornadoVM to use an OpenCL runtime when a Task Graph and Execution plan is present . Otherwise, you will run with the selected JDK using the default Java runtime. Does it make sense?
If you have installed the OpenCL CPU Runtime in your system, you can enable TornadoVM to use that runtime. But again, this only work if you program your application using Task-Graphs and Execution Plans. We design it this way to allow the Java runtime to have a complement for GPU/FPGA/CPU execution for data and task parallelism. For everything else, you will still use the default Java runtime.
No.
make BACKEND=opencl
links TornadoVM to use an OpenCL runtime when a Task Graph and Execution plan is present . Otherwise, you will run with the selected JDK using the default Java runtime. Does it make sense?If you have installed the OpenCL CPU Runtime in your system, you can enable TornadoVM to use that runtime. But again, this only work if you program your application using Task-Graphs and Execution Plans. We design it this way to allow the Java runtime to have a complement for GPU/FPGA/CPU execution for data and task parallelism. For everything else, you will still use the default Java runtime.
tornado --devices
Number of Tornado drivers: 1
Driver: OpenCL
Total number of OpenCL devices : 2
Tornado device=0:0 (DEFAULT)
OPENCL -- [NVIDIA CUDA] -- NVIDIA GeForce MX250
Global Memory Size: 2.0 GB
Local Memory Size: 48.0 KB
Workgroup Dimensions: 3
Total Number of Block Threads: [1024]
Max WorkGroup Configuration: [1024, 1024, 64]
Device OpenCL C version: OpenCL C 1.2
Tornado device=0:1
OPENCL -- [Intel(R) OpenCL HD Graphics] -- Intel(R) UHD Graphics 620 [0x3ea0]
Global Memory Size: 6.0 GB
Local Memory Size: 64.0 KB
Workgroup Dimensions: 3
Total Number of Block Threads: [256]
Max WorkGroup Configuration: [256, 256, 256]
Device OpenCL C version: OpenCL C 1.2
Currently I have two devices (discrete GPU and iGPU). So I have to install the OpenCL CPU Runtime to add one more device, am I right?
Yes, you can install for example, Intel oneAPI: https://www.intel.com/content/www/us/en/developer/tools/oneapi/toolkits.html#base-kit
Or only the OpenCL Runtime for CPUs: https://www.intel.com/content/www/us/en/developer/articles/technical/intel-cpu-runtime-for-opencl-applications-with-sycl-support.html
Yes, you can install for example, Intel oneAPI: https://www.intel.com/content/www/us/en/developer/tools/oneapi/toolkits.html#base-kit
Or only the OpenCL Runtime for CPUs: https://www.intel.com/content/www/us/en/developer/articles/technical/intel-cpu-runtime-for-opencl-applications-with-sycl-support.html
Thank you! @jjfumero
It seems this question was already answer. I will close the issue. Feel free to open new issues if you have more questions.
Hi, if I want to run the program on the host (CPU) only, can I just write the program like this:
Will the program run in parallel without heterogeneous computing (TaskGraph)? Thank you in advance.