Skip to content

Commit

Permalink
Sync master with r2.8 (#772)
Browse files Browse the repository at this point in the history
* revert bf16 changes (#488)

* Add partials and spec yml for the end2end DLSA pipeline (#460)

* Add partials and specs for the end2end DLSA pipeline

* Add missing end line

* Update name to include ipex

* update specs to have use the public image as a base on one and SPR for the other

* Dockerfile updates for the updated DLSA repo

* Update pip install list

* Rename to public

* Removing partials that aren't used anymore

* Fixes for 'kmp-blocktime' env var (#493)

* Fixes for 'kmp-blocktime' env var

Signed-off-by: Abolfazl Shahbazi <[email protected]>

* update per review feedback

Signed-off-by: Abolfazl Shahbazi <[email protected]>

* Add 'kmp-blocktime' for mlperf-gnmt (#494)

* Add 'kmp-blocktime' for mlperf-gnmt

Signed-off-by: Abolfazl Shahbazi <[email protected]>

* Remove duplicate parameter definition

Signed-off-by: Abolfazl Shahbazi <[email protected]>

* add sample_input for resnet50 training (#495)

* remove the case when fragment_size not equal args.batch_size (#500)

* Changed the transformer_mlperf fp32 model so that we can fuse the ops… (#389)

* Changed the transformer_mlperf fp32 model so that we can fuse the ops in the model, and also minor changes for python3

* Changed the transformer_mlperf int8 model so that we can fuse the ops in the model, and also minor changes for python3

* SPR updates for WW12, 2022 (#492)

* SPR updates for WW12, 2022

Signed-off-by: Abolfazl Shahbazi <[email protected]>

* Update for PyTorch SPR WW2022-12

Signed-off-by: Abolfazl Shahbazi <[email protected]>

* Update pytorch base for SPR too

Signed-off-by: Abolfazl Shahbazi <[email protected]>

* Stick with specific 'keras-nightly' version

Signed-off-by: Abolfazl Shahbazi <[email protected]>

* Updates per code review

Signed-off-by: Abolfazl Shahbazi <[email protected]>

* update maskrcnn training_multinode.sh (#502)

* Fixed a bug in the transformer_mlperf model threads setting (#482)

* Fixed a bug in the transformer_mlperf model threads setting

* Fix failing tests

Signed-off-by: Abolfazl Shahbazi <[email protected]>

Co-authored-by: Abolfazl Shahbazi <[email protected]>

* Added the default threads setting for transformer_mlperf inference in… (#504)

* Added the default threads setting for transformer_mlperf inference in case there is no command line input

* Fix unit tests

Signed-off-by: Abolfazl Shahbazi <[email protected]>

Co-authored-by: Abolfazl Shahbazi <[email protected]>

* PyTorch Image Classification TL notebook (#490)

* Adds new TL notebook with documentation

* Added newline

* Added to main TL README

* Small fixes

* Updated for review feedback

* Added more models and a download limit arg

* Removed py3.9 requirement and changed default model

* Adds Kitti torchvision dataset to TL notebook (#512)

* Adds Kitti torchvision dataset to TL notebook

* Fixed citations formatting

* update maskrcnn model (#515)

* minor update. (#465)

* Create unit-test github action workflow (#518)

* Create unit-test github action workflow

Tested here: https://github.com/sriester/frameworks.ai.models.intel-models/runs/6089350443?check_suite_focus=true
Runs tox py.test on push.

* Containerize job

* Update unit-test.yml

* Update unit-test.yml

* Update unit-test.yml

* Update unit-test.yml

* Update unit-test.yml

* Update unit-test.yml

* Added login credentials to docker

Trying to fix pull rate issue

* Update unit-test.yml

* Update unit-test.yml

* Update unit-test.yml

Changed pip install command.

* Update unit-test.yml

* Update unit-test.yml

* Update unit-test.yml

Changed docker credentials to imzbot

* Update to Horovod commit 11c1389 to fix TF v2.9 + Horovod install failure (#519)

Signed-off-by: Abolfazl Shahbazi <[email protected]>

* update distilbert model to  4.18 transformers and enable int8 path (#521)

* rnnt: use launcher to set output file path and name (#524)

* Update BareMetalSetup.md (#526)

Always use the latest torchvision

* Reduce memory usage for dlrm acc test (#527)

* updatedistilbert with text_classification (#529)

* add patch for distilbert (#530)

* Update the model-builder dockerfile to use ubuntu 20.04 (#532)

* Add script for coco training dataset processing (#525)

* and update tensorflow ssd-resnet34 training dataset instructions

* update patch (#533)

Co-authored-by: Wang, Chuanqi <[email protected]>

* [RNN-T training] Enable FP32 gemm using oneDNN (#531)

* Update the Readme guide for distilbert (#534)

* Update the Readme guide for distilbert

* Fix accuracy grep bug, and grep accuracy for distilbert

Co-authored-by: Weizhuo Zhang <[email protected]>

* Update end2end public dockerfile to look for IPEX in the conda directory (#535)

* Notebook to script conversion example (#516)

* Add notebook script conversion example

* Fixed doc

* Replaces custom preprocessor with built-in one

* Changed tag to remove_for_custom_dataset

* Add URL check prior to calling urlretrieve (#538)

* Add URL check prior to calling urlretrieve

Signed-off-by: Abolfazl Shahbazi <[email protected]>

* Fix a typo

Signed-off-by: Abolfazl Shahbazi <[email protected]>

* disable for ssd since fused cat cat kernel is slow (#537)

* fix bug when adding steps in rnnt inference (#528)

* Fix and updates for TensorFlow WW18-2022 SPR (#542)

* Fix and updates for TensorFlow WW18-2022 SPR

Signed-off-by: Abolfazl Shahbazi <[email protected]>

* Fix TensorFlow SPR nightly versions

Signed-off-by: Abolfazl Shahbazi <[email protected]>

* Update pre-trained models download URLs

Signed-off-by: Abolfazl Shahbazi <[email protected]>

* Intall Python 3.8 development tools

Signed-off-by: Abolfazl Shahbazi <[email protected]>

* Fix OpenMPI install and setup

Signed-off-by: Abolfazl Shahbazi <[email protected]>

* Update to Horovod commit 11c1389 to fix TF v2.9 + Horovod install failure (#519)

Signed-off-by: Abolfazl Shahbazi <[email protected]>

* Fix Horovod Installaion for SPR and CentOS

Signed-off-by: Abolfazl Shahbazi <[email protected]>

* Fix Python3.8 version for CentOS

Signed-off-by: Abolfazl Shahbazi <[email protected]>

* Fix a typo in TensorFlow 3d-unet partial

Signed-off-by: Abolfazl Shahbazi <[email protected]>

* Fix a broken partial

Signed-off-by: Abolfazl Shahbazi <[email protected]>

* Add TCMalloc to TF base container for SPR and remove OpenSSL

Signed-off-by: Abolfazl Shahbazi <[email protected]>

* Remove some repositories

Signed-off-by: Abolfazl Shahbazi <[email protected]>

* Add 'matplotlib' for '3d-unet'

Signed-off-by: Abolfazl Shahbazi <[email protected]>

* switch to build OpenMPI due to issue in Market Place provided version

Signed-off-by: Abolfazl Shahbazi <[email protected]>

* Fix PYTORCH_WHEEL and IPEX_WHEEL arg values

Signed-off-by: Abolfazl Shahbazi <[email protected]>

* Fix and updates for PyTorch WW14-2022 SPR (#543)

* Fix and updates for PyTorch WW14-2022 SPR

Signed-off-by: Abolfazl Shahbazi <[email protected]>

* Fix and updates for TensorFlow WW18-2022 SPR

Signed-off-by: Abolfazl Shahbazi <[email protected]>

* Fix TensorFlow SPR nightly versions

Signed-off-by: Abolfazl Shahbazi <[email protected]>

* Update pre-trained models download URLs

Signed-off-by: Abolfazl Shahbazi <[email protected]>

* Intall Python 3.8 development tools

Signed-off-by: Abolfazl Shahbazi <[email protected]>

* Fix OpenMPI install and setup

Signed-off-by: Abolfazl Shahbazi <[email protected]>

* Update to Horovod commit 11c1389 to fix TF v2.9 + Horovod install failure (#519)

Signed-off-by: Abolfazl Shahbazi <[email protected]>

* Fix Horovod Installaion for SPR and CentOS

Signed-off-by: Abolfazl Shahbazi <[email protected]>

* Fix Python3.8 version for CentOS

Signed-off-by: Abolfazl Shahbazi <[email protected]>

* Fix a typo in TensorFlow 3d-unet partial

Signed-off-by: Abolfazl Shahbazi <[email protected]>

* Fix a broken partial

Signed-off-by: Abolfazl Shahbazi <[email protected]>

* Add TCMalloc to TF base container for SPR and remove OpenSSL

Signed-off-by: Abolfazl Shahbazi <[email protected]>

* Updates required to the base image

Signed-off-by: Abolfazl Shahbazi <[email protected]>

* Remove some repositories

Signed-off-by: Abolfazl Shahbazi <[email protected]>

* Add 'matplotlib' for '3d-unet'

Signed-off-by: Abolfazl Shahbazi <[email protected]>

* switch to build OpenMPI due to issue in Market Place provided version

Signed-off-by: Abolfazl Shahbazi <[email protected]>

* Fix PYTORCH_WHEEL and IPEX_WHEEL arg values

Signed-off-by: Abolfazl Shahbazi <[email protected]>

* Fix PYT resnet50 quickstart scripts for both Linux and Windows (#547)

* fix quickstart scripts, detect platform type, update to run with pytorch only

* Fix SPR PyTorch MaskRCNN inference documentation for CHECKPOINT_DIR (#548)

* Enable bert large multi stream inference (#554)

* test bert multi stream module

* enable input split and output concat for accuracy run

* change the default num_streams batchsize cores to 56

* change ssd multi stream throughput to 1 core 1 batch

* change the default parameter for rn50 ssd multi stream module

* modify enable_ipex_for_squad.diff to align new multistream hint implementation

* enable warmup and multi socket support

* change default parameter for rn50 ssd multi stream inference

* Add train-no-eval for rn50 pytorch (#555)

* PyTorch SPR BERT large training updates (h5py and dataset instructions) and update LD_PRELOAD for SPR entrypoints (#550)

* Add h5py install to bert training dockerfile

* documentation updates

* update docs, and add input_preprocessing to the wrapper package

* Update LD_PRELOAD trailing :

* Fix syntax

* removing unnecessary change

* Update DLRM entrypoint

* Update docs to note that phase2 has bert_config.json in the CHECKPOINT_DIR

* Fix syntax

* increase shm-size to 10g

* [RNN-T training] Update scripts -- run on 1S (#561)

* Update maskrcnn training script to run on 1s (#562)

* use single node to do ssd-rn34 training (#563)

* Update training.sh (#564)

* Update training.sh (#565)

Use tcmalloc instead of jemalloc

* use single node to do resnet50 training (#568)

* add numactl -C and remove jit warm in main thread (#569)

* Update unit-test.yml (#546)

* Update unit-test.yml

* Update unit-test.yml

* Update unit-test.yml

* Update unit-test.yml

* Update unit-test.yml

* Update unit-test.yml

* Update unit-test.yml

* Update unit-test.yml

* Update unit-test.yml

* Fixed make command, updated pip install.

Fixed make command to run from the root directory. Replaced pip install tox with a pip install -r requirements-tests.txt to install all dependencies for the tests.

* Add tox to test dependencies. 

Added tox to the dependencies so that the Workflow and others may install it with pip install -r requirements-test.txt and be covered for running make lint and make unit-test.

* Update unit-test.yml

Changed 'make unit-test' to 'make unit_test' as that is the actual target defined in the Makefile.

* Update unit-test.yml

Changed apt-get install command.

* re-enable int8 for api change (#579)

* saperate fully convergency test from training test (#581)

Co-authored-by: jianan-gu <[email protected]>

* ssd enable new int8 (#580)

* v1

* enable new int8 method

* Revert "ssd enable new int8 (#580)" (#584)

This reverts commit 9eb3211.

* Revert "re-enable int8 for api change (#579)" (#583)

This reverts commit 0bded92.

* Update training script using 1s (#560)

* Enable checkpoint during training for bert-large (#573)

* minor fix

* Add readme for enabling checkpoint

* update phase1 to enable checkpoint by default

* Update README.md

* Enable ssd bf32 inference training (#589)

* enable ssd bf32 inference

* enable ssd bf32 train

* enable RNN-T bf32 inference (#591)

* Enable bf32 for bert and distilbert for inference (#593)

* enable bf32 distilbert

* enable bert bf32

* Enable RNN-T bf32 training (#594)

* enable maskrcnn bf32 inference and training (#595)

* enable resnet50 and resnext101 bf16 path (#596)

* enable bert bf32 train (#600)

* update resnet int8 path using new int8 api (#603)

* re-enable int8 for api change (#604)

Co-authored-by: jianan-gu <[email protected]>

* Leslie/ssd enable new int8 (#605)

* v1

* enable new int8 method

* update json file

* add rn50 int8 weight sharing

Co-authored-by: Jiang, Xiaofei <[email protected]>

* update ssd training bs to the multily of core numbers (#606)

* enable bf32 for dlrm (#607)

Co-authored-by: jianan-gu <[email protected]>

* Update IPEX new int8 API enabling for distilbert/bert-large (#608)

* enable distilbert

* enable bert

* fix max-ind-range and add memory info (#609)

Co-authored-by: jianan-gu <[email protected]>

* Remove debug code (#610)

* update training steps (#611)

* fix bandit scan fails (#612)

* PYT Image recognition models support on Windows (#549)

* fix all image recognition scripts to run on windows and linux with PYT, and only linux with IPEX

* [RNN-T training] fix bandit scan fails (#614)

* RNN-T inference: fix IMZ Bandit scan fails (#615)

* Update unit-test.yml (#570)

Changed the docker user credential to utilize GitHub Secret.

* MaskRCNN: fix IMZ Bandit scan fails (#623)

* Fix for horovod-related failures in TF nightly runs (#613)

* cpp17 horovod failure fix

* minor debugging changes

* minor fixes - directory name

* cleanup

* addressing reviewer comments

* Minor fix for Horovod install and adding 'tf_slim' for SSD ResNet34 (#624)

* Minor fix for Horovod install and adding 'tf_slim' for SSD ResNet34

Signed-off-by: Abolfazl Shahbazi <[email protected]>

* Set 'HOROVOD_WITH_MPI=1' explicitly

Signed-off-by: Abolfazl Shahbazi <[email protected]>

* update GCC version to GCC 9

Signed-off-by: Abolfazl Shahbazi <[email protected]>

* Add 'horovodrun --check-build' for sanity check

Signed-off-by: Abolfazl Shahbazi <[email protected]>

* removo force install inside Docker

Signed-off-by: Abolfazl Shahbazi <[email protected]>

* [RNN-T training] Fix ddp sample number issue (#625)

* update BF32 usage (#627)

* resnet50 training: add warm up before collecting time (#628)

* image to bf16 (#629)

* Update end2end DLSA dockerfile due to SPR wheel path update and removing int8 patch (#631)

* Update mlpc path for SPR wheels

* remove patch

* Update Horovod commit id for BareMetal, Docker will be updated next (#630)

Signed-off-by: Abolfazl Shahbazi <[email protected]>

* fix dlrm convergence and change training performance BS to 32K (#633)

Co-authored-by: jianan-gu <[email protected]>

* [RNN-T training] Merge sh files to one (#635)

* update torch-ccl into 1.12 (#636)

* Liangan1/update torch ccl version (#637)

* Update torch_ccl version

* resnet50_distributed_training: don't set MASTER_ADDR by user (#638)

* Update torch_ccl in script (#639)

* Enable offline download distilbert (#632)

* enable offline download distilbert

* add convert

* Update README.md

* add accuracy.py

* add file

* refine download

* refine path

* refine path

* add license

* Update dlrm_s_pytorch.py (#643)

* Update README.md (#649)

* init pytorch T5 language model (#648)

* init pytorch T5 language model

* update README.md

* update doc

* update fpn models (#650)

* pytorch resnet50: directly call ipex.quantization (#653)

* fix int8 accuracy (#655)

Co-authored-by: Zhang, Weizhuo <[email protected]>

* Made fixes to the broken links (#652)

* Made fixes to the broken links

* Changed the ResNet50v1_5 version back to v2_7_0

* Modified the setup AI kit instructions

Co-authored-by: msalopan <[email protected]>

* Update Security Center URL (#657)

Signed-off-by: Abolfazl Shahbazi <[email protected]>

* Weizhuoz/fix for pt 1.12 (#656)

* fix vgg11_bn accuracy syntax error

* remove exact_match from roberta-base

* modify maskrcnn BS to 2*num_cores

* Update dlrm_s_pytorch.py (#660)

* Update dlrm_s_pytorch.py

Reduce int8 memory usage.

* Update dlrm_s_pytorch.py

* Update dlrm_s_pytorch.py

* Update dlrm_s_pytorch.py

* Update dlrm_s_pytorch.py

* Add BF32 DDP for bert-large (#663)

* Update run_ddp_bert_pretrain_phase1.sh

* Update run_ddp_bert_pretrain_phase2.sh

* Update README.md

* move OMP_NUM_THREADS=1 into dlrm_s_pytorch.py (#664)

minor changes

* remove rn50 ao (#665)

* Re-organize models list to be grouped by framework  (#654)

* re-organize models list to be grouped by framework

* update tensorflow ssd-resnet34 training dataset

* add T5 in benchmark/README.md

* mannuel set torch num threads only for int8 (#666)

* Update inference_performance.sh (#669)

* improve ssdrn34 perf. (#671)

* improve ssdrn34 perf.

* minor update.

* Fix linting

Signed-off-by: Abolfazl Shahbazi <[email protected]>

* Fix unit tests too

Signed-off-by: Abolfazl Shahbazi <[email protected]>

Co-authored-by: Abolfazl Shahbazi <[email protected]>

* update py version in base spec (#678)

* TF addons upgrade to 0.17.1 (#689)

* updated tf adons version

* remove comment

* Sriniva2/ssd rn34 (#682)

* improve ssdrn34 perf.

* minor update.

* enabling synthetic data.

* Update base_benchmark_util.py

* Fix linting error

Signed-off-by: Abolfazl Shahbazi <[email protected]>

Co-authored-by: Abolfazl Shahbazi <[email protected]>

* Update Dockerfiles prior to IMZ 2.8 release (#693)

Signed-off-by: Abolfazl Shahbazi <[email protected]>

* Update Documents prior to IMZ 2.8 release (#694)

Signed-off-by: Abolfazl Shahbazi <[email protected]>

* add support for open SUSE leap operating system (#708) (#715)

* updated tpps (#725)

* remove tf bert int8 from main readmes, model is not supported in this release. (#743)

* Adding Scipy for TensorFlow serving SSD-MobileNet model (#764) (#766)

Signed-off-by: Abolfazl Shahbazi <[email protected]>

Signed-off-by: Abolfazl Shahbazi <[email protected]>

* remove .github

Signed-off-by: Abolfazl Shahbazi <[email protected]>
Co-authored-by: leslie-fang-intel <[email protected]>
Co-authored-by: Dina Suehiro Jones <[email protected]>
Co-authored-by: Abolfazl Shahbazi <[email protected]>
Co-authored-by: XiaobingZhang <[email protected]>
Co-authored-by: Xiaoming (Jason) Cui <[email protected]>
Co-authored-by: jiayisunx <[email protected]>
Co-authored-by: Melanie Buehler <[email protected]>
Co-authored-by: Srini511 <[email protected]>
Co-authored-by: Sean-Michael Riesterer <[email protected]>
Co-authored-by: jianan-gu <[email protected]>
Co-authored-by: Chunyuan WU <[email protected]>
Co-authored-by: zhuhaozhe <[email protected]>
Co-authored-by: Wang, Chuanqi <[email protected]>
Co-authored-by: YanbingJiang <[email protected]>
Co-authored-by: Weizhuo Zhang <[email protected]>
Co-authored-by: xiaofeij <[email protected]>
Co-authored-by: liangan1 <[email protected]>
Co-authored-by: blzheng <[email protected]>
Co-authored-by: Om Thakkar <[email protected]>
Co-authored-by: mahathis <[email protected]>
Co-authored-by: msalopan <[email protected]>
Co-authored-by: Jitendra Patil <[email protected]>
  • Loading branch information
1 parent f46b771 commit b63c719
Show file tree
Hide file tree
Showing 330 changed files with 1,021,036 additions and 462,514 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ output/
tools/docker/models*
.ipynb_checkpoints
nc_workspace

benchmarks/horovod
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ and a list of models that are supported on Windows, see the
| [RNN-T](https://arxiv.org/abs/2007.15188) | PyTorch | Inference | [FP32 BFloat16**](/quickstart/language_modeling/pytorch/rnnt/inference/cpu/README.md) | [RNN-T dataset](/quickstart/language_modeling/pytorch/rnnt/inference/cpu/download_dataset.sh) |
| [RNN-T](https://arxiv.org/abs/2007.15188) | PyTorch | Training | [FP32 BFloat16**](/quickstart/language_modeling/pytorch/rnnt/training/cpu/README.md) | [RNN-T dataset](/quickstart/language_modeling/pytorch/rnnt/training/cpu/download_dataset.sh) |
| [RoBERTa base](https://arxiv.org/abs/1907.11692) | PyTorch | Inference | [FP32 BFloat16**](/quickstart/language_modeling/pytorch/roberta_base/inference/cpu/README.md) | [RoBERTa Base SQuAD 2.0](https://huggingface.co/deepset/roberta-base-squad2) |
| [T5](https://arxiv.org/abs/1910.10683) | PyTorch | Inference | [FP32 Int8**](/quickstart/language_modeling/pytorch/t5/inference/cpu/README.md) | |



### Language Translation
Expand All @@ -92,7 +94,7 @@ and a list of models that are supported on Windows, see the
| [R-FCN](https://arxiv.org/pdf/1605.06409.pdf) | TensorFlow | Inference | [Int8](/benchmarks/object_detection/tensorflow/rfcn/inference/int8/README.md) [FP32](/benchmarks/object_detection/tensorflow/rfcn/inference/fp32/README.md) | [COCO 2017 validation dataset](https://github.com/IntelAI/models/tree/master/datasets/coco#download-and-preprocess-the-coco-validation-images) |
| [SSD-MobileNet*](https://arxiv.org/pdf/1704.04861.pdf)| TensorFlow | Inference | [Int8](/benchmarks/object_detection/tensorflow/ssd-mobilenet/inference/int8/README.md) [FP32](/benchmarks/object_detection/tensorflow/ssd-mobilenet/inference/fp32/README.md) [BFloat16**](/benchmarks/object_detection/tensorflow/ssd-mobilenet/README.md#bfloat16-inference-instructions) | [COCO 2017 validation dataset](https://github.com/IntelAI/models/tree/master/datasets/coco#download-and-preprocess-the-coco-validation-images) |
| [SSD-ResNet34*](https://arxiv.org/pdf/1512.02325.pdf) | TensorFlow | Inference | [Int8](/benchmarks/object_detection/tensorflow/ssd-resnet34/inference/int8/README.md) [FP32](/benchmarks/object_detection/tensorflow/ssd-resnet34/inference/fp32/README.md) [BFloat16**](/benchmarks/object_detection/tensorflow/ssd-resnet34/inference/bfloat16/README.md) | [COCO 2017 validation dataset](https://github.com/IntelAI/models/tree/master/datasets/coco#download-and-preprocess-the-coco-validation-images) |
| [SSD-ResNet34](https://arxiv.org/pdf/1512.02325.pdf) | TensorFlow | Training | [FP32](/benchmarks/object_detection/tensorflow/ssd-resnet34/training/fp32/README.md) [BFloat16**](/benchmarks/object_detection/tensorflow/ssd-resnet34/training/bfloat16/README.md) | [COCO 2017 training dataset](https://github.com/IntelAI/models/tree/master/benchmarks/object_detection/tensorflow/ssd-resnet34/training/fp32/README.md#datasets) |
| [SSD-ResNet34](https://arxiv.org/pdf/1512.02325.pdf) | TensorFlow | Training | [FP32](/benchmarks/object_detection/tensorflow/ssd-resnet34/training/fp32/README.md) [BFloat16**](/benchmarks/object_detection/tensorflow/ssd-resnet34/training/bfloat16/README.md) | [COCO 2017 training dataset](https://github.com/IntelAI/models/tree/master/datasets/coco/README_train.md) |
| [SSD-MobileNet](https://arxiv.org/pdf/1704.04861.pdf) | TensorFlow Serving | Inference | [FP32](/benchmarks/object_detection/tensorflow_serving/ssd-mobilenet/README.md#fp32-inference-instructions) | |
| [Faster R-CNN ResNet50 FPN](https://arxiv.org/abs/1506.01497) | PyTorch | Inference | [FP32 BFloat16**](/quickstart/object_detection/pytorch/faster_rcnn_resnet50_fpn/inference/cpu/README.md) | [COCO 2017](/quickstart/object_detection/pytorch/faster_rcnn_resnet50_fpn/inference/cpu/README.md#datasets) |
| [Mask R-CNN](https://arxiv.org/abs/1703.06870) | PyTorch | Inference | [FP32 BFloat16**](/quickstart/object_detection/pytorch/maskrcnn/inference/cpu/README.md) | [COCO 2017](/quickstart/object_detection/pytorch/maskrcnn/inference/cpu/README.md#datasets) |
Expand Down
2 changes: 1 addition & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ Please report security issues or vulnerabilities to the [Intel® Security Center
For more information on how Intel® works to resolve security issues, see
[Vulnerability Handling Guidelines].

[Intel® Security Center]:https://www.intel.com/security
[Intel® Security Center]:https://www.intel.com/content/www/us/en/security-center/default.html

[Vulnerability Handling Guidelines]:https://www.intel.com/content/www/us/en/security-center/vulnerability-handling-guidelines.html
198 changes: 82 additions & 116 deletions benchmarks/README.md

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions benchmarks/common/base_benchmark_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,10 @@ def _define_args(self):
"--weight-sharing",
help="Enables experimental weight-sharing feature for RN50 int8/bf16 inference only",
dest="weight_sharing", action="store_true")
self._common_arg_parser.add_argument(
"--synthetic-data",
help="Enables synthetic data layer for some models where support exists",
dest="synthetic_data", action="store_true")

self._common_arg_parser.add_argument(
"-c", "--checkpoint",
Expand Down
38 changes: 24 additions & 14 deletions benchmarks/common/tensorflow/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ if [[ ${PLATFORM} == "linux" ]]; then
echo "${OS_PLATFORM} version ${OS_VERSION} is not currently supported."
exit 1
fi
elif [[ ${OS_PLATFORM} == *"SLES"* ]]; then
elif [[ ${OS_PLATFORM} == *"SLES"* ]] || [[ ${OS_PLATFORM} == *"SUSE"* ]]; then
if [[ ! "${OS_VERSION}" =~ "15".* ]]; then
echo "${OS_PLATFORM} version ${OS_VERSION} is not currently supported."
exit 1
Expand Down Expand Up @@ -167,7 +167,7 @@ if [[ ${NOINSTALL} != "True" ]]; then
export HOROVOD_WITHOUT_PYTORCH=1
export HOROVOD_WITHOUT_MXNET=1
export HOROVOD_WITH_TENSORFLOW=1
export HOROVOD_VERSION=87094a4
export HOROVOD_VERSION=1b3452f

# Install GCC 7 from devtoolset-7
if [[ ${OS_VERSION} =~ "7".* ]]; then
Expand All @@ -186,9 +186,10 @@ if [[ ${NOINSTALL} != "True" ]]; then
# a working commit replace next set of commands with something like:
yum install -y git make
yum clean all
python3 -m pip install git+https://github.com/horovod/horovod.git@${HOROVOD_VERSION}
python3 -m pip install --no-cache-dir git+https://github.com/horovod/horovod.git@${HOROVOD_VERSION}
horovodrun --check-build
fi
elif [[ ${OS_PLATFORM} == *"SLES"* ]]; then
elif [[ ${OS_PLATFORM} == *"SLES"* ]] || [[ ${OS_PLATFORM} == *"SUSE"* ]]; then
zypper update -y
zypper install -y gcc gcc-c++ cmake python3-tk libXext6 libSM6

Expand All @@ -208,19 +209,21 @@ if [[ ${NOINSTALL} != "True" ]]; then
export HOROVOD_WITHOUT_PYTORCH=1
export HOROVOD_WITHOUT_MXNET=1
export HOROVOD_WITH_TENSORFLOW=1
export HOROVOD_VERSION=87094a4
export HOROVOD_VERSION=1b3452f

# In case installing released versions of Horovod fail,and there is
# a working commit replace next set of commands with something like:
zypper install -y git make
zypper clean all
python3 -m pip install git+https://github.com/horovod/horovod.git@${HOROVOD_VERSION}
python3 -m pip install --no-cache-dir git+https://github.com/horovod/horovod.git@${HOROVOD_VERSION}
horovodrun --check-build
fi
elif [[ ${OS_PLATFORM} == *"Ubuntu"* ]] || [[ ${OS_PLATFORM} == *"Debian"* ]]; then
apt-get update -y
apt-get install gcc-8 g++-8 cmake python-tk -y
apt-get install gcc-9 g++-9 cmake python3-tk -y
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 700 --slave /usr/bin/g++ g++ /usr/bin/g++-7
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 800 --slave /usr/bin/g++ g++ /usr/bin/g++-8
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 900 --slave /usr/bin/g++ g++ /usr/bin/g++-9
apt-get install -y libsm6 libxext6 python3-dev

# install google-perftools for tcmalloc
Expand All @@ -236,15 +239,15 @@ if [[ ${NOINSTALL} != "True" ]]; then
export HOROVOD_WITHOUT_PYTORCH=1
export HOROVOD_WITHOUT_MXNET=1
export HOROVOD_WITH_TENSORFLOW=1
export HOROVOD_VERSION=87094a4
export HOROVOD_WITH_MPI=1
export HOROVOD_VERSION=1b3452f

apt-get update
# In case installing released versions of Horovod fail,and there is
# a working commit replace next set of commands with something like:
apt-get install -y --no-install-recommends --fix-missing cmake git
python3 -m pip install git+https://github.com/horovod/horovod.git@${HOROVOD_VERSION}
# apt-get install -y --no-install-recommends --fix-missing cmake
# python3 -m pip install git+https://github.com/horovod/horovod.git@${HOROVOD_VERSION}
python3 -m pip install --no-cache-dir git+https://github.com/horovod/horovod.git@${HOROVOD_VERSION}
horovodrun --check-build
fi
fi
python3 -m pip install --upgrade 'pip>=20.3.4'
Expand Down Expand Up @@ -277,7 +280,7 @@ if _running-in-container ; then
yum update -y
yum install -y numactl
fi
elif [[ ${OS_PLATFORM} == *"SLES"* ]]; then
elif [[ ${OS_PLATFORM} == *"SLES"* ]] || [[ ${OS_PLATFORM} == *"SUSE"* ]]; then
if [[ $INSTALL_NUMACTL == "True" ]]; then
zypper update -y
zypper install -y numactl
Expand All @@ -304,6 +307,10 @@ weight_sharing_arg=""
if [ ${WEIGHT_SHARING} == "True" ]; then
weight_sharing_arg="--weight-sharing"
fi
synthetic_data_arg=""
if [ ${SYNTHETIC_DATA} == "True" ]; then
synthetic_data_arg="--synthetic-data"
fi
accuracy_only_arg=""
if [ ${ACCURACY_ONLY} == "True" ]; then
accuracy_only_arg="--accuracy-only"
Expand Down Expand Up @@ -399,6 +406,7 @@ ${accuracy_only_arg} \
${benchmark_only_arg} \
${output_results_arg} \
${weight_sharing_arg} \
${synthetic_data_arg} \
${verbose_arg}"

if [ ${MOUNT_EXTERNAL_MODELS_SOURCE} != "None" ]; then
Expand Down Expand Up @@ -1288,7 +1296,10 @@ function ssd-resnet34() {
if [ ${PRECISION} == "bfloat16" ]; then
git apply ${MOUNT_INTELAI_MODELS_SOURCE}/${MODE}/${PRECISION}/benchmark-bfloat16.diff
fi
cd ${old_dir}
if [ ${SYNTHETIC_DATA} == "True" ]; then
git apply ${MOUNT_INTELAI_MODELS_SOURCE}/${MODE}/no_gpu_preprocess.diff
fi
cd ${old_dir}

CMD="${CMD} \
$(add_arg "--weight_decay" ${WEIGHT_DECAY}) \
Expand Down Expand Up @@ -1422,7 +1433,6 @@ function transformer_lt_official() {
function transformer_mlperf() {
export PYTHONPATH=${PYTHONPATH}:$(pwd):${MOUNT_BENCHMARK}
if [[ ${MODE} == "training" ]]; then
#pip install tensorflow-addons==0.6.0 #/workspace/benchmarks/common/tensorflow/tensorflow_addons-0.6.0.dev0-cp36-cp36m-linux_x86_64.whl
if [[ (${PRECISION} == "bfloat16") || ( ${PRECISION} == "fp32") ]]
then

Expand Down
3 changes: 2 additions & 1 deletion benchmarks/common/tensorflow_serving/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -163,10 +163,11 @@ function ssd_mobilenet(){
# Install protofbuf and other requirement
pip install \
Cython \
'pillow>=8.1.2' \
absl-py \
contextlib2 \
lxml \
'pillow>=8.1.2' \
scipy \
tf_slim

cd ${WORKSPACE}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
from argparse import ArgumentParser

from common.base_model_init import BaseModelInitializer
from common.base_model_init import set_env_var


class ModelInitializer(BaseModelInitializer):
Expand All @@ -29,6 +30,11 @@ class ModelInitializer(BaseModelInitializer):
def __init__(self, args, custom_args, platform_util=None):
super(ModelInitializer, self).__init__(args, custom_args, platform_util)

# set num_inter_threads and num_intra_threads
self.set_num_inter_intra_threads()

set_env_var("OMP_NUM_THREADS", self.args.num_intra_threads)

self.cmd = self.get_command_prefix(self.args.socket_id)
self.bleu_params = ""

Expand Down Expand Up @@ -98,8 +104,8 @@ def __init__(self, args, custom_args, platform_util=None):
" --file=" + self.args.decode_from_file + \
" --file_out=" + translate_file + \
" --data_dir=" + self.args.data_location + \
" --num_inter=" + str(self.args.num_inter_threads) + \
" --num_intra=" + str(self.args.num_intra_threads)
" --inter_op_parallelism_threads=" + str(self.args.num_inter_threads) + \
" --intra_op_parallelism_threads=" + str(self.args.num_intra_threads)

self.bleu_params += " --translation=" + translate_file + \
" --reference=" + self.args.reference
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
from argparse import ArgumentParser

from common.base_model_init import BaseModelInitializer
from common.base_model_init import set_env_var


class ModelInitializer(BaseModelInitializer):
Expand All @@ -29,6 +30,11 @@ class ModelInitializer(BaseModelInitializer):
def __init__(self, args, custom_args, platform_util=None):
super(ModelInitializer, self).__init__(args, custom_args, platform_util)

# set num_inter_threads and num_intra_threads
self.set_num_inter_intra_threads()

set_env_var("OMP_NUM_THREADS", self.args.num_intra_threads)

self.cmd = self.get_command_prefix(self.args.socket_id)
self.bleu_params = ""

Expand Down Expand Up @@ -77,6 +83,9 @@ def __init__(self, args, custom_args, platform_util=None):
config_file_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), "config.json")
self.set_kmp_vars(config_file_path, kmp_blocktime=str(self.args.kmp_blocktime))

self.args = arg_parser.parse_args(self.custom_args,
namespace=self.args)

# Model parameter control
translate_file = os.path.join(self.args.output_dir,
self.args.decode_to_file)
Expand All @@ -98,8 +107,8 @@ def __init__(self, args, custom_args, platform_util=None):
" --file=" + self.args.decode_from_file + \
" --file_out=" + translate_file + \
" --data_dir=" + self.args.data_location + \
" --num_inter=" + str(self.args.num_inter_threads) + \
" --num_intra=" + str(self.args.num_intra_threads)
" --inter_op_parallelism_threads=" + str(self.args.num_inter_threads) + \
" --intra_op_parallelism_threads=" + str(self.args.num_intra_threads)

self.bleu_params += " --translation=" + translate_file + \
" --reference=" + self.args.reference
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
from argparse import ArgumentParser

from common.base_model_init import BaseModelInitializer
from common.base_model_init import set_env_var


class ModelInitializer(BaseModelInitializer):
Expand All @@ -29,6 +30,11 @@ class ModelInitializer(BaseModelInitializer):
def __init__(self, args, custom_args, platform_util=None):
super(ModelInitializer, self).__init__(args, custom_args, platform_util)

# set num_inter_threads and num_intra_threads
self.set_num_inter_intra_threads()

set_env_var("OMP_NUM_THREADS", self.args.num_intra_threads)

self.cmd = self.get_command_prefix(self.args.socket_id)
self.bleu_params = ""

Expand Down Expand Up @@ -98,8 +104,8 @@ def __init__(self, args, custom_args, platform_util=None):
" --file=" + self.args.decode_from_file + \
" --file_out=" + translate_file + \
" --data_dir=" + self.args.data_location + \
" --num_inter=" + str(self.args.num_inter_threads) + \
" --num_intra=" + str(self.args.num_intra_threads)
" --inter_op_parallelism_threads=" + str(self.args.num_inter_threads) + \
" --intra_op_parallelism_threads=" + str(self.args.num_intra_threads)

self.bleu_params += " --translation=" + translate_file + \
" --reference=" + self.args.reference
Expand Down
3 changes: 2 additions & 1 deletion benchmarks/launch_benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,8 @@ def get_env_vars(self, benchmark_scripts, use_case, intelai_models,
"TF_SERVING_VERSION": args.tf_serving_version,
"USE_CASE": str(use_case),
"VERBOSE": args.verbose,
"WEIGHT_SHARING": args.weight_sharing
"WEIGHT_SHARING": args.weight_sharing,
"SYNTHETIC_DATA": args.synthetic_data
}

# Add custom model args as env vars)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@ pycocotools
tensorflow-addons
opencv-python
notebook>=6.1.5
tf_slim

pygments>=2.7.4 # not directly required, pinned by Snyk to avoid a vulnerability
Original file line number Diff line number Diff line change
Expand Up @@ -10,71 +10,11 @@ Intel-optimized TensorFlow.
<!--- 30. Datasets -->
## Datasets

SSD-ResNet34 training uses the COCO training dataset. Use the following instructions
to download and preprocess the dataset.

1. Download and extract the 2017 training images and annotations for the
[COCO dataset](http://cocodataset.org/#home):
```bash
export MODEL_WORK_DIR=$(pwd)

# Download and extract train images
wget http://images.cocodataset.org/zips/train2017.zip
unzip train2017.zip

# Download and extract annotations
wget http://images.cocodataset.org/annotations/annotations_trainval2017.zip
unzip annotations_trainval2017.zip
```

2. Since we are only using the train and validation dataset in this example,
we will create an empty directory and empty annotations json file to pass
as the test directories in the next step.
```bash
# Create an empty dir to pass for validation and test images
mkdir empty_dir
# Add an empty .json file to bypass validation/test image preprocessing
cd annotations
echo "{ \"images\": {}, \"categories\": {}}" > empty.json
cd ..
```

3. Use the [TensorFlow models repo scripts](https://github.com/tensorflow/models)
to convert the raw images and annotations to the TF records format.
```
git clone https://github.com/tensorflow/models.git tf_models
cd tf_models
git checkout 7a9934df2afdf95be9405b4e9f1f2480d748dc40
cd ..
```
4. Install the prerequisites mentioned in the
[TensorFlow models object detection installation doc](https://github.com/tensorflow/models/blob/v2.3.0/research/object_detection/g3doc/installation.md#dependencies)
and run [protobuf compilation](https://github.com/tensorflow/models/blob/v2.3.0/research/object_detection/g3doc/installation.md#protobuf-compilation)
on the code that was cloned in the previous step.
5. After your envionment is setup, run the conversion script:
```
cd tf_models/research/object_detection/dataset_tools/

# call script to do conversion
python create_coco_tf_record.py --logtostderr \
--train_image_dir="$MODEL_WORK_DIR/train2017" \
--val_image_dir="$MODEL_WORK_DIR/empty_dir" \
--test_image_dir="$MODEL_WORK_DIR/empty_dir" \
--train_annotations_file="$MODEL_WORK_DIR/annotations/instances_train2017.json" \
--val_annotations_file="$MODEL_WORK_DIR/annotations/empty.json" \
--testdev_annotations_file="$MODEL_WORK_DIR/annotations/empty.json" \
--output_dir="$MODEL_WORK_DIR/output"
```

The `coco_train.record-*-of-*` files are what we will use in this training example.
Set the output of the preprocessing script (`export DATASET_DIR=$MODEL_WORK_DIR/output`)
when running quickstart scripts.
SSD-ResNet34 training uses the COCO training dataset. Use the
[instructions](https://github.com/IntelAI/models/tree/master/datasets/coco/README_train.md) to download and preprocess the dataset.

For accuracy testing, download the COCO validation dataset, using the
[instructions here](/datasets/coco).
[instructions here](https://github.com/IntelAI/models/tree/master/datasets/coco/README.md).

<!--- 40. Quick Start Scripts -->
## Quick Start Scripts
Expand Down
Loading

0 comments on commit b63c719

Please sign in to comment.