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

Change-Id: Iae148c3c998b18247624938512918dbb31bc462d
This commit is contained in:
Sang, Tao
2025-05-13 09:34:30 -04:00
committed by GitHub
orang tua 63c545989b
melakukan 5a33b33ec8
7 mengubah file dengan 79 tambahan dan 16 penghapusan
@@ -53,6 +53,7 @@ constexpr auto fileName = "copyKernel.code";
constexpr auto kernel_name = "copy_ker";
constexpr auto fileNameCompressed = "copyKernelCompressed.code";
constexpr auto fileNameGenericTarget = "copyKernelGenericTarget.code";
constexpr auto fileNameGenericTargetCompressed = "copyKernelGenericTargetCompressed.code";
static constexpr auto totalWorkGroups{1024};
static constexpr auto localWorkSize{512};
@@ -192,19 +193,26 @@ TEST_CASE("Unit_hipExtModuleLaunchKernel_UniformWorkGroup") {
// Get module and function from module
hipModule_t Module;
hipFunction_t Function;
SECTION("uncompressed codeobjects") {
SECTION("regular fatbin") {
HIP_CHECK(hipModuleLoad(&Module, fileName));
}
SECTION("compressed codeobjects") {
SECTION("compressed fatbin") {
HIP_CHECK(hipModuleLoad(&Module, fileNameCompressed));
}
SECTION("generic target codeobjects") {
SECTION("generic target in regular fatbin") {
if (!isGenericTargetSupported()) {
fprintf(stderr, "Generic target test is skipped\n");
return;
}
HIP_CHECK(hipModuleLoad(&Module, fileNameGenericTarget));
}
SECTION("generic target in compressed fatbin") {
if (!isGenericTargetSupported()) {
fprintf(stderr, "Generic target test is skipped\n");
return;
}
HIP_CHECK(hipModuleLoad(&Module, fileNameGenericTargetCompressed));
}
HIP_CHECK(hipModuleGetFunction(&Function, Module, kernel_name));
// Allocate resources
int* A = new int[arraylength];