Software Archive
Read-only legacy content
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

offload step

xiang_x_
Beginner
371 Views

hi,

     Everyone. I have a question on  the #pragma offload approach. I have read the paper "Offload Compiler Runtime for the Intel® Xeon Phi™ Coprocessor" from the website http://software.intel.com/en-us/articles/offload-runtime-for-the-intelr-xeon-phitm-coprocessor. There is a description of offload like this: "At appropriate times, code that is embedded in the host-side binary is extracted, moved and invoked, and memory management is begun.".

      What does the "At appropriate times mean?"  That is, how  does the system or runtime know when to extract, move and invoke the binary for MIC?

     Looking forward to your help, thanks!

0 Kudos
1 Reply
Kevin_D_Intel
Employee
371 Views

When using offload, the host executable is built to enable offload execution and linked to the offload run-time. There is some target initialization (extraction of the binary and loading on each target when available) that takes place upon reaching the first point of an offload (i.e. #pragma offload) during execution of the host executable. There is some user control of the point of initialization via the OFFLOAD_INIT environment variable. So in terms of the initialization, “At appropriate times” means the first point of offload reached. In terms of invocation of designated block of offload code and possible memory management, “At appropriate times” means at each point of an offload reached during execution of the host executable. This is all managed by the offload run-time.

0 Kudos
Reply