[SWDEV-467733] - Add Param checking for SetCacheConfig APIs
Change-Id: I9e777fa0fae6791ebab539e49346e6956a6ff196
此提交包含在:
1 父節點
07c9c7fe56
當前提交
0d20383ef9
3 file 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
封鎖使用者