Fixed hipDeviceGetCacheConfig on nvcc path
1. Changed test macro to emit line numbers 2. Added getcacheconfig api test for nvcc path 3. Fixed hipFuncCache_t data type TODO: With this commit, right now there are 2 func cache datatypes a. hipFuncCache_t for runtime API b. hipFuncCache for driver API Map these to a single data type Change-Id: Ia47c9f5d7c2633638051bf17b1103048a1ede973
This commit is contained in:
@@ -112,12 +112,12 @@ enum hipLimit_t
|
||||
/**
|
||||
* @warning On AMD devices and recent Nvidia devices, these hints and controls are ignored.
|
||||
*/
|
||||
typedef enum hipFuncCache {
|
||||
typedef enum hipFuncCache_t {
|
||||
hipFuncCachePreferNone, ///< no preference for shared memory or L1 (default)
|
||||
hipFuncCachePreferShared, ///< prefer larger shared memory and smaller L1 cache
|
||||
hipFuncCachePreferL1, ///< prefer larger L1 cache and smaller shared memory
|
||||
hipFuncCachePreferEqual, ///< prefer equal size L1 cache and shared memory
|
||||
} hipFuncCache;
|
||||
} hipFuncCache_t;
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -76,6 +76,7 @@ typedef cudaStream_t hipStream_t;
|
||||
typedef cudaIpcEventHandle_t hipIpcEventHandle_t;
|
||||
typedef cudaIpcMemHandle_t hipIpcMemHandle_t;
|
||||
typedef cudaLimit hipLimit_t;
|
||||
typedef cudaFuncCache hipFuncCache_t;
|
||||
typedef CUcontext hipCtx_t;
|
||||
typedef CUsharedconfig hipSharedMemConfig;
|
||||
typedef CUfunc_cache hipFuncCache;
|
||||
@@ -323,6 +324,10 @@ inline static hipError_t hipDeviceSynchronize() {
|
||||
return hipCUDAErrorTohipError(cudaDeviceSynchronize());
|
||||
}
|
||||
|
||||
inline static hipError_t hipDeviceGetCacheConfig(hipFuncCache_t *pCacheConfig) {
|
||||
return hipCUDAErrorTohipError(cudaDeviceGetCacheConfig(pCacheConfig));
|
||||
}
|
||||
|
||||
inline static const char* hipGetErrorString(hipError_t error){
|
||||
return cudaGetErrorString(hipErrorToCudaError(error));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user