File tree Expand file tree Collapse file tree 2 files changed +7
-8
lines changed Expand file tree Collapse file tree 2 files changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -1373,13 +1373,6 @@ if(USE_ROCM)
1373
1373
set (ROCM_SOURCE_DIR "/opt/rocm" )
1374
1374
endif ()
1375
1375
message (INFO "caffe2 ROCM_SOURCE_DIR = ${ROCM_SOURCE_DIR} " )
1376
- target_include_directories (torch_hip PRIVATE
1377
- ${ROCM_SOURCE_DIR} /include
1378
- ${ROCM_SOURCE_DIR} /hcc/include
1379
- ${ROCM_SOURCE_DIR} /rocblas/include
1380
- ${ROCM_SOURCE_DIR} /hipsparse/include
1381
- ${ROCM_SOURCE_DIR} /include/rccl/
1382
- )
1383
1376
if (USE_FLASH_ATTENTION )
1384
1377
target_compile_definitions (torch_hip PRIVATE
1385
1378
USE_FLASH_ATTENTION
@@ -1713,7 +1706,7 @@ if(USE_ROCM)
1713
1706
target_link_libraries (torch_hip PRIVATE ${Caffe2_HIP_DEPENDENCY_LIBS} )
1714
1707
1715
1708
# Since PyTorch files contain HIP headers, this is also needed to capture the includes.
1716
- target_include_directories (torch_hip PRIVATE ${Caffe2_HIP_INCLUDE} )
1709
+ target_include_directories (torch_hip PRIVATE ${Caffe2_HIP_INCLUDE} ${ROCM_INCLUDE} )
1717
1710
target_include_directories (torch_hip INTERFACE $< INSTALL_INTERFACE:include> )
1718
1711
endif ()
1719
1712
Original file line number Diff line number Diff line change @@ -165,6 +165,12 @@ if(HIP_FOUND)
165
165
endif ()
166
166
find_package_and_print_version (hipblaslt REQUIRED )
167
167
168
+ list (APPEND ROCM_INCLUDE ${rocthrust_INCLUDE_DIR} )
169
+ list (APPEND ROCM_INCLUDE ${rocprim_INCLUDE_DIR} )
170
+ list (APPEND ROCM_INCLUDE ${hipcub_INCLUDE_DIR} )
171
+ list (APPEND ROCM_INCLUDE ${rocRAND_INCLUDE_DIR} )
172
+ list (APPEND ROCM_INCLUDE ${INTERFACE_INCLUDE_DIRECTORIES} )
173
+
168
174
if (UNIX )
169
175
find_package_and_print_version (rccl )
170
176
find_package_and_print_version (hsa-runtime64 REQUIRED )
You can’t perform that action at this time.
0 commit comments