From 8fd5ef7fb7ea94ac743586e5023cbd4d4a770262 Mon Sep 17 00:00:00 2001 From: Gabriela Cervantes Date: Tue, 12 Dec 2023 16:20:56 +0000 Subject: [PATCH 1/2] metrics: Update TensorFlow ResNet50 Int8 Dockerfile This PR updates the TensorFlow ResNet50 Int8 Dockerfile to use the proper python version for kata metrics. Fixes #8643 Signed-off-by: Gabriela Cervantes --- .../resnet50_int8_dockerfile/Dockerfile | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/tests/metrics/machine_learning/resnet50_int8_dockerfile/Dockerfile b/tests/metrics/machine_learning/resnet50_int8_dockerfile/Dockerfile index 6e0c1e611..cdc6f866c 100644 --- a/tests/metrics/machine_learning/resnet50_int8_dockerfile/Dockerfile +++ b/tests/metrics/machine_learning/resnet50_int8_dockerfile/Dockerfile @@ -12,10 +12,14 @@ LABEL DOCKERFILE_VERSION="1.0" RUN apt-get update && \ apt-get install -y --no-install-recommends wget nano curl build-essential git && \ - apt-get install -y python3.8 python3-pip && \ - pip install --no-cache-dir intel-tensorflow-avx512==2.8.0 && \ - pip install --no-cache-dir protobuf==3.20.* && \ wget -q https://storage.googleapis.com/intel-optimized-tensorflow/models/v1_8/resnet50_int8_pretrained_model.pb && \ - git clone https://github.com/IntelAI/models.git + git clone https://github.com/IntelAI/models.git && \ + wget -q https://www.python.org/ftp/python/3.8.10/Python-3.8.10.tgz && \ + tar xzf Python-3.8.10.tgz && \ + cd Python-3.8.10 && \ + ./configure --enable-optimizations && make altinstall && make install && \ + apt-get install -y python3-pip && \ + pip install --no-cache-dir intel-tensorflow-avx512==2.8.0 && \ + pip install --no-cache-dir protobuf==3.20.* CMD ["/bin/bash"] From 23f76653e543454137fbdbb67e50a64a995ae23c Mon Sep 17 00:00:00 2001 From: Gabriela Cervantes Date: Tue, 12 Dec 2023 16:24:09 +0000 Subject: [PATCH 2/2] metrics: Update command to run the tensorflow int8 benchmark This PR updates the command to run the tensorflow resnet50 int8 benchmark. Signed-off-by: Gabriela Cervantes --- tests/metrics/machine_learning/tensorflow_resnet50_int8.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/metrics/machine_learning/tensorflow_resnet50_int8.sh b/tests/metrics/machine_learning/tensorflow_resnet50_int8.sh index 19c3e1192..254933393 100755 --- a/tests/metrics/machine_learning/tensorflow_resnet50_int8.sh +++ b/tests/metrics/machine_learning/tensorflow_resnet50_int8.sh @@ -57,7 +57,7 @@ function create_start_script() { cat <>"${script}" #!/bin/bash -python3.8 models/benchmarks/launch_benchmark.py --benchmark-only --framework tensorflow --model-name resnet50 --precision int8 --mode inference --in-graph /resnet50_int8_pretrained_model.pb --batch-size 116 --num-intra-threads 16 >> results +python3.10 models/benchmarks/launch_benchmark.py --benchmark-only --framework tensorflow --model-name resnet50 --precision int8 --mode inference --in-graph /resnet50_int8_pretrained_model.pb --batch-size 116 --num-intra-threads 16 >> results EOF chmod +x "${script}" }