oneapi-oneccl/oneccl.spec
2025-01-06 22:28:29 +01:00

85 lines
2.3 KiB
RPMSpec

#
# spec file for package oneccl
#
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%define _openmpi_version 4
Name: oneccl
Version: 2021.14
Release: 0
Summary: oneAPI Collective Communications Library (oneCCL)
License: Apache-2.0
URL: https://github.com/oneapi-src/oneCCL
Source0: oneCCL-%{version}.tar.gz
BuildRequires: clang
BuildRequires: cmake
BuildRequires: gcc-c++
BuildRequires: libfabric-devel
BuildRequires: llvm-gold
BuildRequires: mpi-selector
BuildRequires: ninja
BuildRequires: openmpi%{_openmpi_version}-devel
%description
oneAPI Collective Communications Library (oneCCL) provides an efficient
implementation of communication patterns used in deep learning.
oneCCL is governed by the UXL Foundation and is an implementation of
the oneAPI specification.
%package devel
Summary: Development files for oneCCL
%description devel
oneAPI Collective Communications Library (oneCCL) provides an efficient
implementation of communication patterns used in deep learning.
This package contains the development files for oneCCL.
%prep
%autosetup -p1 -n oneCCL-%{version}
%build
source /etc/mpi-selector/data/openmpi%{_openmpi_version}.sh
# it can't build with gcc because of an intrinsic error
export CXX=mpic++
export CC=mpicc
%define __builder ninja
%cmake \
-DUSE_SECURITY_FLAGS=OFF \
-DBUILD_EXAMPLES=OFF \
-DBUILD_FT=OFF \
-DMPI_DIR=%{_prefix} \
-DLIBFABRIC_DIR=%{_prefix}
%cmake_build
%install
%cmake_install
%files devel
%dir %{_includedir}/oneapi
%{_includedir}/oneapi/ccl.hpp
%{_includedir}/oneapi/ccl/
%{_prefix}/lib/cmake/oneCCL/oneCCLConfig.cmake
%{_prefix}/lib/cmake/oneCCL/oneCCLConfigVersion.cmake
%changelog