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
This commit is contained in:
ROCm CI Service Account
2023-06-28 21:51:43 +05:30
committed by GitHub
parent 20fbed3d69
commit dcb234c01f
+4 -4
View File
@@ -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;
}