Skip to content

Commit

Permalink
Update importer/benchmark setup for python3.11 (huggingface#1043)
Browse files Browse the repository at this point in the history
  • Loading branch information
monorimet authored Feb 20, 2023
1 parent 6d2a485 commit 2ae047f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions generate_sharktank.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,13 +162,13 @@ def save_tf_model(tf_model_list):
tf_model_name = tf_model_name.replace("/", "_")
tf_model_dir = os.path.join(WORKDIR, str(tf_model_name) + "_tf")
os.makedirs(tf_model_dir, exist_ok=True)

mlir_importer = SharkImporter(
model,
input,
inputs=input,
frontend="tf",
)
mlir_importer.import_debug(
is_dynamic=False,
dir=tf_model_dir,
model_name=tf_model_name,
)
Expand Down
6 changes: 3 additions & 3 deletions requirements-importer.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
-f https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html
--pre

numpy==1.22.4
numpy>1.22.4
torchvision
pytorch-triton
tabulate
Expand All @@ -15,8 +15,8 @@ iree-tools-tf

# TensorFlow and JAX.
gin-config
tensorflow==2.10.1
keras==2.10
tensorflow>=2.10.1
keras>=2.10
#tf-models-nightly
#tensorflow-text-nightly
transformers
Expand Down
2 changes: 1 addition & 1 deletion setup_venv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ if [[ $(uname -s) = 'Linux' && ! -z "${BENCHMARK}" ]]; then
TV_VERSION=${TV_VER:9:18}
$PYTHON -m pip uninstall -y torch torchvision
$PYTHON -m pip install -U --pre --no-warn-conflicts triton
$PYTHON -m pip install --no-deps https://download.pytorch.org/whl/nightly/cu117/torch-${TORCH_VERSION}%2Bcu117-cp310-cp310-linux_x86_64.whl https://download.pytorch.org/whl/nightly/cu117/torchvision-${TV_VERSION}%2Bcu117-cp310-cp310-linux_x86_64.whl
$PYTHON -m pip install --no-deps https://download.pytorch.org/whl/nightly/cu117/torch-${TORCH_VERSION}%2Bcu117-cp311-cp311-linux_x86_64.whl https://download.pytorch.org/whl/nightly/cu117/torchvision-${TV_VERSION}%2Bcu117-cp311-cp311-linux_x86_64.whl
if [ $? -eq 0 ];then
echo "Successfully Installed torch + cu117."
else
Expand Down

0 comments on commit 2ae047f

Please sign in to comment.