Merge 'amd-master-next' into 'amd-npi-next'
Change-Id: I2121bcceb5d3321fdc4248de337101d628411ab1
[ROCm/clr commit: 68cd6a2aee]
This commit is contained in:
@@ -105,7 +105,7 @@
|
|||||||
| `cudaFuncGetAttributes` |`hipFuncGetAttributes` |
|
| `cudaFuncGetAttributes` |`hipFuncGetAttributes` |
|
||||||
| `cudaFuncSetAttribute` |`hipFuncSetAttribute` | 9.0 |
|
| `cudaFuncSetAttribute` |`hipFuncSetAttribute` | 9.0 |
|
||||||
| `cudaFuncSetCacheConfig` |`hipFuncSetCacheConfig` |
|
| `cudaFuncSetCacheConfig` |`hipFuncSetCacheConfig` |
|
||||||
| `cudaFuncSetSharedMemConfig` | |
|
| `cudaFuncSetSharedMemConfig` |`hipFuncSetSharedMemConfig` |
|
||||||
| `cudaGetParameterBuffer` | |
|
| `cudaGetParameterBuffer` | |
|
||||||
| `cudaGetParameterBufferV2` | |
|
| `cudaGetParameterBufferV2` | |
|
||||||
| `cudaLaunchKernel` |`hipLaunchKernel` |
|
| `cudaLaunchKernel` |`hipLaunchKernel` |
|
||||||
|
|||||||
@@ -312,7 +312,6 @@ typedef enum hipFuncCache_t {
|
|||||||
hipFuncCachePreferEqual, ///< prefer equal size L1 cache and shared memory
|
hipFuncCachePreferEqual, ///< prefer equal size L1 cache and shared memory
|
||||||
} hipFuncCache_t;
|
} hipFuncCache_t;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @warning On AMD devices and some Nvidia devices, these hints and controls are ignored.
|
* @warning On AMD devices and some Nvidia devices, these hints and controls are ignored.
|
||||||
*/
|
*/
|
||||||
@@ -566,6 +565,20 @@ hipError_t hipFuncSetAttribute(const void* func, hipFuncAttribute attr, int valu
|
|||||||
*/
|
*/
|
||||||
hipError_t hipFuncSetCacheConfig(const void* func, hipFuncCache_t config);
|
hipError_t hipFuncSetCacheConfig(const void* func, hipFuncCache_t config);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Set shared memory configuation for a specific function
|
||||||
|
*
|
||||||
|
* @param [in] func
|
||||||
|
* @param [in] config
|
||||||
|
*
|
||||||
|
* @returns #hipSuccess, #hipErrorInvalidDeviceFunction, #hipErrorInvalidValue
|
||||||
|
*
|
||||||
|
* Note: AMD devices and some Nvidia GPUS do not support shared cache banking, and the hint is
|
||||||
|
* ignored on those architectures.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
hipError_t hipFuncSetSharedMemConfig(const void* func, hipSharedMemConfig config);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Returns bank width of shared memory for current device
|
* @brief Returns bank width of shared memory for current device
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1016,6 +1016,10 @@ inline static hipError_t hipDeviceSetCacheConfig(hipFuncCache_t cacheConfig) {
|
|||||||
return hipCUDAErrorTohipError(cudaDeviceSetCacheConfig(cacheConfig));
|
return hipCUDAErrorTohipError(cudaDeviceSetCacheConfig(cacheConfig));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline static hipError_t hipFuncSetSharedMemConfig(const void* func, hipSharedMemConfig config) {
|
||||||
|
return hipCUDAErrorTohipError(cudaFuncSetSharedMemConfig(func, config));
|
||||||
|
}
|
||||||
|
|
||||||
inline static const char* hipGetErrorString(hipError_t error) {
|
inline static const char* hipGetErrorString(hipError_t error) {
|
||||||
return cudaGetErrorString(hipErrorToCudaError(error));
|
return cudaGetErrorString(hipErrorToCudaError(error));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -57,6 +57,7 @@ hipFree
|
|||||||
hipFreeArray
|
hipFreeArray
|
||||||
hipFuncSetAttribute
|
hipFuncSetAttribute
|
||||||
hipFuncSetCacheConfig
|
hipFuncSetCacheConfig
|
||||||
|
hipFuncSetSharedMemConfig
|
||||||
hipGetDevice
|
hipGetDevice
|
||||||
hipGetDeviceCount
|
hipGetDeviceCount
|
||||||
hipGetDeviceProperties
|
hipGetDeviceProperties
|
||||||
|
|||||||
@@ -58,6 +58,7 @@ global:
|
|||||||
hipFreeArray;
|
hipFreeArray;
|
||||||
hipFuncSetAttribute;
|
hipFuncSetAttribute;
|
||||||
hipFuncSetCacheConfig;
|
hipFuncSetCacheConfig;
|
||||||
|
hipFuncSetSharedMemConfig;
|
||||||
hipGetDevice;
|
hipGetDevice;
|
||||||
hipGetDeviceCount;
|
hipGetDeviceCount;
|
||||||
hipGetDeviceProperties;
|
hipGetDeviceProperties;
|
||||||
|
|||||||
@@ -210,6 +210,14 @@ hipError_t hipFuncSetCacheConfig (const void* func, hipFuncCache_t cacheConfig)
|
|||||||
HIP_RETURN(hipSuccess);
|
HIP_RETURN(hipSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
hipError_t hipFuncSetSharedMemConfig ( const void* func, hipSharedMemConfig config) {
|
||||||
|
HIP_INIT_API(hipFuncSetSharedMemConfig, func, config);
|
||||||
|
|
||||||
|
// No way to set Shared Memory config function yet.
|
||||||
|
|
||||||
|
HIP_RETURN(hipSuccess);
|
||||||
|
}
|
||||||
|
|
||||||
hipError_t ihipModuleLaunchKernel(hipFunction_t f, uint32_t globalWorkSizeX,
|
hipError_t ihipModuleLaunchKernel(hipFunction_t f, uint32_t globalWorkSizeX,
|
||||||
uint32_t globalWorkSizeY, uint32_t globalWorkSizeZ,
|
uint32_t globalWorkSizeY, uint32_t globalWorkSizeZ,
|
||||||
uint32_t blockDimX, uint32_t blockDimY, uint32_t blockDimZ,
|
uint32_t blockDimX, uint32_t blockDimY, uint32_t blockDimZ,
|
||||||
|
|||||||
@@ -1416,6 +1416,14 @@ hipError_t hipFuncSetAttribute(const void* func, hipFuncAttribute attr, int valu
|
|||||||
return ihipLogStatus(hipSuccess);
|
return ihipLogStatus(hipSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
hipError_t hipFuncSetSharedMemConfig(const void* func, hipSharedMemConfig config) {
|
||||||
|
HIP_INIT_API(hipFuncSetSharedMemConfig, func, config);
|
||||||
|
|
||||||
|
// Nop, AMD does not support setting shared memory size for function.
|
||||||
|
|
||||||
|
return ihipLogStatus(hipSuccess);
|
||||||
|
}
|
||||||
|
|
||||||
hipError_t hipFuncGetAttribute(int* value, hipFunction_attribute attrib, hipFunction_t hfunc)
|
hipError_t hipFuncGetAttribute(int* value, hipFunction_attribute attrib, hipFunction_t hfunc)
|
||||||
{
|
{
|
||||||
HIP_INIT_API(hipFuncGetAttribute, value, attrib, hfunc);
|
HIP_INIT_API(hipFuncGetAttribute, value, attrib, hfunc);
|
||||||
|
|||||||
Reference in New Issue
Block a user