workaround memoryType and change rccl config
This commit is contained in:
parent
82d81bca94
commit
7dc152450e
@ -212,12 +212,12 @@ endmacro(xgboost_link_nccl)
|
|||||||
|
|
||||||
macro(xgboost_link_rccl target)
|
macro(xgboost_link_rccl target)
|
||||||
if(BUILD_STATIC_LIB)
|
if(BUILD_STATIC_LIB)
|
||||||
target_include_directories(${target} PUBLIC ${RCCL_INCLUDE_DIR})
|
target_include_directories(${target} PUBLIC ${RCCL_INCLUDE_DIR}/rccl)
|
||||||
target_compile_definitions(${target} PUBLIC -DXGBOOST_USE_RCCL=1)
|
target_compile_definitions(${target} PUBLIC -DXGBOOST_USE_RCCL=1)
|
||||||
target_link_directories(${target} PUBLIC ${HIP_LIB_INSTALL_DIR})
|
target_link_directories(${target} PUBLIC ${HIP_LIB_INSTALL_DIR})
|
||||||
target_link_libraries(${target} PUBLIC ${RCCL_LIBRARY})
|
target_link_libraries(${target} PUBLIC ${RCCL_LIBRARY})
|
||||||
else()
|
else()
|
||||||
target_include_directories(${target} PRIVATE ${RCCL_INCLUDE_DIR})
|
target_include_directories(${target} PRIVATE ${RCCL_INCLUDE_DIR}/rccl)
|
||||||
target_compile_definitions(${target} PRIVATE -DXGBOOST_USE_RCCL=1)
|
target_compile_definitions(${target} PRIVATE -DXGBOOST_USE_RCCL=1)
|
||||||
target_link_directories(${target} PUBLIC ${HIP_LIB_INSTALL_DIR})
|
target_link_directories(${target} PUBLIC ${HIP_LIB_INSTALL_DIR})
|
||||||
target_link_libraries(${target} PRIVATE ${RCCL_LIBRARY})
|
target_link_libraries(${target} PRIVATE ${RCCL_LIBRARY})
|
||||||
|
|||||||
@ -1 +1 @@
|
|||||||
Subproject commit 6ceffde024f8752954550ebcca98caa24b5d158d
|
Subproject commit 2fea6734e83cf147c1bbe580ac4713cd50abcad5
|
||||||
@ -71,6 +71,7 @@ bool ArrayInterfaceHandler::IsCudaPtr(void const* ptr) {
|
|||||||
if (err == hipErrorInvalidValue) {
|
if (err == hipErrorInvalidValue) {
|
||||||
return false;
|
return false;
|
||||||
} else if (err == hipSuccess) {
|
} else if (err == hipSuccess) {
|
||||||
|
#if HIP_VERSION_MAJOR < 6
|
||||||
switch (attr.memoryType) {
|
switch (attr.memoryType) {
|
||||||
case hipMemoryTypeUnified:
|
case hipMemoryTypeUnified:
|
||||||
case hipMemoryTypeHost:
|
case hipMemoryTypeHost:
|
||||||
@ -78,6 +79,15 @@ bool ArrayInterfaceHandler::IsCudaPtr(void const* ptr) {
|
|||||||
default:
|
default:
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
switch (attr.type) {
|
||||||
|
case hipMemoryTypeUnified:
|
||||||
|
case hipMemoryTypeHost:
|
||||||
|
return false;
|
||||||
|
default:
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user