SWDEV-463865 - namespace changes to prevent symbol conflicts in static builds
Change-Id: I09ceb5962b7aa19156909f47167c87d6887c9cd1
[ROCm/clr commit: 3edf1501cc]
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
@@ -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_;
|
||||
|
||||
@@ -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()); \
|
||||
|
||||
Reference in New Issue
Block a user