SWDEV-508863 - Add generic target in compressed fatbin test (#28)

Change-Id: Iae148c3c998b18247624938512918dbb31bc462d

[ROCm/hip-tests commit: 5a33b33ec8]
This commit is contained in:
Sang, Tao
2025-05-13 09:34:30 -04:00
gecommit door GitHub
bovenliggende 0da26f9d89
commit f0dee29292
7 gewijzigde bestanden met toevoegingen van 79 en 16 verwijderingen
@@ -37,7 +37,7 @@ TEST_CASE("Unit_hipModuleLoadData_Positive_Basic") {
}
#if HT_AMD
SECTION("Load compiled module from file with compressed code objects") {
SECTION("Load compiled module from file with regular target in compressed fatbin") {
const auto loaded_module = LoadModuleIntoBuffer("copyKernelCompressed.code");
HIP_CHECK(hipModuleLoadData(&module, loaded_module.data()));
REQUIRE(module != nullptr);
@@ -47,7 +47,7 @@ TEST_CASE("Unit_hipModuleLoadData_Positive_Basic") {
HIP_CHECK(hipModuleUnload(module));
}
SECTION("Load compiled module from file with generic target code objects") {
SECTION("Load compiled module from file with generic target in regular fatbin") {
if (!isGenericTargetSupported()) {
fprintf(stderr, "Generic target test is skipped\n");
return;
@@ -60,6 +60,20 @@ TEST_CASE("Unit_hipModuleLoadData_Positive_Basic") {
REQUIRE(kernel != nullptr);
HIP_CHECK(hipModuleUnload(module));
}
SECTION("Load compiled module from file with generic target in compressed fatbin") {
if (!isGenericTargetSupported()) {
fprintf(stderr, "Generic target test is skipped\n");
return;
}
const auto loaded_module = LoadModuleIntoBuffer("copyKernelGenericTargetCompressed.code");
HIP_CHECK(hipModuleLoadData(&module, loaded_module.data()));
REQUIRE(module != nullptr);
hipFunction_t kernel = nullptr;
HIP_CHECK(hipModuleGetFunction(&kernel, module, "copy_ker"));
REQUIRE(kernel != nullptr);
HIP_CHECK(hipModuleUnload(module));
}
#endif
SECTION("Load RTCd module") {