From dcb234c01f0b574ddf07bf1afc91d4ed8aed1790 Mon Sep 17 00:00:00 2001 From: ROCm CI Service Account <66695075+rocm-ci@users.noreply.github.com> Date: Wed, 28 Jun 2023 21:51:43 +0530 Subject: [PATCH] SWDEV-389829 - Fix rocprof-hiptrace-hipModule_--tests_0x2 (#3208) - Don't use HIP_PATH for kernel compilation. - Make the test fail when code object file doesn't get created. - Disable the test for Nvidia. Change-Id: I0c78d6c0567aff058cb99fb3696b8d64c9a437ed --- tests/src/runtimeApi/module/hipModule.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/src/runtimeApi/module/hipModule.cpp b/tests/src/runtimeApi/module/hipModule.cpp index e29c56185f..481c276dc9 100644 --- a/tests/src/runtimeApi/module/hipModule.cpp +++ b/tests/src/runtimeApi/module/hipModule.cpp @@ -126,7 +126,7 @@ bool isRocmPathSet() { bool testMultiTargArchCodeObj() { bool btestPassed = true; -#ifdef __linux__ +#if defined(__linux__) && defined(__HIP_PLATFORM_AMD__) char command[COMMAND_LEN]; hipDeviceProp_t props; hipGetDeviceProperties(&props, 0); @@ -161,7 +161,7 @@ bool testMultiTargArchCodeObj() { const char* genco_option = "--offload-arch"; const char* input_codeobj = "/tmp/vcpy_kernel.cpp"; snprintf(command, COMMAND_LEN, - "%s --genco %s=gfx801,gfx802,gfx803,gfx900,gfx908,%s %s -o %s", + "unset HIP_PATH;%s --genco %s=gfx801,gfx802,gfx803,gfx900,gfx908,%s %s -o %s", hipcc_path, genco_option, props.gcnArchName, input_codeobj, CODE_OBJ_MULTIARCH); @@ -173,11 +173,11 @@ bool testMultiTargArchCodeObj() { if (access(command, F_OK) == -1) { printf("Code Object File not found \n"); - return true; + return false; } btestPassed = testCodeObjFile(CODE_OBJ_MULTIARCH); #else - printf("This test is skipped due to non linux environment.\n"); + printf("This test is skipped due to non linux or non AMD environment.\n"); #endif return btestPassed; }