SWDEV-463865 - namespace changes to prevent symbol conflicts in static builds

Change-Id: I09ceb5962b7aa19156909f47167c87d6887c9cd1


[ROCm/clr commit: 3edf1501cc]
This commit is contained in:
Ioannis Assiouras
2024-06-07 15:02:50 +01:00
parent 09defbc48f
commit af089a2171
13 changed files with 38 additions and 36 deletions
-7
View File
@@ -31,10 +31,3 @@
cl_icd_dispatch amd::ICDDispatchedObject::icdVendorDispatch_[] = {0};
amd::PlatformIDS amd::PlatformID::Platform = {amd::ICDDispatchedObject::icdVendorDispatch_};
RUNTIME_ENTRY(cl_int, clGetDeviceIDs,
(cl_platform_id platform, cl_device_type device_type, cl_uint num_entries,
cl_device_id* devices, cl_uint* num_devices)) {
return CL_SUCCESS;
}
RUNTIME_EXIT
+1 -1
View File
@@ -22,5 +22,5 @@
#include <hip/hip_runtime_api.h>
extern "C" const char* hipGetCmdName(unsigned op) {
return getOclCommandKindString(static_cast<cl_command_type>(op));
return amd::activity_prof::getOclCommandKindString(static_cast<cl_command_type>(op));
}
+1 -1
View File
@@ -25,9 +25,9 @@
#include "utils/flags.hpp"
#include "utils/versions.hpp"
namespace hip {
std::once_flag g_ihipInitialized;
namespace hip {
std::vector<hip::Device*> g_devices;
thread_local TlsAggregator tls;
amd::Context* host_context = nullptr;
@@ -25,6 +25,7 @@
case X: \
case_string = #C; \
break;
namespace {
const char* GetGraphNodeTypeString(uint32_t op) {
const char* case_string;
switch (static_cast<hipGraphNodeType>(op)) {
@@ -47,6 +48,7 @@ const char* GetGraphNodeTypeString(uint32_t op) {
};
return case_string;
};
}
namespace hip {
std::unordered_map<GraphExec*, std::pair<hip::Stream*, bool>> GraphExecStatus_;
+5 -5
View File
@@ -51,9 +51,9 @@
/*! IHIP IPC MEMORY Structure */
#define IHIP_IPC_MEM_HANDLE_SIZE 32
#define IHIP_IPC_MEM_RESERVED_SIZE LP64_SWITCH(20,12)
extern std::once_flag g_ihipInitialized;
namespace hip{
extern std::once_flag g_ihipInitialized;
}
typedef struct hipArray {
void* data; // FIXME: generalize this
struct hipChannelFormatDesc desc;
@@ -99,7 +99,7 @@ const char* ihipGetErrorName(hipError_t hip_error);
#define HIP_INIT(noReturn) \
{ \
bool status = true; \
std::call_once(g_ihipInitialized, hip::init, &status); \
std::call_once(hip::g_ihipInitialized, hip::init, &status); \
if (!status && !noReturn) { \
HIP_RETURN(hipErrorInvalidDevice); \
} \
@@ -112,7 +112,7 @@ const char* ihipGetErrorName(hipError_t hip_error);
#define HIP_INIT_VOID() \
{ \
bool status = true; \
std::call_once(g_ihipInitialized, hip::init, &status); \
std::call_once(hip::g_ihipInitialized, hip::init, &status); \
if (hip::tls.device_ == nullptr && hip::g_devices.size() > 0) { \
hip::tls.device_ = hip::g_devices[0]; \
amd::Os::setPreferredNumaNode(hip::g_devices[0]->devices()[0]->getPreferredNumaNode()); \