Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Commit f8b8f28

Browse files
committed
impoved ipex
1 parent dfd38aa commit f8b8f28

File tree

3 files changed

+12
-9
lines changed

3 files changed

+12
-9
lines changed

dl_bench/llm.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import math
44

55
import torch
6-
# import intel_extension_for_pytorch as ipex
76
import numpy as np
87
from transformers import (
98
AutoModelForCausalLM,

scripts/margin.sh

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ export ONEDNN_VERBOSE=0
1212
for i in 1 2 3 4 5 6 7
1313
do
1414
CNNS=(resnet50)
15-
for COMPILER in dynamo ipex_onednn_graph
15+
for COMPILER in ipex_onednn_graph
1616
do
17-
for DTYPE in float32 bfloat16
17+
for DTYPE in bfloat16
1818
do
19-
for BS in 0001 0032 0128
19+
for BS in 0001 0016 0032 0064 0128
2020
do
2121
for name in "${CNNS[@]}"
2222
do
@@ -28,15 +28,18 @@ do
2828
done
2929

3030

31-
LLMS=(gptj)
31+
LLMS=(gptj llama2-7b)
3232
for COMPILER in dynamo ipex
3333
do
34-
for DTYPE in float32 bfloat16
34+
for BS in 0001 0004 0008
3535
do
36-
for name in "${LLMS[@]}"
36+
for DTYPE in bfloat16
3737
do
38-
echo "Benchmark $name with DTYPE=$DTYPE"
39-
numactl -N 1 benchmark-run -b llm -p "name='${name}'" --dtype "${DTYPE}" --benchmark_desc "${name}_bs$BS" --host "${HOST}" -c "${COMPILER}" --skip_verification
38+
for name in "${LLMS[@]}"
39+
do
40+
echo "Benchmark $name with DTYPE=$DTYPE"
41+
numactl -N 1 benchmark-run -b llm -p "name='${name}',batch_size=${BS}" --dtype "${DTYPE}" --benchmark_desc "${name}_bs$BS" --host "${HOST}" -c "${COMPILER}" --skip_verification
42+
done
4043
done
4144
done
4245
done

scripts/margin_setup.sh

100644100755
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ conda activate margin
1616
# Install ipex & pytorch
1717
python -m pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
1818
python -m pip install intel-extension-for-pytorch
19+
python -m pip install transformers==4.35.2
1920
python -m pip install oneccl_bind_pt --extra-index-url https://pytorch-extension.intel.com/release-whl/stable/cpu/us/
2021

2122
# Install benchmarks

0 commit comments

Comments
 (0)