From b70409f3ada62bfa08c4e287bba21fd5baddbcc1 Mon Sep 17 00:00:00 2001 From: pensun Date: Thu, 13 Oct 2016 10:57:31 -0500 Subject: [PATCH] Add ifdef guard for the feature requires ROCm1.3 Change-Id: I7154517c47000c37fe5eb09a3c1cf2a9aacbe27c --- src/hip_hcc.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/hip_hcc.cpp b/src/hip_hcc.cpp index f6d3024b69..5c4657d6f0 100644 --- a/src/hip_hcc.cpp +++ b/src/hip_hcc.cpp @@ -67,6 +67,7 @@ int HIP_VISIBLE_DEVICES = 0; /* Contains a comma-separated sequence of GPU ident int HIP_NUM_KERNELS_INFLIGHT = 128; int HIP_BLOCKING_SYNC = 0; +#define HIP_USE_PRODUCET_NAME 0 //#define DISABLE_COPY_EXT 1 @@ -101,7 +102,7 @@ size_t g_malloc_heap_size = SIZE_OF_HEAP; __attribute__((address_space(1))) char gpuHeap[SIZE_OF_HEAP]; __attribute__((address_space(1))) uint32_t gpuFlags[NUM_PAGES]; -__device__ void *__hip_hc_malloc(size_t size) +__device__ void *__hip_hc_malloc(size_t size) { char *heap = (char*)gpuHeap; if(size > SIZE_OF_HEAP) @@ -662,7 +663,11 @@ hipError_t ihipDevice_t::initProperties(hipDeviceProp_t* prop) prop->isMultiGpuBoard = 0 ? gpuAgentsCount < 2 : 1; // Get agent name +#ifdef HIP_USE_PRODUCET_NAME err = hsa_agent_get_info(_hsaAgent, (hsa_agent_info_t)HSA_AMD_AGENT_INFO_PRODUCT_NAME, &(prop->name)); +#else + err = hsa_agent_get_info(_hsaAgent, HSA_AGENT_INFO_NAME, &(prop->name)); +#endif DeviceErrorCheck(err); // Get agent node