SWDEV-447973 - Add generic target codeobj test

Add simple tests to verify generic target code
objects.

Change-Id: Iae148c3c938b18247624938512918dbb3cbc462e
Этот коммит содержится в:
taosang2
2024-06-28 17:17:31 -04:00
коммит произвёл Tao Sang
родитель 168312b97f
Коммит f581518103
14 изменённых файлов: 720 добавлений и 4 удалений
+9
Просмотреть файл
@@ -52,6 +52,8 @@ THE SOFTWARE.
constexpr auto fileName = "copyKernel.code";
constexpr auto kernel_name = "copy_ker";
constexpr auto fileNameCompressed = "copyKernelCompressed.code";
constexpr auto fileNameGenericTarget = "copyKernelGenericTarget.code";
static constexpr auto totalWorkGroups{1024};
static constexpr auto localWorkSize{512};
static constexpr auto lastWorkSizeEven{256};
@@ -196,6 +198,13 @@ TEST_CASE("Unit_hipExtModuleLaunchKernel_UniformWorkGroup") {
SECTION("compressed codeobjects") {
HIP_CHECK(hipModuleLoad(&Module, fileNameCompressed));
}
SECTION("generic target codeobjects") {
if (!isGenericTargetSupported()) {
fprintf(stderr, "Generic target test is skipped\n");
return;
}
HIP_CHECK(hipModuleLoad(&Module, fileNameGenericTarget));
}
HIP_CHECK(hipModuleGetFunction(&Function, Module, kernel_name));
// Allocate resources
int* A = new int[arraylength];