Skip to content

Commit

Permalink
Merge pull request #101 from ksenyako/release/ccl_2021.11
Browse files Browse the repository at this point in the history
Intel(R) oneAPI Collective Communications Library (oneCCL) 2021.11
  • Loading branch information
ksenyako authored Nov 28, 2023
2 parents bfc8792 + 796b7ef commit 878328f
Show file tree
Hide file tree
Showing 243 changed files with 9,205 additions and 3,056 deletions.
10 changes: 6 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ endif()

option(BUILD_EXAMPLES "Build examples" TRUE)
option(BUILD_FT "Build functional tests" TRUE)
option(BUILD_REG_TESTS "Build regression tests" TRUE)
option(BUILD_CONFIG "Build cmake configs" TRUE)
option(ENABLE_MPI "Enable MPI support" TRUE)
option(ENABLE_MPI_TESTS "Enable MPI tests support" TRUE)
Expand Down Expand Up @@ -116,11 +115,12 @@ set(CCL_INSTALL_DOC "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DOCDIR}")
set(CCL_INSTALL_BIN "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR}")
set(CCL_INSTALL_ENV "${CMAKE_INSTALL_PREFIX}/env")
set(CCL_INSTALL_ETC "${CMAKE_INSTALL_PREFIX}/etc")
set(CCL_INSTALL_LICENSE "${CMAKE_INSTALL_PREFIX}/licensing")
set(CCL_INSTALL_SHARE "${CMAKE_INSTALL_PREFIX}/share")
set(CCL_INSTALL_LICENSE "${CCL_INSTALL_SHARE}/doc/ccl/licensing")
set(CCL_INSTALL_MODULE "${CMAKE_INSTALL_PREFIX}/modulefiles")
set(CCL_INSTALL_EXAMPLES "${CMAKE_INSTALL_PREFIX}/examples")
set(CCL_INSTALL_TESTS "${CMAKE_INSTALL_PREFIX}/tests")
set(CCL_INSTALL_KERNELS "${CMAKE_INSTALL_PREFIX}/lib/kernels")
set(CCL_INSTALL_KERNELS "${CMAKE_INSTALL_PREFIX}/lib/ccl/kernels")

# setup dependency directories
set(DEPS_DIR "${PROJECT_SOURCE_DIR}/deps")
Expand Down Expand Up @@ -302,7 +302,7 @@ file(GLOB spv_kernels "${PROJECT_SOURCE_DIR}/src/kernels/kernels.spv")
endif()

