diff --git a/bin/hipcc b/bin/hipcc index ee58ba535a..29163d7c02 100755 --- a/bin/hipcc +++ b/bin/hipcc @@ -168,7 +168,7 @@ if ($needHipHcc) { if ((not -e $object) or ((stat($source))[9] > (stat($object))[9])) { my $CMD = "$HCC $HCCFLAGS -I$HSA_PATH/include -I$HIP_PATH/include -Wall -c $source -o $object"; if ($verbose & 0x10) { - $CMD .= " -g -O2" ; + $CMD .= " -g -O0" ; } else { $CMD .= " -O3" ; } diff --git a/docs/markdown/hip_porting_guide.md b/docs/markdown/hip_porting_guide.md index 9f1c7c67bd..cb599a5c4a 100644 --- a/docs/markdown/hip_porting_guide.md +++ b/docs/markdown/hip_porting_guide.md @@ -290,7 +290,7 @@ hipcc adds the necessary libraries for HIP as well as for the accelerator compil ### -lm Option -hcc does not add “-lm” by default. If you see errors about missing math functions at link time (e.g., "sqrt@@GLIBC_2.2.5"), ensure that “-lm” is in the link options. +hipcc adds -lm by default to the link command. ## Linking Code With Other Compilers diff --git a/src/hip_hcc.cpp b/src/hip_hcc.cpp index c2b4d5ffe7..5ea2c88d56 100644 --- a/src/hip_hcc.cpp +++ b/src/hip_hcc.cpp @@ -792,7 +792,7 @@ hipError_t ihipDevice_t::getProperties(hipDeviceProp_t* prop) // Group memory will not be paged out, so, the physical memory size is the total shared memory size, and also equal to the group region size. prop->maxSharedMemoryPerMultiProcessor = prop->totalGlobalMem; -#ifdef USE_ROCR_V2 +#if USE_ROCR_V2 // Get Max memory clock frequency err = hsa_region_get_info(*am_region, (hsa_region_info_t)HSA_AMD_REGION_INFO_MAX_CLOCK_FREQUENCY, &prop->memoryClockRate); DeviceErrorCheck(err); @@ -1269,12 +1269,10 @@ hipError_t hipDeviceGetAttribute(int* pi, hipDeviceAttribute_t attr, int device) *pi = prop->regsPerBlock; break; case hipDeviceAttributeClockRate: *pi = prop->clockRate; break; -#ifdef USE_ROCR_V2 case hipDeviceAttributeMemoryClockRate: *pi = prop->memoryClockRate; break; case hipDeviceAttributeMemoryBusWidth: *pi = prop->memoryBusWidth; break; -#endif case hipDeviceAttributeMultiprocessorCount: *pi = prop->multiProcessorCount; break; case hipDeviceAttributeComputeMode: @@ -2309,6 +2307,7 @@ hipError_t hipMemcpy(void* dst, const void* src, size_t sizeBytes, hipMemcpyKind #endif /** * @result #hipSuccess, #hipErrorInvalidDevice, #hipErrorInvalidMemcpyDirection, #hipErrorInvalidValue + * @warning on HCC hipMemcpyAsync does not support overlapped H2D and D2H copies. */ //--- hipError_t hipMemcpyAsync(void* dst, const void* src, size_t sizeBytes, hipMemcpyKind kind, hipStream_t stream)