[PATCH] D49083: [HIP] Register/unregister device fat binary only once

Yaxun Liu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 10 09:58:45 PDT 2018


yaxunl added a comment.

In https://reviews.llvm.org/D49083#1157568, @tra wrote:

> > HIP generates one fat binary for all devices after linking. However, for each compilation
> >  unit a ctor function is emitted which register the same fat binary. 
> >  Measures need to be taken to make sure the fat binary is only registered once.
>
> Are you saying that for HIP there's only one fatbin file with GPU code for the complete host executable, even if it consists of multiple HIP TUs?


By 'TU' do you mean 'target unit'?

For HIP there is only one fatbin file with GPU code for the complete host executable even if there are mulitple GPU sub-targets. Device code for different sub-targets are bundled together by clang-offload-bundler as one fatbin. Runtime will extract device code for different sub-targets.


https://reviews.llvm.org/D49083





More information about the cfe-commits mailing list