diff --git a/hipamd/include/hip/hcc.h b/hipamd/include/hip/hcc.h index 1542d5b4f2..dba26aeab3 100644 --- a/hipamd/include/hip/hcc.h +++ b/hipamd/include/hip/hcc.h @@ -20,8 +20,8 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#ifndef HCC_H -#define HCC_H +#ifndef HIP_HCC_H +#define HIP_HCC_H #if defined(__HIP_PLATFORM_HCC__) && !defined (__HIP_PLATFORM_NVCC__) #include "hip/hcc_detail/hcc_acc.h" diff --git a/hipamd/include/hip/hcc_detail/hip_runtime_api.h b/hipamd/include/hip/hcc_detail/hip_runtime_api.h index 65bec1ff1d..7d3e1f78bd 100644 --- a/hipamd/include/hip/hcc_detail/hip_runtime_api.h +++ b/hipamd/include/hip/hcc_detail/hip_runtime_api.h @@ -321,7 +321,7 @@ hipError_t hipGetDeviceProperties(hipDeviceProp_t* prop, int deviceId); * Note: AMD devices and recent Nvidia GPUS do not support reconfigurable cache. This hint is ignored on those architectures. * */ -hipError_t hipDeviceSetCacheConfig ( hipFuncCache cacheConfig ); +hipError_t hipDeviceSetCacheConfig ( hipFuncCache_t cacheConfig ); /** @@ -333,7 +333,7 @@ hipError_t hipDeviceSetCacheConfig ( hipFuncCache cacheConfig ); * Note: AMD devices and recent Nvidia GPUS do not support reconfigurable cache. This hint is ignored on those architectures. * */ -hipError_t hipDeviceGetCacheConfig ( hipFuncCache *cacheConfig ); +hipError_t hipDeviceGetCacheConfig ( hipFuncCache_t *cacheConfig ); /** * @brief Get Resource limits of current device @@ -357,7 +357,7 @@ hipError_t hipDeviceGetLimit(size_t *pValue, hipLimit_t limit); * Note: AMD devices and recent Nvidia GPUS do not support reconfigurable cache. This hint is ignored on those architectures. * */ -hipError_t hipFuncSetCacheConfig ( hipFuncCache config ); +hipError_t hipFuncSetCacheConfig ( hipFuncCache_t config ); /** * @brief Returns bank width of shared memory for current device @@ -1460,7 +1460,7 @@ hipError_t hipCtxGetApiVersion (hipCtx_t ctx,int *apiVersion); * * @see hipCtxCreate, hipCtxDestroy, hipCtxGetFlags, hipCtxPopCurrent, hipCtxGetCurrent, hipCtxSetCurrent, hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxSynchronize, hipCtxGetDevice */ -hipError_t hipCtxGetCacheConfig ( hipFuncCache *cacheConfig ); +hipError_t hipCtxGetCacheConfig ( hipFuncCache_t *cacheConfig ); /** * @brief Set L1/Shared cache partition. @@ -1473,7 +1473,7 @@ hipError_t hipCtxGetCacheConfig ( hipFuncCache *cacheConfig ); * * @see hipCtxCreate, hipCtxDestroy, hipCtxGetFlags, hipCtxPopCurrent, hipCtxGetCurrent, hipCtxSetCurrent, hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxSynchronize, hipCtxGetDevice */ -hipError_t hipCtxSetCacheConfig ( hipFuncCache cacheConfig ); +hipError_t hipCtxSetCacheConfig ( hipFuncCache_t cacheConfig ); /** * @brief Set Shared memory bank configuration. diff --git a/hipamd/include/hip/hcc_detail/hip_texture.h b/hipamd/include/hip/hcc_detail/hip_texture.h index 7bd14c7a40..fe13f11e49 100644 --- a/hipamd/include/hip/hcc_detail/hip_texture.h +++ b/hipamd/include/hip/hcc_detail/hip_texture.h @@ -22,8 +22,8 @@ THE SOFTWARE. //#pragma once -#ifndef HIP_TEXTURE_H -#define HIP_TEXTURE_H +#ifndef HIP_HCC_DETAIL_TEXTURE_H +#define HIP_HCC_DETAIL_TEXTURE_H /** * @file hcc_detail/hip_texture.h @@ -32,7 +32,7 @@ THE SOFTWARE. #include -#include +//#include //---- //Texture - TODO - likely need to move this to a separate file only included with kernel compilation. @@ -84,7 +84,7 @@ struct texture : public textureReference { }; #endif -typedef struct hipArray { +typedef struct { unsigned int width; unsigned int height; hipChannelFormatKind f; diff --git a/hipamd/include/hip/hip_texture.h b/hipamd/include/hip/hip_texture.h index 53a11d7d45..da30566500 100644 --- a/hipamd/include/hip/hip_texture.h +++ b/hipamd/include/hip/hip_texture.h @@ -22,13 +22,15 @@ THE SOFTWARE. -#ifndef HIP_TEXTURE_H -#define HIP_TEXTURE_H +#ifndef HIP_HIP_TEXTURE_H +#define HIP_HIP_TEXTURE_H #if defined(__HIP_PLATFORM_HCC__) && !defined (__HIP_PLATFORM_NVCC__) #include +#warning "Including hcc" #elif defined(__HIP_PLATFORM_NVCC__) && !defined (__HIP_PLATFORM_HCC__) #include +#warning "Including Nvcc" #else #error("Must define exactly one of __HIP_PLATFORM_HCC__ or __HIP_PLATFORM_NVCC__"); #endif diff --git a/hipamd/src/hip_context.cpp b/hipamd/src/hip_context.cpp index a72ae9b58d..8a2451671c 100644 --- a/hipamd/src/hip_context.cpp +++ b/hipamd/src/hip_context.cpp @@ -217,7 +217,7 @@ hipError_t hipCtxGetApiVersion (hipCtx_t ctx,int *apiVersion) return ihipLogStatus(hipSuccess); } -hipError_t hipCtxGetCacheConfig ( hipFuncCache *cacheConfig ) +hipError_t hipCtxGetCacheConfig ( hipFuncCache_t *cacheConfig ) { HIP_INIT_API(cacheConfig); @@ -226,7 +226,7 @@ hipError_t hipCtxGetCacheConfig ( hipFuncCache *cacheConfig ) return ihipLogStatus(hipSuccess); } -hipError_t hipCtxSetCacheConfig ( hipFuncCache cacheConfig ) +hipError_t hipCtxSetCacheConfig ( hipFuncCache_t cacheConfig ) { HIP_INIT_API(cacheConfig); diff --git a/hipamd/src/hip_device.cpp b/hipamd/src/hip_device.cpp index 116f4ade20..5bf7c5bf4e 100644 --- a/hipamd/src/hip_device.cpp +++ b/hipamd/src/hip_device.cpp @@ -80,7 +80,7 @@ hipError_t hipDeviceSetCacheConfig(hipFuncCache_t cacheConfig) return ihipLogStatus(hipSuccess); } -hipError_t hipDeviceGetCacheConfig(hipFuncCache *cacheConfig) +hipError_t hipDeviceGetCacheConfig(hipFuncCache_t *cacheConfig) { HIP_INIT_API(cacheConfig); @@ -105,7 +105,7 @@ hipError_t hipDeviceGetLimit (size_t *pValue, hipLimit_t limit) } } -hipError_t hipFuncSetCacheConfig (hipFuncCache cacheConfig) +hipError_t hipFuncSetCacheConfig (hipFuncCache_t cacheConfig) { HIP_INIT_API(cacheConfig); diff --git a/hipamd/tests/src/test_common.h b/hipamd/tests/src/test_common.h index 90c130c56a..1250de4801 100644 --- a/hipamd/tests/src/test_common.h +++ b/hipamd/tests/src/test_common.h @@ -24,6 +24,7 @@ THE SOFTWARE. #include "hip/hip_runtime.h" #include "hip/hip_texture.h" +#include "hip/hip_runtime_api.h" #define HC __attribute__((hc))