Skip to content

Commit 7ed2599

Browse files
[Core] Rename byte_mlperf to general task (bytedance#40)
* update general perf * update general perf * update * add ByteMLPerf Inference * update * [Core] Add llm_perf into byte_infer_perf Signed-off-by: MikuGhoul <[email protected]> --------- Signed-off-by: MikuGhoul <[email protected]> Co-authored-by: N <[email protected]>
1 parent 942c43d commit 7ed2599

File tree

434 files changed

+24161
-392
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

434 files changed

+24161
-392
lines changed

.gitignore

+11-11
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,17 @@ __pycache__
66
*.npy
77
*.tar
88
span.log
9-
byte_mlperf/tools/venv/
10-
byte_mlperf/backends/*/venv/
11-
byte_mlperf/model_zoo/*
12-
!byte_mlperf/model_zoo/*.json
13-
byte_mlperf/download/*.*
14-
!byte_mlperf/download/README.md
15-
byte_mlperf/datasets/open_imagenet/preprocessed/
16-
byte_mlperf/datasets/*
17-
!byte_mlperf/datasets/fake_dataset
9+
byte_infer_perf/general_perf/tools/venv/
10+
byte_infer_perf/general_perf/backends/*/venv/
11+
byte_infer_perf/general_perf/model_zoo/*
12+
!byte_infer_perf/general_perf/model_zoo/*.json
13+
byte_infer_perf/general_perf/download/*.*
14+
!byte_infer_perf/general_perf/download/README.md
15+
byte_infer_perf/general_perf/datasets/open_imagenet/preprocessed/
16+
byte_infer_perf/general_perf/datasets/*
17+
!byte_infer_perf/general_perf/datasets/fake_dataset
1818
!*.py
19-
byte_mlperf/reports/*
20-
!byte_mlperf/reports/README
19+
byte_infer_perf/general_perf/reports/*
20+
!byte_infer_perf/general_perf/_inference/general_perf/reports/README
2121
format_code.sh
2222
init_env.sh

NOTICE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
ByteMlperf
1+
ByteMLPerf
22
Copyright 2023 ByteDance Ltd. and/or its affiliates.

README.md

+7-13
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<div align="center">
2-
<img src="byte_mlperf/images/icon.png">
2+
<img src="docs/images/icon.png">
33
</div>
44

55

@@ -20,11 +20,11 @@ python3 launch.py --task xxx --hardware_type xxx
2020

2121
1. task
2222
--task parameter is the name of the incoming workload. You need to specify the workload. For example, if you would like to evaluate the workload: bert-tf-fp16.json, you need to specify --task bert-tf-fp16.
23-
Note: All workloads are defined under byte_mlperf/workloads, and the name needs to be aligned with the file name when passing parameters. The current format is model-framework-precision.
23+
Note: All workloads are defined under general_perf/workloads, and the name needs to be aligned with the file name when passing parameters. The current format is model-framework-precision.
2424

2525
2. hardware_type
2626
--hardware_type parameter is the incoming hardware_type name, there is no default value, it must be specified by the user. Example: To evaluate Habana Goya, specify --hardware_type GOYA .
27-
Note: All hardware types are defined under byte_mlperf/backends, and the name needs to be aligned with the folder name when passing parameters.
27+
Note: All hardware types are defined under general_perf/backends, and the name needs to be aligned with the folder name when passing parameters.
2828

2929
3. compile_only
3030
--compile_only parameter will make task stoped once compilation is finished
@@ -100,16 +100,10 @@ ByteMLPerf Vendor Backend List will be shown below
100100
| Vendor | SKU | Key Parameters | Supplement |
101101
| :---- | :----| :---- | :---- |
102102
| Intel | Xeon | - | - |
103-
| Stream Computing | STC P920 | <li>Computation Power:128 TFLOPS@FP16 <li> Last Level Buffer: 8MB, 256GB/s <li>Level 1 Buffer: 1.25MB, 512GB/s <li> Memory: 16GB, 119.4GB/S <li> Host Interface:PCIe 4, 16x, 32GB/s <li> TDP: 160W | [STC Introduction](byte_mlperf/backends/STC/README.md) |
104-
| Graphcore | Graphcore® C600 | <li>Compute: 280 TFLOPS@FP16, 560 TFLOPS@FP8 <li> In Processor Memory: 900 MB, 52 TB/s <li> Host Interface: Dual PCIe Gen4 8-lane interfaces, 32GB/s <li> TDP: 185W | [IPU Introduction](byte_mlperf/backends/IPU/README.md) |
105-
| Moffett-AI | Moffett-AI S30 | <li>Compute: 1440 (32x-Sparse) TFLOPS@BF16, 2880 (32x-Sparse) TOPS@INT8, <li> Memory: 60 GB, <li> Host Interface: Dual PCIe Gen4 8-lane interfaces, 32GB/s <li> TDP: 250W | [SPU Introduction](byte_mlperf/backends/SPU/README.md) |
106-
| Habana | Gaudi2 | <li>24 Tensor Processor Cores, Dual matrix multiplication engines <li> Memory: 96 GB HBM2E, 48MB SRAM | [HPU Introduction](byte_mlperf/backends/HPU/README.md) |
107-
108-
## Benchmark Summary
109-
Benchmark Result Summary : QPS Perspective
110-
<div align="center">
111-
<img src="byte_mlperf/reports/reports_summary.png">
112-
</div>
103+
| Stream Computing | STC P920 | <li>Computation Power:128 TFLOPS@FP16 <li> Last Level Buffer: 8MB, 256GB/s <li>Level 1 Buffer: 1.25MB, 512GB/s <li> Memory: 16GB, 119.4GB/S <li> Host Interface:PCIe 4, 16x, 32GB/s <li> TDP: 160W | [STC Introduction](byte_infer_perf/general_perf/backends/STC/README.md) |
104+
| Graphcore | Graphcore® C600 | <li>Compute: 280 TFLOPS@FP16, 560 TFLOPS@FP8 <li> In Processor Memory: 900 MB, 52 TB/s <li> Host Interface: Dual PCIe Gen4 8-lane interfaces, 32GB/s <li> TDP: 185W | [IPU Introduction](byte_infer_perf/general_perf/backends/IPU/README.md) |
105+
| Moffett-AI | Moffett-AI S30 | <li>Compute: 1440 (32x-Sparse) TFLOPS@BF16, 2880 (32x-Sparse) TOPS@INT8, <li> Memory: 60 GB, <li> Host Interface: Dual PCIe Gen4 8-lane interfaces, 32GB/s <li> TDP: 250W | [SPU Introduction](byte_infer_perf/general_perf/backends/SPU/README.md) |
106+
| Habana | Gaudi2 | <li>24 Tensor Processor Cores, Dual matrix multiplication engines <li> Memory: 96 GB HBM2E, 48MB SRAM | [HPU Introduction](byte_infer_perf/general_perf/backends/HPU/README.md) |
113107

114108
## Statement
115109
[ASF Statement on Compliance with US Export Regulations and Entity List](https://news.apache.org/foundation/entry/statement-by-the-apache-software)

README.zh_CN.md

+10-12
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<div align="center">
2-
<img src="byte_mlperf/images/icon.png">
2+
<img src="docs/images/icon.png">
33
</div>
44

55

@@ -19,11 +19,11 @@ python3 launch.py --task xxx --hardware_type xxx
1919

2020
1. tasks
2121
--task 参数为传入的workload 名字,需要指定评估workload,例如:若要评估 open_bert-tf-fp16.json 定义的 workload,则需指定 --task open_bert-tf-fp16 。
22-
注:所有workload定义在byte_mlperf/workloads下,传参时名字需要和文件名对齐。目前格式为model-framework-precision。
22+
注:所有workload定义在general_perf/workloads下,传参时名字需要和文件名对齐。目前格式为model-framework-precision。
2323

2424
2. hardware_type
2525
--hardware_type 参数为传入的hardware_type 名字,无默认值,必须用户指定。例如:若要评估 Habana Goya ,则需指定 --hardware_type GOYA 。
26-
注:所有hardware type定义在byte_mlperf/backends下,传参时名字需要和folder名对齐。
26+
注:所有hardware type定义在general_perf/backends下,传参时名字需要和folder名对齐。
2727

2828
3. compile_only
2929
--compile_only 参数将在模型编译完成后停止任务
@@ -99,13 +99,11 @@ ByteIR 编译支持的模型列表:
9999
| Vendor | SKU | Key Parameters | Supplement |
100100
| :---- | :----| :---- | :---- |
101101
| Intel | Xeon | - | - |
102-
| Stream Computing | STC P920 | <li>Computation Power:128 TFLOPS@FP16 <li> Last Level Buffer: 8MB, 256GB/s <li>Level 1 Buffer: 1.25MB, 512GB/s <li> Memory: 16GB, 119.4GB/S <li> Host Interface:PCIe 4, 16x, 32GB/s <li> TDP: 160W | [STC Introduction](byte_mlperf/backends/STC/README.md) |
103-
| Graphcore | Graphcore® C600 | <li>Compute: 280 TFLOPS@FP16, 560 TFLOPS@FP8 <li> In Processor Memory: 900 MB, 52 TB/s <li> Host Interface: Dual PCIe Gen4 8-lane interfaces, 32GB/s <li> TDP: 185W | [IPU Introduction](byte_mlperf/backends/IPU/README.zh_CN.md) |
104-
| Moffett-AI | Moffett-AI S30 | <li>Compute: 1440 (32x-Sparse) TFLOPS@BF16, 2880 (32x-Sparse) TOPS@INT8, <li> Memory: 60 GB, <li> Host Interface: Dual PCIe Gen4 8-lane interfaces, 32GB/s <li> TDP: 250W | [SPU Introduction](byte_mlperf/backends/SPU/README.md) |
105-
| Habana | Gaudi2 | <li>24 Tensor Processor Cores, Dual matrix multiplication engines <li> Memory: 96 GB HBM2E, 48MB SRAM | [HPU Introduction](byte_mlperf/backends/HPU/README.md) |
102+
| Stream Computing | STC P920 | <li>Computation Power:128 TFLOPS@FP16 <li> Last Level Buffer: 8MB, 256GB/s <li>Level 1 Buffer: 1.25MB, 512GB/s <li> Memory: 16GB, 119.4GB/S <li> Host Interface:PCIe 4, 16x, 32GB/s <li> TDP: 160W | [STC Introduction](byte_infer_perf/general_perf/backends/STC/README.md) |
103+
| Graphcore | Graphcore® C600 | <li>Compute: 280 TFLOPS@FP16, 560 TFLOPS@FP8 <li> In Processor Memory: 900 MB, 52 TB/s <li> Host Interface: Dual PCIe Gen4 8-lane interfaces, 32GB/s <li> TDP: 185W | [IPU Introduction](byte_infer_perf/general_perf/backends/IPU/README.zh_CN.md) |
104+
| Moffett-AI | Moffett-AI S30 | <li>Compute: 1440 (32x-Sparse) TFLOPS@BF16, 2880 (32x-Sparse) TOPS@INT8, <li> Memory: 60 GB, <li> Host Interface: Dual PCIe Gen4 8-lane interfaces, 32GB/s <li> TDP: 250W | [SPU Introduction](byte_infer_perf/general_perf/backends/SPU/README.md) |
105+
| Habana | Gaudi2 | <li>24 Tensor Processor Cores, Dual matrix multiplication engines <li> Memory: 96 GB HBM2E, 48MB SRAM | [HPU Introduction](byte_infer_perf/general_perf/backends/HPU/README.md) |
106106

107-
## Benchmark Summary
108-
评估结果汇总 : QPS 视图
109-
<div align="center">
110-
<img src="byte_mlperf/reports/reports_summary.png">
111-
</div>
107+
108+
## Statement
109+
[ASF Statement on Compliance with US Export Regulations and Entity List](https://news.apache.org/foundation/entry/statement-by-the-apache-software)

byte_mlperf/README.md byte_infer_perf/general_perf/README.md

+7-13
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<div align="center">
2-
<img src="byte_mlperf/images/icon.png">
2+
<img src="docs/images/icon.png">
33
</div>
44

55

@@ -19,11 +19,11 @@ python3 launch.py --task xxx --hardware_type xxx
1919

2020
1. task
2121
--task parameter is the name of the incoming workload. You need to specify the workload. For example, if you would like to evaluate the workload: bert-tf-fp16.json, you need to specify --task bert-tf-fp16.
22-
Note: All workloads are defined under byte_mlperf/workloads, and the name needs to be aligned with the file name when passing parameters. The current format is model-framework-precision.
22+
Note: All workloads are defined under general_perf/workloads, and the name needs to be aligned with the file name when passing parameters. The current format is model-framework-precision.
2323

2424
2. hardware_type
2525
--hardware_type parameter is the incoming hardware_type name, there is no default value, it must be specified by the user. Example: To evaluate Habana Goya, specify --hardware_type GOYA .
26-
Note: All hardware types are defined under byte_mlperf/backends, and the name needs to be aligned with the folder name when passing parameters.
26+
Note: All hardware types are defined under general_perf/backends, and the name needs to be aligned with the folder name when passing parameters.
2727

2828
3. compile_only
2929
--compile_only parameter will make task stoped once compilation is finished
@@ -99,16 +99,10 @@ ByteMLPerf Vendor Backend List will be shown below
9999
| Vendor | SKU | Key Parameters | Supplement |
100100
| :---- | :----| :---- | :---- |
101101
| Intel | Xeon | - | - |
102-
| Stream Computing | STC P920 | <li>Computation Power:128 TFLOPS@FP16 <li> Last Level Buffer: 8MB, 256GB/s <li>Level 1 Buffer: 1.25MB, 512GB/s <li> Memory: 16GB, 119.4GB/S <li> Host Interface:PCIe 4, 16x, 32GB/s <li> TDP: 160W | [STC Introduction](byte_mlperf/backends/STC/README.md) |
103-
| Graphcore | Graphcore® C600 | <li>Compute: 280 TFLOPS@FP16, 560 TFLOPS@FP8 <li> In Processor Memory: 900 MB, 52 TB/s <li> Host Interface: Dual PCIe Gen4 8-lane interfaces, 32GB/s <li> TDP: 185W | [IPU Introduction](byte_mlperf/backends/IPU/README.md) |
104-
| Moffett-AI | Moffett-AI S30 | <li>Compute: 1440 (32x-Sparse) TFLOPS@BF16, 2880 (32x-Sparse) TOPS@INT8, <li> Memory: 60 GB, <li> Host Interface: Dual PCIe Gen4 8-lane interfaces, 32GB/s <li> TDP: 250W | [SPU Introduction](byte_mlperf/backends/SPU/README.md) |
105-
| Habana | Gaudi2 | <li>24 Tensor Processor Cores, Dual matrix multiplication engines <li> Memory: 96 GB HBM2E, 48MB SRAM | [HPU Introduction](byte_mlperf/backends/HPU/README.md) |
106-
107-
## Benchmark Summary
108-
Benchmark Result Summary : QPS Perspective
109-
<div align="center">
110-
<img src="byte_mlperf/reports/reports_summary.png">
111-
</div>
102+
| Stream Computing | STC P920 | <li>Computation Power:128 TFLOPS@FP16 <li> Last Level Buffer: 8MB, 256GB/s <li>Level 1 Buffer: 1.25MB, 512GB/s <li> Memory: 16GB, 119.4GB/S <li> Host Interface:PCIe 4, 16x, 32GB/s <li> TDP: 160W | [STC Introduction](general_perf/backends/STC/README.md) |
103+
| Graphcore | Graphcore® C600 | <li>Compute: 280 TFLOPS@FP16, 560 TFLOPS@FP8 <li> In Processor Memory: 900 MB, 52 TB/s <li> Host Interface: Dual PCIe Gen4 8-lane interfaces, 32GB/s <li> TDP: 185W | [IPU Introduction](general_perf/backends/IPU/README.md) |
104+
| Moffett-AI | Moffett-AI S30 | <li>Compute: 1440 (32x-Sparse) TFLOPS@BF16, 2880 (32x-Sparse) TOPS@INT8, <li> Memory: 60 GB, <li> Host Interface: Dual PCIe Gen4 8-lane interfaces, 32GB/s <li> TDP: 250W | [SPU Introduction](general_perf/backends/SPU/README.md) |
105+
| Habana | Gaudi2 | <li>24 Tensor Processor Cores, Dual matrix multiplication engines <li> Memory: 96 GB HBM2E, 48MB SRAM | [HPU Introduction](general_perf/backends/HPU/README.md) |
112106

113107
## Statement
114108
[ASF Statement on Compliance with US Export Regulations and Entity List](https://news.apache.org/foundation/entry/statement-by-the-apache-software)

byte_mlperf/README.zh_CN.md byte_infer_perf/general_perf/README.zh_CN.md

+7-13
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<div align="center">
2-
<img src="byte_mlperf/images/icon.png">
2+
<img src="docs/images/icon.png">
33
</div>
44

55

@@ -19,11 +19,11 @@ python3 launch.py --task xxx --hardware_type xxx
1919

2020
1. tasks
2121
--task 参数为传入的workload 名字,需要指定评估workload,例如:若要评估 open_bert-tf-fp16.json 定义的 workload,则需指定 --task open_bert-tf-fp16 。
22-
注:所有workload定义在byte_mlperf/workloads下,传参时名字需要和文件名对齐。目前格式为model-framework-precision。
22+
注:所有workload定义在general_perf/workloads下,传参时名字需要和文件名对齐。目前格式为model-framework-precision。
2323

2424
2. hardware_type
2525
--hardware_type 参数为传入的hardware_type 名字,无默认值,必须用户指定。例如:若要评估 Habana Goya ,则需指定 --hardware_type GOYA 。
26-
注:所有hardware type定义在byte_mlperf/backends下,传参时名字需要和folder名对齐。
26+
注:所有hardware type定义在general_perf/backends下,传参时名字需要和folder名对齐。
2727

2828
3. compile_only
2929
--compile_only 参数将在模型编译完成后停止任务
@@ -99,13 +99,7 @@ ByteIR 编译支持的模型列表:
9999
| Vendor | SKU | Key Parameters | Supplement |
100100
| :---- | :----| :---- | :---- |
101101
| Intel | Xeon | - | - |
102-
| Stream Computing | STC P920 | <li>Computation Power:128 TFLOPS@FP16 <li> Last Level Buffer: 8MB, 256GB/s <li>Level 1 Buffer: 1.25MB, 512GB/s <li> Memory: 16GB, 119.4GB/S <li> Host Interface:PCIe 4, 16x, 32GB/s <li> TDP: 160W | [STC Introduction](byte_mlperf/backends/STC/README.md) |
103-
| Graphcore | Graphcore® C600 | <li>Compute: 280 TFLOPS@FP16, 560 TFLOPS@FP8 <li> In Processor Memory: 900 MB, 52 TB/s <li> Host Interface: Dual PCIe Gen4 8-lane interfaces, 32GB/s <li> TDP: 185W | [IPU Introduction](byte_mlperf/backends/IPU/README.zh_CN.md) |
104-
| Moffett-AI | Moffett-AI S30 | <li>Compute: 1440 (32x-Sparse) TFLOPS@BF16, 2880 (32x-Sparse) TOPS@INT8, <li> Memory: 60 GB, <li> Host Interface: Dual PCIe Gen4 8-lane interfaces, 32GB/s <li> TDP: 250W | [SPU Introduction](byte_mlperf/backends/SPU/README.md) |
105-
| Habana | Gaudi2 | <li>24 Tensor Processor Cores, Dual matrix multiplication engines <li> Memory: 96 GB HBM2E, 48MB SRAM | [HPU Introduction](byte_mlperf/backends/HPU/README.md) |
106-
107-
## Benchmark Summary
108-
评估结果汇总 : QPS 视图
109-
<div align="center">
110-
<img src="byte_mlperf/reports/reports_summary.png">
111-
</div>
102+
| Stream Computing | STC P920 | <li>Computation Power:128 TFLOPS@FP16 <li> Last Level Buffer: 8MB, 256GB/s <li>Level 1 Buffer: 1.25MB, 512GB/s <li> Memory: 16GB, 119.4GB/S <li> Host Interface:PCIe 4, 16x, 32GB/s <li> TDP: 160W | [STC Introduction](byte_infer_perf/general_perf/backends/STC/README.md) |
103+
| Graphcore | Graphcore® C600 | <li>Compute: 280 TFLOPS@FP16, 560 TFLOPS@FP8 <li> In Processor Memory: 900 MB, 52 TB/s <li> Host Interface: Dual PCIe Gen4 8-lane interfaces, 32GB/s <li> TDP: 185W | [IPU Introduction](byte_infer_perf/general_perf/backends/IPU/README.zh_CN.md) |
104+
| Moffett-AI | Moffett-AI S30 | <li>Compute: 1440 (32x-Sparse) TFLOPS@BF16, 2880 (32x-Sparse) TOPS@INT8, <li> Memory: 60 GB, <li> Host Interface: Dual PCIe Gen4 8-lane interfaces, 32GB/s <li> TDP: 250W | [SPU Introduction](byte_infer_perf/general_perf/backends/SPU/README.md) |
105+
| Habana | Gaudi2 | <li>24 Tensor Processor Cores, Dual matrix multiplication engines <li> Memory: 96 GB HBM2E, 48MB SRAM | [HPU Introduction](byte_infer_perf/general_perf/backends/HPU/README.md) |

byte_mlperf/__init__.py byte_infer_perf/general_perf/__init__.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import sys
22
from packaging.version import parse
3+
import warnings
34

45
from .version import __version__
56

@@ -44,10 +45,10 @@ def digit_version(version_str: str, length: int = 4):
4445
return tuple(release)
4546

4647
python3_minimum_version = '3.6.0'
47-
python_version = digit_version(sys.version[:5])
48+
python_version = digit_version(sys.version.split()[0])
4849

4950
assert (python_version >= digit_version(python3_minimum_version)), \
50-
f'PYTHON=={sys.version[:5]} is used but incompatible. ' \
51+
f'PYTHON=={sys.version.split()[0]} is used but incompatible. ' \
5152
f'Please install python>={python3_minimum_version}.'
5253

5354
__all__ = ['__version__']

byte_mlperf/backends/CPU/calculate_cpu_diff.py byte_infer_perf/general_perf/backends/CPU/calculate_cpu_diff.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
os.chdir(BYTE_MLPERF_ROOT)
99
sys.path.insert(0, BYTE_MLPERF_ROOT)
1010

11-
from byte_mlperf.core.configs.workload_store import load_workload
12-
from byte_mlperf.core.configs.dataset_store import load_dataset
13-
from byte_mlperf.core.configs.backend_store import init_compile_backend, init_runtime_backend
11+
from general_perf.core.configs.workload_store import load_workload
12+
from general_perf.core.configs.dataset_store import load_dataset
13+
from general_perf.core.configs.backend_store import init_compile_backend, init_runtime_backend
1414

1515
logging.basicConfig(level=logging.INFO)
1616
log = logging.getLogger("CPUBase")
@@ -54,7 +54,7 @@ def start_engine(self):
5454

5555
def workload_perf(self, workload):
5656
# set reports dir
57-
output_dir = os.path.abspath('byte_mlperf/reports/' + self.args.hardware_type +
57+
output_dir = os.path.abspath('general_perf/reports/' + self.args.hardware_type +
5858
'/' + workload['model'])
5959
os.makedirs(output_dir, exist_ok=True)
6060

@@ -89,14 +89,14 @@ def workload_perf(self, workload):
8989
return
9090

9191
def get_accuracy_checker(self, dataset_name: str):
92-
AccuracyChecker = importlib.import_module('byte_mlperf.datasets.' +
92+
AccuracyChecker = importlib.import_module('general_perf.datasets.' +
9393
dataset_name +
9494
".test_accuracy")
9595
AccuracyChecker = getattr(AccuracyChecker, 'AccuracyChecker')
9696
return AccuracyChecker()
9797

9898
def get_model_info(self, model_name: str):
99-
with open("byte_mlperf/model_zoo/" + model_name + '.json', 'r') as f:
99+
with open("general_perf/model_zoo/" + model_name + '.json', 'r') as f:
100100
model_info = json.load(f)
101101
return model_info
102102

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!bin/bash
2+
if [ ! -d "general_perf/backends/CPU/venv" ];then
3+
virtualenv -p python3 general_perf/backends/CPU/venv
4+
source general_perf/backends/CPU/venv/bin/activate
5+
general_perf/backends/CPU/venv/bin/python3 -m pip install --upgrade pip -q
6+
general_perf/backends/CPU/venv/bin/python3 -m pip install -r general_perf/backends/CPU/requirements.txt -q
7+
else
8+
source general_perf/backends/CPU/venv/bin/activate
9+
general_perf/backends/CPU/venv/bin/python3 -m pip install -r general_perf/backends/CPU/requirements.txt -q
10+
fi
11+
12+
python3 general_perf/backends/CPU/calculate_cpu_diff.py --task $1 --batch_size $2

byte_mlperf/backends/CPU/compile_backend_cpu.py byte_infer_perf/general_perf/backends/CPU/compile_backend_cpu.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import time
99
import numpy as np
1010

11-
from byte_mlperf.backends import compile_backend
11+
from general_perf.backends import compile_backend
1212

1313
log = logging.getLogger("CompileBackendCPU")
1414

@@ -80,7 +80,7 @@ def compile(self, config, dataloader=None):
8080

8181
def get_interact_profile(self, config):
8282
model_profile = []
83-
file_path = "byte_mlperf/backends/CPU/" + self.hardware_type + '.json'
83+
file_path = "general_perf/backends/CPU/" + self.hardware_type + '.json'
8484
if os.path.exists(file_path):
8585
with open(file_path, 'r') as f:
8686
model_profile = json.load(f)

0 commit comments

Comments
 (0)