diff --git a/tests/catch/unit/device/hipDeviceSetGetCacheConfig.cc b/tests/catch/unit/device/hipDeviceSetGetCacheConfig.cc index b3559e54a4..01dfdc3d63 100644 --- a/tests/catch/unit/device/hipDeviceSetGetCacheConfig.cc +++ b/tests/catch/unit/device/hipDeviceSetGetCacheConfig.cc @@ -37,5 +37,9 @@ TEST_CASE("Unit_hipDeviceGetCacheConfig_FuncTst") { (cacheConfig != hipFuncCachePreferEqual))); // This code exists to test the dummy implementation of // hipDeviceSetCacheConfig. +#if HT_NVIDIA HIP_CHECK(hipDeviceSetCacheConfig(cacheConfig)); +#else + REQUIRE_FALSE(hipSuccess == hipDeviceSetCacheConfig(cacheConfig)); +#endif }