Remove SetGetCacheConfig tests as APIs are not implemented (#84)

Cette révision appartient à :
Arandjelovic, Marko
2025-05-14 16:27:05 +02:00
révisé par GitHub
Parent 974d47ad8d
révision 552ed6125e
4 fichiers modifiés avec 0 ajouts et 114 suppressions
-104
Voir le fichier
@@ -19,10 +19,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
#include <array>
#include <hip_test_common.hh>
#include <threaded_zig_zag_test.hh>
/**
* @addtogroup hipDeviceSetCacheConfig hipDeviceSetCacheConfig
@@ -59,25 +56,6 @@ TEST_CASE("Unit_hipDeviceSetCacheConfig_Positive_Basic") {
HIP_CHECK(hipDeviceSetCacheConfig(cache_config));
}
/**
* Test Description
* ------------------------
* - Handle invalid cache config (-1):
* -# When platform is AMD
* - Expected output: return `hipErrorNotSupported`
* -# When platform is NVIDIA
* - Expected output: return `hipErrorInvalidValue`
* Test source
* ------------------------
* - unit/device/hipDeviceSetGetCacheConfig.cc
* Test requirements
* ------------------------
* - HIP_VERSION >= 5.2
*/
TEST_CASE("Unit_hipDeviceSetCacheConfig_Negative_Parameters") {
HIP_CHECK_ERROR(hipDeviceSetCacheConfig(static_cast<hipFuncCache_t>(-1)), hipErrorInvalidValue);
}
/**
* End doxygen group hipDeviceSetCacheConfig.
* @}
@@ -112,85 +90,3 @@ TEST_CASE("Unit_hipDeviceGetCacheConfig_Positive_Default") {
HIP_CHECK(hipDeviceGetCacheConfig(&cache_config));
REQUIRE(cache_config == hipFuncCachePreferNone);
}
/**
* Test Description
* ------------------------
* - Check that the returned cache configuration is equal to
* the one that is set previously.
* - Verify for multiple devices.
* Test source
* ------------------------
* - unit/device/hipDeviceSetGetCacheConfig.cc
* Test requirements
* ------------------------
* - HIP_VERSION >= 5.2
*/
TEST_CASE("Unit_hipDeviceGetCacheConfig_Positive_Basic") {
const auto device = GENERATE(range(0, HipTest::getDeviceCount()));
HIP_CHECK(hipSetDevice(device));
INFO("Current device is: " << device);
const auto cache_config =
GENERATE(from_range(std::begin(kCacheConfigs), std::end(kCacheConfigs)));
HIP_CHECK(hipDeviceSetCacheConfig(cache_config));
hipFuncCache_t returned_cache_config;
HIP_CHECK(hipDeviceGetCacheConfig(&returned_cache_config));
REQUIRE(returned_cache_config == cache_config);
}
/**
* Test Description
* ------------------------
* - Check that the returned cache configuration from the main thread
* is equal to the one that is set previously from different thread.
* Test source
* ------------------------
* - unit/device/hipDeviceSetGetCacheConfig.cc
* Test requirements
* ------------------------
* - HIP_VERSION >= 5.2
*/
TEST_CASE("Unit_hipDeviceGetCacheConfig_Positive_Threaded") {
class HipDeviceSetGetCacheConfigTest : public ThreadedZigZagTest<HipDeviceSetGetCacheConfigTest> {
public:
HipDeviceSetGetCacheConfigTest(const hipFuncCache_t cache_config)
: cache_config_{cache_config} {}
void TestPart2() { HIP_CHECK_THREAD(hipDeviceSetCacheConfig(cache_config_)); }
void TestPart3() {
hipFuncCache_t returned_cache_config;
HIP_CHECK_THREAD(hipDeviceGetCacheConfig(&returned_cache_config));
REQUIRE_THREAD(returned_cache_config == cache_config_);
}
private:
const hipFuncCache_t cache_config_;
};
const auto cache_config =
GENERATE(from_range(std::begin(kCacheConfigs), std::end(kCacheConfigs)));
HipDeviceSetGetCacheConfigTest test(cache_config);
test.run();
}
/**
* Test Description
* ------------------------
* - Verify handling of invalid arguments:
* -# When cache config is `nullptr`
* - Expected output: return `hipErrorInvalidValue`
* Test source
* ------------------------
* - unit/device/hipDeviceSetGetCacheConfig.cc
* Test requirements
* ------------------------
* - HIP_VERSION >= 5.2
*/
TEST_CASE("Unit_HipDeviceGetCacheConfig_Negative_Parameters") {
HIP_CHECK_ERROR(hipDeviceGetCacheConfig(nullptr), hipErrorInvalidValue);
}