set(CCL_MAJOR_VERSION "2021")
set(CCL_MINOR_VERSION "10")
set(CCL_MINOR_VERSION "11")
set(CCL_UPDATE_VERSION "0")
set(CCL_PRODUCT_STATUS "Gold")
string(TIMESTAMP CCL_PRODUCT_BUILD_DATE "%Y-%m-%dT %H:%M:%SZ")
Expand Down Expand Up @@ -340,6 +340,8 @@ if (ENABLE_MPI_TESTS)
endif()
if (CCL_ENABLE_SYCL)
add_subdirectory(examples/sycl)
#TODO: add cpu support
add_subdirectory(examples/pt2pt)
endif()
endif()
if (BUILD_FT)
Expand Down
1 change: 1 addition & 0 deletions cmake/FindIntelSYCL_level_zero.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ find_path(INTEL_SYCL_INCLUDE_DIRS
PATHS
${sycl_root_hints}
"${INTEL_SYCL_BINARY_DIR}/.."
"${INTEL_SYCL_BINARY_DIR}/../opt/compiler"
PATH_SUFFIXES
include
include/sycl
Expand Down
17 changes: 13 additions & 4 deletions cmake/helpers.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ function(set_lp_env)
set(CLANG_BF16_AVX512BF_MIN_SUPPORTED "9.3.0")

if (${CMAKE_C_COMPILER_ID} STREQUAL "Intel"
OR (${CMAKE_C_COMPILER_ID} STREQUAL "IntelLLVM")
OR (${CMAKE_C_COMPILER_ID} STREQUAL "Clang"
AND NOT ${CMAKE_C_COMPILER_VERSION} VERSION_LESS ${CLANG_BF16_MIN_SUPPORTED})
OR (${CMAKE_C_COMPILER_ID} STREQUAL "GNU"
Expand All @@ -30,7 +31,8 @@ function(set_lp_env)
string(REGEX MATCH "([0-9]+)\\.([0-9]+)" BINUTILS_VERSION ${BINUTILS_VERSION_RAW})
message(STATUS "binutils version: " "${BINUTILS_VERSION}")

if ((${CMAKE_C_COMPILER_ID} STREQUAL "Intel"
if (((${CMAKE_C_COMPILER_ID} STREQUAL "Intel"
OR ${CMAKE_C_COMPILER_ID} STREQUAL "IntelLLVM")
AND NOT ${CMAKE_C_COMPILER_VERSION} VERSION_LESS ${ICC_BF16_AVX512BF_MIN_SUPPORTED})
OR (${CMAKE_C_COMPILER_ID} STREQUAL "Clang"
AND NOT ${CMAKE_C_COMPILER_VERSION} VERSION_LESS ${CLANG_BF16_AVX512BF_MIN_SUPPORTED})
Expand All @@ -46,7 +48,7 @@ function(set_lp_env)
message(STATUS "BF16 AVX512BF compiler: ${CCL_BF16_AVX512BF_COMPILER}")

if (CCL_BF16_COMPILER)
if ((${CMAKE_C_COMPILER_ID} STREQUAL "Clang" OR ${CMAKE_C_COMPILER_ID} STREQUAL "GNU"))
if ((${CMAKE_C_COMPILER_ID} STREQUAL "Clang" OR ${CMAKE_C_COMPILER_ID} STREQUAL "IntelLLVM" OR ${CMAKE_C_COMPILER_ID} STREQUAL "GNU"))
add_definitions(-DCCL_BF16_TARGET_ATTRIBUTES)
set(CCL_BF16_TARGET_ATTRIBUTES ON)
else()
Expand All @@ -66,6 +68,7 @@ function(set_lp_env)
set(CLANG_FP16_MIN_SUPPORTED "9.0.0")

if (${CMAKE_C_COMPILER_ID} STREQUAL "Intel"
OR (${CMAKE_C_COMPILER_ID} STREQUAL "IntelLLVM")
OR (${CMAKE_C_COMPILER_ID} STREQUAL "Clang"
AND NOT ${CMAKE_C_COMPILER_VERSION} VERSION_LESS ${CLANG_FP16_MIN_SUPPORTED})
OR (${CMAKE_C_COMPILER_ID} STREQUAL "GNU"
Expand All @@ -79,7 +82,8 @@ function(set_lp_env)
message(STATUS "FP16 compiler: ${CCL_FP16_COMPILER}")

if (CCL_FP16_COMPILER)
if ((${CMAKE_C_COMPILER_ID} STREQUAL "Clang" OR ${CMAKE_C_COMPILER_ID} STREQUAL "GNU"))
if ((${CMAKE_C_COMPILER_ID} STREQUAL "Clang" OR ${CMAKE_C_COMPILER_ID} STREQUAL "IntelLLVM"
OR ${CMAKE_C_COMPILER_ID} STREQUAL "GNU"))
add_definitions(-DCCL_FP16_TARGET_ATTRIBUTES)
set(CCL_FP16_TARGET_ATTRIBUTES ON)
else()
Expand All @@ -104,6 +108,7 @@ function(set_avx_env)
set(CLANG_AVX_MIN_SUPPORTED "9.0.0")

if (${CMAKE_C_COMPILER_ID} STREQUAL "Intel"
OR ${CMAKE_C_COMPILER_ID} STREQUAL "IntelLLVM"
OR (${CMAKE_C_COMPILER_ID} STREQUAL "Clang"
AND NOT ${CMAKE_C_COMPILER_VERSION} VERSION_LESS ${CLANG_AVX_MIN_SUPPORTED})
OR (${CMAKE_C_COMPILER_ID} STREQUAL "GNU"
Expand All @@ -117,7 +122,7 @@ function(set_avx_env)
message(STATUS "AVX compiler: ${CCL_AVX_COMPILER}")

if (CCL_AVX_COMPILER)
if ((${CMAKE_C_COMPILER_ID} STREQUAL "Clang" OR ${CMAKE_C_COMPILER_ID} STREQUAL "GNU"))
if ((${CMAKE_C_COMPILER_ID} STREQUAL "Clang" OR ${CMAKE_C_COMPILER_ID} STREQUAL "IntelLLVM" OR ${CMAKE_C_COMPILER_ID} STREQUAL "GNU"))
add_definitions(-DCCL_AVX_TARGET_ATTRIBUTES)
set(CCL_AVX_TARGET_ATTRIBUTES ON)
else()
Expand Down Expand Up @@ -148,6 +153,10 @@ function(check_compiler_version)
if(${CMAKE_C_COMPILER_VERSION} VERSION_LESS ${CLANG_MIN_SUPPORTED})
message(FATAL_ERROR "clang min supported version is ${CLANG_MIN_SUPPORTED}, current version ${CMAKE_C_COMPILER_VERSION}")
endif()
elseif(${CMAKE_C_COMPILER_ID} STREQUAL "IntelLLVM")
if(${CMAKE_C_COMPILER_VERSION} VERSION_LESS ${ICC_MIN_SUPPORTED})
message(FATAL_ERROR "icc min supported version is ${ICC_MIN_SUPPORTED}, current version ${CMAKE_C_COMPILER_VERSION}")
endif()
else()
message(WARNING "Compilation with ${CMAKE_C_COMPILER_ID} was not tested, no warranty")
endif()
Expand Down
4 changes: 2 additions & 2 deletions cmake/setvars.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -104,5 +104,5 @@ then
else
PATH="${CCL_ROOT}/bin:${PATH}"; export PATH
fi

FI_PROVIDER_PATH="${CCL_ROOT}/@CMAKE_INSTALL_LIBDIR@/prov:/usr/lib64/libfabric"; export FI_PROVIDER_PATH
LD_LIBRARY_PATH=$(prepend_path "${I_MPI_ROOT}/opt/mpi/libfabric/lib" "${LD_LIBRARY_PATH:-}") ; export LD_LIBRARY_PATH
FI_PROVIDER_PATH="${I_MPI_ROOT}/opt/mpi/libfabric/lib/prov:/usr/lib64/libfabric"; export FI_PROVIDER_PATH
18 changes: 7 additions & 11 deletions cmake/templates/oneCCLConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,19 @@
get_filename_component(_oneccl_root "${CMAKE_CURRENT_LIST_DIR}" REALPATH)
get_filename_component(_oneccl_root "${_oneccl_root}/../../../" ABSOLUTE)

set(_oneccl_subdir "cpu_gpu_dpcpp")

if (EXISTS "${CCL_CONFIGURATION}")
set(_oneccl_subdir "${CCL_CONFIGURATION}")
endif()

if (_oneccl_subdir EQUAL "cpu")
if ("$ENV{CCL_CONFIGURATION}" STREQUAL "cpu")
include(CheckCXXCompilerFlag)
check_cxx_compiler_flag("-fsycl" _fsycl_option)
if (_fsycl_option)
message(STATUS "STATUS: -fsycl not supported for CCL_CONFIGURATION=cpu")
endif()
endif()

get_filename_component(_oneccl_headers "${_oneccl_root}/include/${_oneccl_subdir}" ABSOLUTE)
get_filename_component(_oneccl_lib "${_oneccl_root}/lib/${_oneccl_subdir}/libccl.so" ABSOLUTE)
get_filename_component(_oneccl_headers "${_oneccl_root}/include" ABSOLUTE)
get_filename_component(_oneccl_lib "${_oneccl_root}/lib/ccl/cpu/lib/libccl.so" ABSOLUTE)
else()
get_filename_component(_oneccl_headers "${_oneccl_root}/include" ABSOLUTE)
get_filename_component(_oneccl_lib "${_oneccl_root}/lib/libccl.so" ABSOLUTE)
endif()

if (EXISTS "${_oneccl_headers}" AND EXISTS "${_oneccl_lib}")
if (NOT TARGET oneCCL)
Expand Down Expand Up @@ -60,4 +57,3 @@ else()
endif()
set(oneCCL_FOUND FALSE)
endif()

1 change: 1 addition & 0 deletions cmake/vars.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
# shellcheck shell=sh

get_script_path() (
script="$1"
Expand Down
Loading

0 comments on commit 878328f

Please sign in to comment.