File tree 3 files changed +13
-3
lines changed 3 files changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -30,10 +30,18 @@ cmake --version
30
30
pip install -r requirements.txt || true
31
31
32
32
if [[ " $BUILD_ENVIRONMENT " == * rocm* ]]; then
33
+ # This is necessary in order to cross compile (or else we'll have missing GPU device).
33
34
export HCC_AMDGPU_TARGET=gfx900
35
+
36
+ # These environment variables are not set on CI when we were running as the Jenkins user.
37
+ # The HIP Utility scripts require these environment variables to be set in order to run without error.
34
38
export LANG=C.UTF-8
35
39
export LC_ALL=C.UTF-8
36
40
41
+ # This environment variable enabled HCC Optimizations that speed up the linking stage.
42
+ # https://github.com/RadeonOpenCompute/hcc#hcc-with-thinlto-linking
43
+ # export KMTHINLTO=1
44
+
37
45
sudo chown -R jenkins:jenkins /usr/local
38
46
rm -rf " $( dirname " ${BASH_SOURCE[0]} " ) /../../../pytorch_amd/" || true
39
47
python " $( dirname " ${BASH_SOURCE[0]} " ) /../../tools/amd_build/build_pytorch_amd.py"
Original file line number Diff line number Diff line change @@ -273,9 +273,8 @@ if(USE_ROCM)
273
273
target_include_directories (caffe2_hip PRIVATE ${Caffe2_HIP_INCLUDES} )
274
274
target_include_directories (caffe2_hip INTERFACE $<INSTALL_INTERFACE:include >)
275
275
276
- IF (BUILD_ATEN)
277
- aten_set_target_props(caffe2_hip)
278
- ENDIF ()
276
+ # Set standard properties on the target
277
+ aten_set_target_props(caffe2_hip)
279
278
280
279
# When a library has object files that contain device code, it needs to use hipcc/hcc to link.
281
280
set_target_properties (caffe2_hip PROPERTIES LINKER_LANGUAGE HIP)
Original file line number Diff line number Diff line change @@ -102,13 +102,16 @@ FIND_PACKAGE(HIP 1.0)
102
102
IF (HIP_FOUND)
103
103
set (PYTORCH_FOUND_HIP TRUE )
104
104
105
+ ### Remove setting of Flags when FindHIP.CMake PR #558 is accepted.###
106
+ # https://github.com/ROCm-Developer-Tools/HIP/pull/558 #
105
107
set (CMAKE_SHARED_LIBRARY_SONAME_HIP_FLAG ${CMAKE_SHARED_LIBRARY_SONAME_CXX_FLAG} )
106
108
set (CMAKE_HIP_LINK_EXECUTABLE "${HIP_HIPCC_CMAKE_LINKER_HELPER} ${HCC_PATH} <FLAGS> <CMAKE_CXX_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>" )
107
109
set (CMAKE_HIP_CREATE_SHARED_LIBRARY "${HIP_HIPCC_CMAKE_LINKER_HELPER} ${HCC_PATH} <CMAKE_CXX_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> <SONAME_FLAG><TARGET_SONAME> -o <TARGET> <LINK_LIBRARIES> -shared" )
108
110
set (CMAKE_HIP_CREATE_SHARED_MODULE "${HIP_HIPCC_CMAKE_LINKER_HELPER} ${HCC_PATH} <CMAKE_CXX_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> <SONAME_FLAG><TARGET_SONAME> -o <TARGET> <LINK_LIBRARIES> -shared" )
109
111
set (CMAKE_HIP_ARCHIVE_CREATE ${CMAKE_CXX_ARCHIVE_CREATE} )
110
112
set (CMAKE_HIP_ARCHIVE_APPEND ${CMAKE_CXX_ARCHIVE_APPEND} )
111
113
set (CMAKE_HIP_ARCHIVE_FINISH ${CMAKE_CXX_ARCHIVE_FINISH} )
114
+ ### Remove setting of Flags when FindHIP.CMake PR #558 is accepted.###
112
115
113
116
set (rocrand_DIR ${ROCRAND_PATH} /lib/cmake/rocrand)
114
117
set (hiprand_DIR ${HIPRAND_PATH} /lib/cmake/hiprand)
You can’t perform that action at this time.
0 commit comments