SWDEV-415029 - [ABI Break] Remove hcc symbols

This reverts commit 81a120a5c5.

Reason for revert: Bring back original change.

Change-Id: I15c5f288bc50107831a494a81d1f16df4c2ade27


[ROCm/hip-tests commit: cf3df12106]
Este commit está contenido en:
Rahul Garg
2023-10-13 20:10:23 -04:00
cometido por Rakesh Roy
padre 4b171d9fe7
commit 422d70ffb0
Se han modificado 13 ficheros con 55 adiciones y 55 borrados
@@ -42,7 +42,7 @@ static void getDeviceCount(int *pdevCnt) {
pipe(fd);
// disable visible_devices env from shell
#ifdef __HIP_PLATFORM_NVCC__
#ifdef __HIP_PLATFORM_NVIDIA__
unsetenv("CUDA_VISIBLE_DEVICES");
#else
unsetenv("ROCR_VISIBLE_DEVICES");
@@ -96,7 +96,7 @@ bool runMaskedDeviceTest(int actualNumGPUs) {
snprintf(visibleDeviceString, MAX_SIZE, "%d", VISIBLE_DEVICE);
// disable visible_devices env from shell
#ifdef __HIP_PLATFORM_NVCC__
#ifdef __HIP_PLATFORM_NVIDIA__
unsetenv("CUDA_VISIBLE_DEVICES");
setenv("CUDA_VISIBLE_DEVICES", visibleDeviceString, 1);
HIP_CHECK(hipInit(0));
@@ -46,7 +46,7 @@ void getDeviceCount(int *pdevCnt) {
pipe(fd);
// disable visible_devices env from shell
#ifdef __HIP_PLATFORM_NVCC__
#ifdef __HIP_PLATFORM_NVIDIA__
unsetenv("CUDA_VISIBLE_DEVICES");
#else
unsetenv("ROCR_VISIBLE_DEVICES");
@@ -101,7 +101,7 @@ bool testWithMaskedDevices(int actualNumGPUs) {
snprintf(visibleDeviceString, MAX_SIZE, "%d", VISIBLE_DEVICE);
// disable visible_devices env from shell
#ifdef __HIP_PLATFORM_NVCC__
#ifdef __HIP_PLATFORM_NVIDIA__
unsetenv("CUDA_VISIBLE_DEVICES");
setenv("CUDA_VISIBLE_DEVICES", visibleDeviceString, 1);
HIP_CHECK(hipInit(0));
@@ -42,7 +42,7 @@ static void getDeviceCount(int *pdevCnt) {
pipe(fd);
// disable visible_devices env from shell
#ifdef __HIP_PLATFORM_NVCC__
#ifdef __HIP_PLATFORM_NVIDIA__
unsetenv("CUDA_VISIBLE_DEVICES");
#else
unsetenv("ROCR_VISIBLE_DEVICES");
@@ -98,7 +98,7 @@ static bool getTotalMemoryOfMaskedDevices(int actualNumGPUs) {
snprintf(visibleDeviceString, MAX_SIZE, "%d", VISIBLE_DEVICE);
// disable visible_devices env from shell
#ifdef __HIP_PLATFORM_NVCC__
#ifdef __HIP_PLATFORM_NVIDIA__
unsetenv("CUDA_VISIBLE_DEVICES");
setenv("CUDA_VISIBLE_DEVICES", visibleDeviceString, 1);
HIP_CHECK(hipInit(0));
@@ -45,7 +45,7 @@ static void getDeviceCount(int *pdevCnt) {
pipe(fd);
// disable visible_devices env from shell
#ifdef __HIP_PLATFORM_NVCC__
#ifdef __HIP_PLATFORM_NVIDIA__
unsetenv("CUDA_VISIBLE_DEVICES");
#else
unsetenv("ROCR_VISIBLE_DEVICES");
@@ -101,7 +101,7 @@ static bool validateGetAttributeOfMaskedDevices(int actualNumGPUs) {
snprintf(visibleDeviceString, MAX_SIZE, "%d", VISIBLE_DEVICE);
// disable visible_devices env from shell
#ifdef __HIP_PLATFORM_NVCC__
#ifdef __HIP_PLATFORM_NVIDIA__
unsetenv("CUDA_VISIBLE_DEVICES");
setenv("CUDA_VISIBLE_DEVICES", visibleDeviceString, 1);
HIP_CHECK(hipInit(0));
@@ -38,7 +38,7 @@ TEST_CASE("Unit_hipGetDeviceCount_MaskedDevices") {
char visibleDeviceString[MAX_SIZE] = {};
snprintf(visibleDeviceString, MAX_SIZE, "%d", VISIBLE_DEVICE);
#ifdef __HIP_PLATFORM_NVCC__
#ifdef __HIP_PLATFORM_NVIDIA__
unsetenv("CUDA_VISIBLE_DEVICES");
setenv("CUDA_VISIBLE_DEVICES", visibleDeviceString, 1);
#else
@@ -44,7 +44,7 @@ static void getDeviceCount(int *pdevCnt) {
pipe(fd);
// disable visible_devices env from shell
#ifdef __HIP_PLATFORM_NVCC__
#ifdef __HIP_PLATFORM_NVIDIA__
unsetenv("CUDA_VISIBLE_DEVICES");
#else
unsetenv("ROCR_VISIBLE_DEVICES");
@@ -101,7 +101,7 @@ static bool validateGetPropsOfMaskedDevices(int actualNumGPUs) {
snprintf(visibleDeviceString, MAX_SIZE, "%d", VISIBLE_DEVICE);
// disable visible_devices env from shell
#ifdef __HIP_PLATFORM_NVCC__
#ifdef __HIP_PLATFORM_NVIDIA__
unsetenv("CUDA_VISIBLE_DEVICES");
setenv("CUDA_VISIBLE_DEVICES", visibleDeviceString, 1);
HIP_CHECK(hipInit(0));
@@ -101,7 +101,7 @@ static void testInvalidDevice(int numDevices, bool useRocrEnv,
if (cPid == 0) { // child
hipError_t err;
#ifdef __HIP_PLATFORM_NVCC__
#ifdef __HIP_PLATFORM_NVIDIA__
setenv("CUDA_VISIBLE_DEVICES", visibleDeviceString, 1);
#else
if (true == useRocrEnv) {
@@ -190,7 +190,7 @@ static void testValidDevices(int numDevices, bool useRocrEnv, int *deviceList,
cPid = fork();
if (cPid == 0) {
#ifdef __HIP_PLATFORM_NVCC__
#ifdef __HIP_PLATFORM_NVIDIA__
unsetenv("CUDA_VISIBLE_DEVICES");
setenv("CUDA_VISIBLE_DEVICES", visibleDeviceString, 1);
#else
@@ -420,7 +420,7 @@ TEST_CASE("Unit_hipSetDevice_InvalidVisibleDeviceList") {
SECTION("Test setting invalid device to HIP_VISIBLE_DEVICES") {
testInvalidDevice(numDevices, false, numDevices);
}
#ifndef __HIP_PLATFORM_NVCC__
#ifndef __HIP_PLATFORM_NVIDIA__
SECTION("Test setting -1 to ROCR_VISIBLE_DEVICES") {
testInvalidDevice(numDevices, true, -1);
}
@@ -449,7 +449,7 @@ TEST_CASE("Unit_hipSetDevice_ValidVisibleDeviceList") {
SECTION("Test setting valid hip visible device list") {
testValidDevices(numDevices, false, deviceList, numDevices);
}
#ifndef __HIP_PLATFORM_NVCC__
#ifndef __HIP_PLATFORM_NVIDIA__
SECTION("Test setting valid rocr visible device list") {
testValidDevices(numDevices, true, deviceList, numDevices);
}
@@ -472,7 +472,7 @@ TEST_CASE("Unit_hipSetDevice_SubsetOfAvailableDevices") {
deviceList[i] = deviceListLength-1-i;
}
#ifndef __HIP_PLATFORM_NVCC__
#ifndef __HIP_PLATFORM_NVIDIA__
testValidDevices(numDevices, true, deviceList,
deviceListLength);
#endif
@@ -480,7 +480,7 @@ TEST_CASE("Unit_hipSetDevice_SubsetOfAvailableDevices") {
deviceListLength);
}
#ifndef __HIP_PLATFORM_NVCC__
#ifndef __HIP_PLATFORM_NVIDIA__
/* Following tests apply only for AMD Platforms */
/**
@@ -565,6 +565,6 @@ TEST_CASE("Unit_hipSetDevice_RvdCvdDevicesList") {
testRvdCvd(numDevices, deviceList, count);
}
#endif // __HIP_PLATFORM_NVCC__
#endif // __HIP_PLATFORM_NVIDIA__
#endif // __linux__