Reputation: 320
I want to use OpenACC for parallelization of multi-core CPU. I know that it is possible to use CPU as host and GPU as device for execution of target region, But I want to set CPU cores(or two separate CPU) for host and target device simultaneously. Can I do this with OpenACC?
Upvotes: 1
Views: 1269
Reputation: 356
If using GCC, it's not yet possible (but certainly can be implemented); see https://stackoverflow.com/a/61227622/664214.
Upvotes: 1
Reputation: 5646
Yes. The target device of OpenACC can be multicore CPU. If using PGI, use the flag -ta=multicore
to target the CPU. By default, the runtime will use all the cores available on the system. If you want to limit the number of cores to use, set the environment variable ACC_NUM_CORES=N
.
Upvotes: 4