SWDEV-397358 - Fix hipDeviceSetCacheConfig & hipDeviceSetSharedMemConfig tests (#312)

This commit is contained in:
Maneesh Gupta
2023-06-21 16:00:42 +05:30
کامیت شده توسط GitHub
والد 849cd91612
کامیت efc742a900
4فایلهای تغییر یافته به همراه5 افزوده شده و 23 حذف شده
@@ -38,16 +38,12 @@ TEST_CASE("Unit_hipDeviceSetCacheConfig_Positive_Basic") {
const auto cache_config =
GENERATE(from_range(std::begin(kCacheConfigs), std::end(kCacheConfigs)));
#if HT_AMD
HIP_CHECK_ERROR(hipDeviceSetCacheConfig(cache_config), hipErrorNotSupported);
#elif HT_NVIDIA
HIP_CHECK(hipDeviceSetCacheConfig(cache_config));
#endif
}
TEST_CASE("Unit_hipDeviceSetCacheConfig_Negative_Parameters") {
#if HT_AMD
HIP_CHECK_ERROR(hipDeviceSetCacheConfig(static_cast<hipFuncCache_t>(-1)), hipErrorNotSupported);
HIP_CHECK_ERROR(hipDeviceSetCacheConfig(static_cast<hipFuncCache_t>(-1)), hipSuccess);
#elif HT_NVIDIA
HIP_CHECK_ERROR(hipDeviceSetCacheConfig(static_cast<hipFuncCache_t>(-1)), hipErrorInvalidValue);
#endif
@@ -105,4 +101,4 @@ TEST_CASE("Unit_hipDeviceGetCacheConfig_Positive_Threaded") {
TEST_CASE("Unit_HipDeviceGetCacheConfig_Negative_Parameters") {
HIP_CHECK_ERROR(hipDeviceGetCacheConfig(nullptr), hipErrorInvalidValue);
}
}