From 90cb074656f98fbeb18fe1bbf8cacd96a04077d8 Mon Sep 17 00:00:00 2001 From: Wenlong Zhang Date: Sat, 4 Mar 2023 14:26:56 +0800 Subject: [PATCH] disable sse for loongarch64 Signed-off-by: Wenlong Zhang --- disable-sse-for-loongarch64.patch | 24 ++++++++++++++++++++++++ python-xgboost.spec | 8 ++++++-- 2 files changed, 30 insertions(+), 2 deletions(-) create mode 100644 disable-sse-for-loongarch64.patch diff --git a/disable-sse-for-loongarch64.patch b/disable-sse-for-loongarch64.patch new file mode 100644 index 0000000..827e21c --- /dev/null +++ b/disable-sse-for-loongarch64.patch @@ -0,0 +1,24 @@ +From 1c07b6c0a9dd62493b7bece0ff9dba1c1606fe32 Mon Sep 17 00:00:00 2001 +From: Wenlong Zhang +Date: Wed, 8 Feb 2023 15:47:15 +0800 +Subject: [PATCH] disable sse for loongarch64 + +--- + xgboost/make/config.mk | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/xgboost/make/config.mk b/xgboost/make/config.mk +index 6780eb1..ff2f21b 100644 +--- a/xgboost/make/config.mk ++++ b/xgboost/make/config.mk +@@ -43,7 +43,7 @@ USE_AZURE = 0 + # Settings for power and arm arch + #---------------------------- + ARCH := $(shell uname -a) +-ifneq (,$(filter $(ARCH), armv6l armv7l powerpc64le ppc64le aarch64 riscv64)) ++ifneq (,$(filter $(ARCH), armv6l armv7l powerpc64le ppc64le aarch64 riscv64 loongarch64)) + USE_SSE=0 + else + USE_SSE=1 +-- +2.33.0 diff --git a/python-xgboost.spec b/python-xgboost.spec index 1eca3d2..8ae9fb7 100644 --- a/python-xgboost.spec +++ b/python-xgboost.spec @@ -3,7 +3,7 @@ Name: python-%{pypi_name} Version: 0.90 -Release: 7 +Release: 8 Summary: Scalable, Portable and Distributed Gradient Boosting Library License: Apache-2.0 URL: https://github.com/dmlc/xgboost @@ -16,7 +16,8 @@ Requires: fontconfig fontpackages-filesystem Requires: libX11 libXau libXft libXrender libxcb Requires: %{_vendor}-rpm-config Requires: python3-devel python3-rpm-generators tk -Patch01: disable-sse-for-riscv.patch +Patch01: disable-sse-for-riscv.patch +Patch02: disable-sse-for-loongarch64.patch %global _description \ XGBoost is an optimized distributed gradient boosting library designed to be \ @@ -64,6 +65,9 @@ find %{buildroot} -name "*.py" -exec sed -i -r 's!/usr/bin/python(\s|$)!/usr/bin %{python3_sitearch}/%{pypi_name}-*.egg-info/ %changelog +* Sat Mar 04 2023 Wenlong Zhang - 0.90-8 +- disable sse for loongarch64 + * Thu Dec 22 2022 wanglin - 0.90-7 - Fix rpm-config hard code problem