SWDEV-280473 - Support HSAIL shared library build
This change makes HSAIL usage similar to that of Comgr. By default, the runtime will statically link against it, however if HSAIL_DYN_DLL is defined, then the runtime will try to dynamically load HSAIL. Currently stick to statically linking to HSAIL. In a feature patch the dynamic loading behaviour will be enabled. Change-Id: I6a78a4375975cf847f236b200404c8cf941d012b
This commit is contained in:
@@ -477,6 +477,18 @@ bool Device::ValidateComgr() {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Device::ValidateHsail() {
|
||||
#if defined(WITH_COMPILER_LIB)
|
||||
// Check if HSAIL compiler was requested
|
||||
if (!settings_->useLightning_) {
|
||||
std::call_once(amd::Hsail::initialized, amd::Hsail::LoadLib);
|
||||
// Use Hsail only if it's available
|
||||
return amd::Hsail::IsReady();
|
||||
}
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Device::create(const Isa &isa) {
|
||||
assert(!vaCacheAccess_ && !vaCacheMap_);
|
||||
isa_ = &isa;
|
||||
|
||||
مرجع در شماره جدید
Block a user