Fix Api table copy operation and tools version checking.
Change-Id: Ia76d16f3ea6d0abb931813f90bc3bc2119da5999
[ROCm/ROCR-Runtime commit: 505d722b7d]
This commit is contained in:
@@ -1011,9 +1011,13 @@ void Runtime::LoadExtensions() {
|
||||
|
||||
// Update Hsa Api Table with handle of Image extension Apis
|
||||
extensions_.LoadFinalizer(kFinalizerLib[os_index(os::current_os)]);
|
||||
hsa_api_table_.LinkExts(&extensions_.finalizer_api,
|
||||
core::HsaApiTable::HSA_EXT_FINALIZER_API_TABLE_ID);
|
||||
|
||||
// Update Hsa Api Table with handle of Finalizer extension Apis
|
||||
extensions_.LoadImage(kImageLib[os_index(os::current_os)]);
|
||||
hsa_api_table_.LinkExts(&extensions_.image_api,
|
||||
core::HsaApiTable::HSA_EXT_IMAGE_API_TABLE_ID);
|
||||
}
|
||||
|
||||
void Runtime::UnloadExtensions() { extensions_.Unload(); }
|
||||
@@ -1074,12 +1078,6 @@ void Runtime::LoadTools() {
|
||||
typedef Agent* (*tool_wrap_t)(Agent*);
|
||||
typedef void (*tool_add_t)(Runtime*);
|
||||
|
||||
// Link HSA Extensions for Finalizer and Images for Api interception
|
||||
hsa_api_table_.LinkExts(&extensions_.finalizer_api,
|
||||
core::HsaApiTable::HSA_EXT_FINALIZER_API_TABLE_ID);
|
||||
hsa_api_table_.LinkExts(&extensions_.image_api,
|
||||
core::HsaApiTable::HSA_EXT_IMAGE_API_TABLE_ID);
|
||||
|
||||
// Load tool libs
|
||||
std::string tool_names = flag_.tools_lib_names();
|
||||
if (tool_names != "") {
|
||||
|
||||
@@ -92,6 +92,17 @@ static __forceinline unsigned long long int strtoull(const char* str,
|
||||
#define PASTE2(x, y) x##y
|
||||
#define PASTE(x, y) PASTE2(x, y)
|
||||
|
||||
#ifdef NDEBUG
|
||||
#define debug_warning(exp)
|
||||
#else
|
||||
#define debug_warning(exp) \
|
||||
do { \
|
||||
if (!(exp)) \
|
||||
fprintf(stderr, "Warning: " STRING(exp) " in %s, " __FILE__ ":" STRING(__LINE__) "\n", \
|
||||
__PRETTY_FUNCTION__); \
|
||||
} while (false);
|
||||
#endif
|
||||
|
||||
// A macro to disallow the copy and move constructor and operator= functions
|
||||
// This should be used in the private: declarations for a class
|
||||
#define DISALLOW_COPY_AND_ASSIGN(TypeName) \
|
||||
|
||||
Reference in New Issue
Block a user