[SWDEV-467733] - Add Param checking for SetCacheConfig APIs
Change-Id: I9e777fa0fae6791ebab539e49346e6956a6ff196
This commit is contained in:
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);
|
||||
|
||||
Reference in new issue
Block a user