[SWDEV-467733] - Add Param checking for SetCacheConfig APIs

Change-Id: I9e777fa0fae6791ebab539e49346e6956a6ff196
This commit is contained in:
Rahul Manocha authored and Rahul Manocha committed 2024-09-27 11:32:58 -04:00
1 والد 07c9c7fe56
کامیت 0d20383ef9
3 files changed
+23 -2

No files matched your search

@@ -574,6 +574,11 @@ hipError_t hipDeviceReset(void) {
hipError_t hipDeviceSetCacheConfig(hipFuncCache_t cacheConfig) {
HIP_INIT_API(hipDeviceSetCacheConfig, cacheConfig);
if (cacheConfig != hipFuncCachePreferNone && cacheConfig != hipFuncCachePreferShared &&
cacheConfig != hipFuncCachePreferL1 && cacheConfig != hipFuncCachePreferEqual) {
HIP_RETURN(hipErrorInvalidValue);
}
// No way to set cache config yet.
HIP_RETURN(hipSuccess);