SWDEV-362365 - Return invalid value if config is not valid.

Change-Id: I5f7300060f25536f8d3fd25afc2fe2522b621432


[ROCm/clr commit: 4d8fd17985]
This commit is contained in:
Jaydeep Patel
2023-03-01 10:10:08 +00:00
committed by Maneesh Gupta
parent ac5c6ad299
commit 91fef1215c
@@ -503,7 +503,11 @@ hipError_t hipDeviceSetLimit ( hipLimit_t limit, size_t value ) {
hipError_t hipDeviceSetSharedMemConfig ( hipSharedMemConfig config ) {
HIP_INIT_API(hipDeviceSetSharedMemConfig, config);
if (config != hipSharedMemBankSizeDefault &&
config != hipSharedMemBankSizeFourByte &&
config != hipSharedMemBankSizeEightByte) {
HIP_RETURN(hipErrorInvalidValue);
}
// No way to set cache config yet.
HIP_RETURN(hipErrorNotSupported);