Skip to content

Commit 2535fac

Browse files
committed
SWDEV-425967, SWDEV-425968 - Revert "SWDEV-415029 - [ABI Break] Remove hcc symbols"
This reverts commit 051e100. Reason for revert: This causes build failure in hipBLASLt & hipSPARSELt Change-Id: I59f6aeb8b82261b77eb978e53407bc56be1d0cf1
1 parent 01aa355 commit 2535fac

File tree

7 files changed

+29
-3
lines changed

7 files changed

+29
-3
lines changed

hipamd/hip-config-amd.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ endif()
8484
set(_IMPORT_PREFIX ${HIP_PACKAGE_PREFIX_DIR})
8585
# Right now this is only supported for amd platforms
8686
set_target_properties(hip::host PROPERTIES
87-
INTERFACE_COMPILE_DEFINITIONS "__HIP_PLATFORM_AMD__=1"
87+
INTERFACE_COMPILE_DEFINITIONS "__HIP_PLATFORM_HCC__=1;__HIP_PLATFORM_AMD__=1"
8888
)
8989

9090
set_target_properties(hip::amdhip64 PROPERTIES

hipamd/include/hip/amd_detail/amd_hip_runtime_pt_api.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ THE SOFTWARE.
2525
#ifndef HIP_INCLUDE_HIP_HIP_RUNTIME_PT_API_H
2626
#define HIP_INCLUDE_HIP_HIP_RUNTIME_PT_API_H
2727

28-
#if defined(__HIP_PLATFORM_AMD__) && !defined(__HIP_PLATFORM_NVIDIA__)
28+
#if (defined(__HIP_PLATFORM_HCC__) || defined(__HIP_PLATFORM_AMD__)) && !(defined(__HIP_PLATFORM_NVCC__) || defined(__HIP_PLATFORM_NVIDIA__))
2929

3030
/// hipStreamPerThread implementation
3131
#if defined(HIP_API_PER_THREAD_DEFAULT_STREAM)
@@ -192,5 +192,5 @@ hipError_t hipLaunchHostFunc_spt(hipStream_t stream, hipHostFn_t fn, void* userD
192192
}
193193
#endif // extern "C"
194194

195-
#endif //defined(__HIP_PLATFORM_AMD__) && !defined(__HIP_PLATFORM_NVIDIA__)
195+
#endif //(defined(__HIP_PLATFORM_HCC__) || defined(__HIP_PLATFORM_AMD__)) && !(defined(__HIP_PLATFORM_NVCC__) || defined(__HIP_PLATFORM_NVIDIA__))
196196
#endif //HIP_INCLUDE_HIP_HIP_RUNTIME_PT_API_H

hipamd/include/hip/amd_detail/host_defines.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ THE SOFTWARE.
2828
#ifndef HIP_INCLUDE_HIP_AMD_DETAIL_HOST_DEFINES_H
2929
#define HIP_INCLUDE_HIP_AMD_DETAIL_HOST_DEFINES_H
3030

31+
// The follow macro should be removed after upstream updation.
32+
// It's defined here for workarround of rocThrust building failure.
33+
#define HIP_INCLUDE_HIP_HCC_DETAIL_HOST_DEFINES_H
34+
3135
// Add guard to Generic Grid Launch method
3236
#ifndef GENERIC_GRID_LAUNCH
3337
#define GENERIC_GRID_LAUNCH 1

hipamd/include/hip/hcc_detail

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
amd_detail

hipamd/include/hip/nvcc_detail

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
nvidia_detail

hipamd/packaging/hip-devel.postinst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,18 @@
2121
ROCMDIR=@ROCM_PATH@
2222
HIPINCDIR=$ROCMDIR/@CMAKE_INSTALL_INCLUDEDIR@/hip
2323
CURRENTDIR=`pwd`
24+
# The following will be removed after upstream updation
25+
cd $HIPINCDIR
26+
ln -r -s -f amd_detail hcc_detail
27+
ln -r -s -f nvidia_detail nvcc_detail
28+
cd $CURRENTDIR
2429

2530
#FILE_REORG_BACKWARD_COMPATIBILITY
2631
HIPINCDIR=$ROCMDIR/hip/include/hip
32+
if [ -d $HIPINCDIR ]; then
33+
# The following will be removed after upstream updation
34+
cd $HIPINCDIR
35+
ln -r -s -f amd_detail hcc_detail
36+
ln -r -s -f nvidia_detail nvcc_detail
37+
cd $CURRENTDIR
38+
fi

hipamd/packaging/hip-devel.prerm

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,19 @@ CURRENTDIR=`pwd`
2323

2424
HIPINCDIR=$ROCMDIR/@CMAKE_INSTALL_INCLUDEDIR@/hip
2525
([ ! -d $HIPINCDIR ]) && exit 0
26+
cd $HIPINCDIR
27+
rm hcc_detail
28+
rm nvcc_detail
29+
cd $CURRENTDIR
2630

2731
#FILE_REORG_BACKWARD_COMPATIBILITY
2832
#backward copatibility code , to be removed later
2933
HIPDIR=$ROCMDIR/hip
3034
HIPINCDIR=$ROCMDIR/hip/include/hip
3135
([ ! -d $HIPINCDIR ]) && exit 0
36+
cd $HIPINCDIR
37+
rm -f hcc_detail
38+
rm -f nvcc_detail
39+
cd $CURRENTDIR
3240
([ ! -d $HIPDIR ]) && exit 0
3341
rmdir --ignore-fail-on-non-empty $HIPDIR

0 commit comments

Comments
 (0)