-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Your Name
committed
May 22, 2024
1 parent
49a6458
commit aa2ef36
Showing
5 changed files
with
306 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
#!/bin/bash | ||
|
||
set -ex | ||
|
||
export MILABENCH_GPU_ARCH=cuda | ||
export MILABENCH_WORDIR="$(pwd)/$MILABENCH_GPU_ARCH" | ||
|
||
export MILABENCH_BASE="$MILABENCH_WORDIR/results" | ||
export MILABENCH_CONFIG="$MILABENCH_WORDIR/milabench/config/standard.yaml" | ||
export MILABENCH_VENV="$MILABENCH_WORDIR/env" | ||
export BENCHMARK_VENV="$MILABENCH_WORDIR/results/venv/torch" | ||
|
||
|
||
install_prepare() { | ||
mkdir -p $MILABENCH_WORDIR | ||
cd $MILABENCH_WORDIR | ||
|
||
virtualenv $MILABENCH_WORDIR/env | ||
|
||
git clone https://github.com/mila-iqia/milabench.git -b intel | ||
git clone https://github.com/Delaunay/voir.git -b async_timer | ||
git clone https://github.com/Delaunay/torchcompat.git | ||
|
||
. $MILABENCH_WORDIR/env/bin/activate | ||
pip install -e $MILABENCH_WORDIR/milabench | ||
|
||
# | ||
# Install milabench's benchmarks in their venv | ||
# | ||
milabench install | ||
|
||
which pip | ||
pip install -e $MILABENCH_WORDIR/voir | ||
pip install -e $MILABENCH_WORDIR/torchcompat | ||
|
||
( | ||
. $BENCHMARK_VENV/bin/activate | ||
which pip | ||
pip install -e $MILABENCH_WORDIR/voir | ||
pip install -e $MILABENCH_WORDIR/torchcompat | ||
pip install torch torchvision torchaudio | ||
|
||
( | ||
cd $MILABENCH_WORDIR/milabench/benchmarks/timm/pytorch-image-models; | ||
git fetch origin; | ||
git checkout cb0e439 | ||
) | ||
) | ||
|
||
# | ||
# Generate/download datasets, download models etc... | ||
milabench prepare | ||
} | ||
|
||
if [ ! -d "$MILABENCH_WORDIR" ]; then | ||
install_prepare | ||
else | ||
echo "Reusing previous install" | ||
. $MILABENCH_WORDIR/env/bin/activate | ||
fi | ||
|
||
cd $MILABENCH_WORDIR | ||
|
||
|
||
# | ||
# Run the benchmakrs | ||
milabench run | ||
|
||
# | ||
# Display report | ||
milabench report --runs $MILABENCH_WORDIR/results/runs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
#!/bin/bash | ||
|
||
set -ex | ||
|
||
export MILABENCH_GPU_ARCH=hpu | ||
export MILABENCH_WORDIR="$(pwd)/$MILABENCH_GPU_ARCH" | ||
export MILABENCH_BASE="$MILABENCH_WORDIR/results" | ||
export MILABENCH_CONFIG="$MILABENCH_WORDIR/milabench/config/standard.yaml" | ||
export MILABENCH_VENV="$MILABENCH_WORDIR/env" | ||
export BENCHMARK_VENV="$MILABENCH_WORDIR/results/venv/torch" | ||
|
||
install_prepare() { | ||
mkdir -p $MILABENCH_WORDIR | ||
cd $MILABENCH_WORDIR | ||
|
||
virtualenv $MILABENCH_WORDIR/env | ||
|
||
git clone https://github.com/mila-iqia/milabench.git -b intel | ||
git clone https://github.com/Delaunay/voir.git -b async_timer | ||
git clone https://github.com/Delaunay/torchcompat.git | ||
|
||
wget -nv https://vault.habana.ai/artifactory/gaudi-installer/1.15.1/habanalabs-installer.sh | ||
chmod +x habanalabs-installer.sh | ||
|
||
. $MILABENCH_WORDIR/env/bin/activate | ||
pip install -e $MILABENCH_WORDIR/milabench | ||
|
||
|
||
# | ||
# Install milabench's benchmarks in their venv | ||
# | ||
milabench install | ||
|
||
which pip | ||
pip install -e $MILABENCH_WORDIR/voir | ||
pip install -e $MILABENCH_WORDIR/torchcompat | ||
|
||
# Override dependencies for HPU | ||
# milabench needs pyhlml | ||
export HABANALABS_VIRTUAL_DIR=$MILABENCH_VENV | ||
./habanalabs-installer.sh install -t dependencies --venv -y | ||
./habanalabs-installer.sh install -t pytorch --venv -y | ||
|
||
|
||
( | ||
. $BENCHMARK_VENV/bin/activate | ||
which pip | ||
pip install -e $MILABENCH_WORDIR/voir | ||
pip install -e $MILABENCH_WORDIR/torchcompat | ||
|
||
( | ||
cd $MILABENCH_WORDIR/milabench/benchmarks/timm/pytorch-image-models; | ||
git fetch origin; | ||
git checkout cb0e439 | ||
) | ||
|
||
# Override dependencies for HPU | ||
# benchmarks need pytorch | ||
export HABANALABS_VIRTUAL_DIR=$BENCHMARK_VENV | ||
./habanalabs-installer.sh install -t dependencies --venv -y | ||
./habanalabs-installer.sh install -t pytorch --venv -y | ||
) | ||
|
||
# | ||
# Generate/download datasets, download models etc... | ||
milabench prepare | ||
} | ||
|
||
if [ ! -d "$MILABENCH_WORDIR" ]; then | ||
install_prepare | ||
else | ||
echo "Reusing previous install" | ||
. $MILABENCH_WORDIR/env/bin/activate | ||
fi | ||
|
||
cd $MILABENCH_WORDIR | ||
|
||
|
||
# | ||
# Run the benchmakrs | ||
milabench run "$@" | ||
|
||
# | ||
# Display report | ||
milabench report --runs $MILABENCH_WORDIR/results/runs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
#!/bin/bash | ||
|
||
set -ex | ||
|
||
export MILABENCH_GPU_ARCH=rocm | ||
export MILABENCH_WORDIR="$(pwd)/$MILABENCH_GPU_ARCH" | ||
|
||
export MILABENCH_BASE="$MILABENCH_WORDIR/results" | ||
export MILABENCH_CONFIG="$MILABENCH_WORDIR/milabench/config/standard.yaml" | ||
export MILABENCH_VENV="$MILABENCH_WORDIR/env" | ||
export BENCHMARK_VENV="$MILABENCH_WORDIR/results/venv/torch" | ||
|
||
|
||
install_prepare() { | ||
mkdir -p $MILABENCH_WORDIR | ||
cd $MILABENCH_WORDIR | ||
|
||
virtualenv $MILABENCH_WORDIR/env | ||
|
||
git clone https://github.com/mila-iqia/milabench.git -b intel | ||
git clone https://github.com/Delaunay/voir.git -b async_timer | ||
git clone https://github.com/Delaunay/torchcompat.git | ||
|
||
. $MILABENCH_WORDIR/env/bin/activate | ||
pip install -e $MILABENCH_WORDIR/milabench | ||
|
||
# | ||
# Install milabench's benchmarks in their venv | ||
# | ||
milabench install | ||
|
||
which pip | ||
pip install -e $MILABENCH_WORDIR/voir | ||
pip install -e $MILABENCH_WORDIR/torchcompat | ||
|
||
( | ||
. $BENCHMARK_VENV/bin/activate | ||
which pip | ||
pip install -e $MILABENCH_WORDIR/voir | ||
pip install -e $MILABENCH_WORDIR/torchcompat | ||
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/rocm6.0 | ||
|
||
( | ||
cd $MILABENCH_WORDIR/milabench/benchmarks/timm/pytorch-image-models; | ||
git fetch origin; | ||
git checkout cb0e439 | ||
) | ||
) | ||
|
||
# | ||
# Generate/download datasets, download models etc... | ||
milabench prepare | ||
} | ||
|
||
if [ ! -d "$MILABENCH_WORDIR" ]; then | ||
install_prepare | ||
else | ||
echo "Reusing previous install" | ||
. $MILABENCH_WORDIR/env/bin/activate | ||
fi | ||
|
||
cd $MILABENCH_WORDIR | ||
|
||
# | ||
# Run the benchmakrs | ||
milabench run | ||
|
||
# | ||
# Display report | ||
milabench report --runs $MILABENCH_WORDIR/results/runs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
#!/bin/bash | ||
|
||
set -ex | ||
|
||
export MILABENCH_GPU_ARCH=xpu | ||
export MILABENCH_WORDIR="$(pwd)/$MILABENCH_GPU_ARCH" | ||
|
||
export MILABENCH_BASE="$MILABENCH_WORDIR/results" | ||
export MILABENCH_CONFIG="$MILABENCH_WORDIR/milabench/config/standard.yaml" | ||
export MILABENCH_VENV="$MILABENCH_WORDIR/env" | ||
export BENCHMARK_VENV="$MILABENCH_WORDIR/results/venv/torch" | ||
|
||
|
||
install_prepare() { | ||
mkdir -p $MILABENCH_WORDIR | ||
cd $MILABENCH_WORDIR | ||
|
||
virtualenv $MILABENCH_WORDIR/env | ||
|
||
git clone https://github.com/mila-iqia/milabench.git -b intel | ||
git clone https://github.com/Delaunay/voir.git -b async_timer | ||
git clone https://github.com/Delaunay/torchcompat.git | ||
|
||
# XPU manager is necessary | ||
wget -nv https://github.com/intel/xpumanager/releases/download/V1.2.36/xpumanager_1.2.36_20240428.081009.377f9162.u22.04_amd64.deb | ||
sudo dpkg -i xpumanager_1.2.36_20240428.081009.377f9162.u22.04_amd64.deb | ||
|
||
. $MILABENCH_WORDIR/env/bin/activate | ||
pip install -e $MILABENCH_WORDIR/milabench | ||
|
||
# | ||
# Install milabench's benchmarks in their venv | ||
# | ||
milabench install | ||
|
||
which pip | ||
pip install -e $MILABENCH_WORDIR/voir | ||
pip install -e $MILABENCH_WORDIR/torchcompat | ||
|
||
( | ||
. $BENCHMARK_VENV/bin/activate | ||
which pip | ||
pip install -e $MILABENCH_WORDIR/voir | ||
pip install -e $MILABENCH_WORDIR/torchcompat | ||
|
||
# Override dependencies for XPU | ||
pip install torch, torchvision torchaudio intel-extension-for-pytorch --extra-index-url https://pytorch-extension.intel.com/release-whl/stable/xpu/us/ | ||
|
||
( | ||
cd $MILABENCH_WORDIR/milabench/benchmarks/timm/pytorch-image-models; | ||
git fetch origin; | ||
git checkout cb0e439 | ||
) | ||
) | ||
|
||
# | ||
# Generate/download datasets, download models etc... | ||
milabench prepare | ||
} | ||
|
||
if [ ! -d "$MILABENCH_WORDIR" ]; then | ||
install_prepare | ||
else | ||
echo "Reusing previous install" | ||
. $MILABENCH_WORDIR/env/bin/activate | ||
fi | ||
|
||
cd $MILABENCH_WORDIR | ||
|
||
# | ||
# Run the benchmakrs | ||
milabench run | ||
|
||
# | ||
# Display report | ||
milabench report --runs $MILABENCH_WORDIR/results/runs |