<div dir="auto">OpenMP links a libomptarget.so into the host executable which goes looking for offloading toolchains to dlopen.<div dir="auto"><br></div><div dir="auto">This is very flexible, but comes at a price:</div><div dir="auto">- PLT call overhead + inlining barrier</div><div dir="auto">- Startup overhead looking for the toolchain</div><div dir="auto"><span style="font-family:sans-serif">- Failing to dlopen will run the host fallback, which is not necessarily what one wants for debugging</span><br></div><div dir="auto"><span style="font-family:sans-serif"><br></span></div><div dir="auto"><font face="sans-serif">For device toolchains that are available as static libraries, and for deployment of the toolchain to a system with known, fixed hardware (e.g. some hpc clusters), I'd like to be able to statically link everything. Faster and fewer failure modes.</font></div><div dir="auto"><font face="sans-serif"><br></font></div><div dir="auto"><font face="sans-serif">Particularly fun for amdgcn, because we'll be able to statically link the userspace graphics driver into the host executable as well. No shared libraries necessary.</font></div><div dir="auto"><font face="sans-serif"><br></font></div><div dir="auto"><font face="sans-serif">Involves a change to libomptarget (that I haven't written yet) to fill in function pointers without dlopen, and some cmake logic/controls to specify which toolchains are dynamic/static/unavailable. Plus building libomptarget.a if that isn't yet implemented.</font></div><div dir="auto"><font face="sans-serif"><br></font></div><div dir="auto"><font face="sans-serif">Are patches for this nominally welcome?</font></div><div dir="auto"><font face="sans-serif"><br></font></div><div dir="auto"><font face="sans-serif">Thanks</font></div><div dir="auto"><font face="sans-serif"><br></font></div><div dir="auto"><font face="sans-serif">Jon</font></div><div dir="auto"><font face="sans-serif"><br></font></div><div dir="auto"><br></div><div dir="auto"><br></div></div>