add riscv64 support

This commit is contained in:
zhangxiang 2023-08-02 11:12:45 +08:00
parent 81c59d4ef1
commit 96f5ebfac6
2 changed files with 45 additions and 2 deletions

37
add-riscv64-support.patch Normal file
View File

@ -0,0 +1,37 @@
diff -ur A-Tune-v1.0.0/Makefile A-Tune-v1.0.0/Makefile
--- A-Tune-v1.0.0/Makefile 2023-08-02 09:56:24.899756693 +0800
+++ A-Tune-v1.0.0/Makefile 2023-08-02 10:16:38.822243233 +0800
@@ -38,7 +38,7 @@
go build -mod=vendor -v $(GOFLAGS) -o $(PKGPATH)/atuned cmd/atuned/*.go
modules:
- cd ${CURDIR}/modules/server/profile/ && go build -mod=vendor -v $(GOFLAGS) -buildmode=plugin -o ${CURDIR}/pkg/daemon_profile_server.so *.go
+ cd ${CURDIR}/modules/server/profile/ && go build -mod=vendor -v $(GOFLAGS) -o ${CURDIR}/pkg/daemon_profile_server.so *.go
clean:
rm -rf $(PKGPATH)/*
diff -ur A-Tune-v1.0.0/modules/server/profile/profile.go A-Tune-v1.0.0/modules/server/profile/profile.go
--- A-Tune-v1.0.0/modules/server/profile/profile.go 2021-11-15 16:11:32.000000000 +0800
+++ A-Tune-v1.0.0/modules/server/profile/profile.go 2023-08-02 10:35:58.020598632 +0800
@@ -96,7 +96,8 @@
ScriptPath string
Raw *ini.File
}
-
+func main() {
+ }
func init() {
svc := SVC.ProfileService{
Name: "opt.profile",
diff -ur A-Tune-v1.0.0/vendor/github.com/mattn/go-sqlite3/sqlite3-binding.c A-Tune-v1.0.0/vendor/github.com/mattn/go-sqlite3/sqlite3-binding.c
--- A-Tune-v1.0.0/vendor/github.com/mattn/go-sqlite3/sqlite3-binding.c 2021-11-15 16:11:32.000000000 +0800
+++ A-Tune-v1.0.0/vendor/github.com/mattn/go-sqlite3/sqlite3-binding.c 2023-08-02 09:56:51.379811561 +0800
@@ -14000,7 +14000,7 @@
# if defined(i386) || defined(__i386__) || defined(_M_IX86) || \
defined(__x86_64) || defined(__x86_64__) || defined(_M_X64) || \
defined(_M_AMD64) || defined(_M_ARM) || defined(__x86) || \
- defined(__ARMEL__) || defined(__AARCH64EL__) || defined(_M_ARM64)
+ defined(__ARMEL__) || defined(__AARCH64EL__) || defined(_M_ARM64) || defined(_M_RISCV64)
# define SQLITE_BYTEORDER 1234
# elif defined(sparc) || defined(__ppc__) || \
defined(__ARMEB__) || defined(__AARCH64EB__)

View File

@ -3,7 +3,7 @@
Summary: AI auto tuning system
Name: atune
Version: 1.0.0
Release: 10
Release: 11
License: MulanPSL-2.0
URL: https://gitee.com/openeuler/A-Tune
Source: https://gitee.com/openeuler/A-Tune/repository/archive/v%{version}.tar.gz
@ -13,7 +13,7 @@ Patch9001: add-FAQ-and-self-signature-certificate-manufacturing.patch
Patch9002: change-Makefile-A-Tune-version-to-1.0.0.patch
Patch9003: fix-start-failed-of-atuned-service.patch
Patch9004: A-Tune-Add-sw64-architecture.patch
Patch9005: add-riscv64-support.patch
BuildRequires: rpm-build golang-bin procps-ng
BuildRequires: sqlite >= 3.24.0 openssl
BuildRequires: python3-scikit-optimize python3-pandas python3-xgboost
@ -77,6 +77,9 @@ atune engine tool for manage atuned AI tuning system.
%ifarch sw_64
%patch9004 -p1
%endif
%ifarch riscv64
%patch9005 -p1
%endif
%build
%make_build
@ -166,6 +169,9 @@ atune engine tool for manage atuned AI tuning system.
%exclude /etc/atuned/rest_certs
%changelog
* Wed Aug 2 2023 zhangxiang <zhangxiang@iscas.ac.cn> - 1.0.0-11
- add riscv64 support
* Fri Apr 21 2023 yuxiangyang <yuxiangyang4@xfusion.com> - 1.0.0-10
- fix atune-engine process remaining after remove atune-engine.rpm