Add ifdef guard for the feature requires ROCm1.3

Change-Id: I7154517c47000c37fe5eb09a3c1cf2a9aacbe27c
This commit is contained in:
pensun
2016-10-13 10:57:31 -05:00
parent 237837d9bd
commit b70409f3ad
+6 -1
Vedi File
@@ -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