Bugfix for undefined np symbol in ai4c-option-tuner.
This commit is contained in:
parent
61ceaf1a6a
commit
ba13da367e
@ -0,0 +1,38 @@
|
||||
From cce36baee7dc03d59355c1359e3653f4d695bc1a Mon Sep 17 00:00:00 2001
|
||||
From: liuf9 <liufeiyang6@huawei.com>
|
||||
Date: Sun, 8 Dec 2024 15:14:25 +0800
|
||||
Subject: [PATCH] Bugfix for undefined "np" symbol in ai4c-option-tuner.
|
||||
|
||||
---
|
||||
python/ai4c/option_tuner/xgboost_cost_model.py | 2 +-
|
||||
python/test/option_tuner/run_option_tuner.sh | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/python/ai4c/option_tuner/xgboost_cost_model.py b/python/ai4c/option_tuner/xgboost_cost_model.py
|
||||
index 06c3bea5..5f779c9d 100644
|
||||
--- a/python/ai4c/option_tuner/xgboost_cost_model.py
|
||||
+++ b/python/ai4c/option_tuner/xgboost_cost_model.py
|
||||
@@ -25,7 +25,7 @@ class XGBoostCostModel(object):
|
||||
def predict(self, xs: List[List[int]]):
|
||||
ret = []
|
||||
for x in xs:
|
||||
- ret.append(self.bst.predict(np.asarray([x]))[0])
|
||||
+ ret.append(self.bst.predict(asarray([x]))[0])
|
||||
return ret
|
||||
|
||||
|
||||
diff --git a/python/test/option_tuner/run_option_tuner.sh b/python/test/option_tuner/run_option_tuner.sh
|
||||
index baf00480..f36dcb5f 100644
|
||||
--- a/python/test/option_tuner/run_option_tuner.sh
|
||||
+++ b/python/test/option_tuner/run_option_tuner.sh
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
-ai4c-option-tune --test_limit 3 -r run_test.sh
|
||||
+ai4c-option-tune --test_limit 20 -r run_test.sh
|
||||
|
||||
### clean intermediate files ###
|
||||
if [ "$1" = "clean" ]; then
|
||||
--
|
||||
2.33.0
|
||||
|
||||
@ -15,13 +15,15 @@
|
||||
Summary: %{name} is a framework which enables compilers compilers to integrate ML-driven compiler optimization.
|
||||
Name: AI4C
|
||||
Version: 1.0.4
|
||||
Release: 1
|
||||
Release: 2
|
||||
# Package onnxruntime and SafeInt have MIT License.
|
||||
# Package onnx has Apache License 2.0.
|
||||
License: MIT and ASL 2.0 and Boost and BSD
|
||||
URL: https://gitee.com/openeuler/AI4C
|
||||
Source0: %{pkg_version}.tar.gz
|
||||
|
||||
Patch1: 0001-Bugfix-for-undefined-np-symbol-in-ai4c-option-tuner.patch
|
||||
|
||||
BuildRequires: cmake >= 3.13
|
||||
BuildRequires: make
|
||||
BuildRequires: gcc
|
||||
@ -109,6 +111,9 @@ pushd %{build_dir}/python
|
||||
|
||||
|
||||
%changelog
|
||||
* Sun Dec 08 2024 Feiyang Liu <liufeiyang6@huawei.com> - 1.0.4-2
|
||||
- Bugfix for undefined "np" symbol in ai4c-option-tuner.
|
||||
|
||||
* Wed Dec 04 2024 Feiyang Liu <liufeiyang6@huawei.com> - 1.0.4-1
|
||||
- Update AI4C from v1.0.3 to v1.0.4.
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user