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:
Vladislav Sytchenko
2021-04-13 11:36:32 -04:00
والد 759cf19600
کامیت c7b50bb890
19فایلهای تغییر یافته به همراه662 افزوده شده و 214 حذف شده
+12
مشاهده پرونده
@@ -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;