diff --git a/fairscale-0.4.13.tar.gz b/fairscale-0.4.13.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..69c0553da94d542243dfe68144daa63f5cc7ae48 Binary files /dev/null and b/fairscale-0.4.13.tar.gz differ diff --git a/python-fairscale.spec b/python-fairscale.spec new file mode 100644 index 0000000000000000000000000000000000000000..13c42701ad69e0f2baf8d5ed80f74cdbe8d93e20 --- /dev/null +++ b/python-fairscale.spec @@ -0,0 +1,66 @@ +%define anolis_release 1 +%global pypi_name fairscale +%global pypi_version 0.4.13 + +Name: python-%{pypi_name} +Version: %{pypi_version} +Release: %{anolis_release}%{?dist} +Summary: FairScale: A PyTorch library for large-scale and high-performance training + +License: BSD-3-Clause +URL: https://github.com/facebookresearch/fairscale +Source0: https://github.com/facebookresearch/fairscale/archive/refs/tags/v0.4.13.tar.gz#/fairscale-0.4.13.tar.gz +BuildArch: noarch + +BuildRequires: python3-devel +BuildRequires: python3-pip +BuildRequires: ninja-build +BuildRequires: python3dist(setuptools) +BuildRequires: python3dist(wheel) +BuildRequires: python3dist(numpy) +BuildRequires: pytorch pytorch-devel + +%description +FairScale is a PyTorch extension library for high performance and large scale +training on one or multiple machines/nodes. This library extends basic PyTorch +capabilities while adding new experimental ones. + +%package -n python3-%{pypi_name} +Summary: %{summary} +%{?python_provide:%python_provide python3-%{pypi_name}} + +Requires: python3dist(numpy) >= 1.22 +Requires: python3dist(setuptools) +Requires: pytorch >= 1.8 +%description -n python3-%{pypi_name} +FairScale is a PyTorch extension library for high performance and large scale +training on one or multiple machines/nodes. This library extends basic PyTorch +capabilities while adding new experimental ones. + + +%prep +%autosetup -n %{pypi_name}-%{pypi_version} +# Remove bundled egg-info +rm -rf %{pypi_name}.egg-info + +# Remove built-in dependency of ninja, since what pip install ninja +# has installed is an equivalent to ninja-build. +sed 's/setup_requires=\["ninja"\],//g' setup.py + +%build +%py3_build + +%install +%py3_install + +%files -n python3-%{pypi_name} +%license LICENSE +%doc README.md +%{_bindir}/wgit +%{python3_sitelib}/benchmarks +%{python3_sitelib}/%{pypi_name} +%{python3_sitelib}/%{pypi_name}-%{pypi_version}-py%{python3_version}.egg-info + +%changelog +* Tue Jan 09 2024 zhongling.h - 0.4.13-1 +- Initial package.