Forum Discussion
parallel_for very slow in dpc++
I am using visual studio 2022 that runs oneAPI dpc++ compiler, and trying to make emulation on an FPGA, but I don't know how to find the details of the FPGA emulator like what frequency it is running on. The full code is: https://ideone.com/iEHQHa
I have tried to use Jupyter notebook, and it gives faster results for both, yet the program runs on CPU (iterative code) for 8 seconds while on FPGA (kernel code using FPGA emulation) takes 30 seconds.
Hello amaltha,
When compiling for emulation your program is going to run 100% on the CPU.
It is compiled just like if you were using any SYCL compiler (that don't target FPGAs).
So FPGA specific information such as the device name or the target frequency don't really matter.
The performance that you get from this program is not at all representative of the performance you will get when compiling for FPGAs.
When writing a code that will run on an FPGA, the optimizations that you make are different that the ones you make when targetting a CPU.
Therefore, the optimizations that you wrote for accelerating your program on an FPGA may very well have worse performance when compiled for emulation than your original program.
In this case it is hard to understand what you are comparing to what because you mention that you compared the parallel_for loop to a "CPU" execution, but from my understanding all the programs you launched ran on a CPU.
- amaltaha4 years ago
Occasional Contributor
I have one more question, how can I know the details and specifications of the hardware FPGA I am using? Like the frequency.
Thank you a lot yuguen.