forked from intel/ai-reference-models
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update PyTorch containers and replace bf16 with bfloat16
- Loading branch information
Showing
53 changed files
with
125 additions
and
57 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
File renamed without changes.
70 changes: 70 additions & 0 deletions
70
dockerfiles/pytorch/pytorch-resnet50-bfloat16-inference.Dockerfile
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 @@ | ||
# Copyright (c) 2020 Intel Corporation | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# ============================================================================ | ||
# | ||
# THIS IS A GENERATED DOCKERFILE. | ||
# | ||
# This file was assembled from multiple pieces, whose use is documented | ||
# throughout. Please refer to the TensorFlow dockerfiles documentation | ||
# for more information. | ||
|
||
ARG PYTORCH_IMAGE="intel/intel-optimized-pytorch" | ||
ARG PYTORCH_TAG | ||
|
||
FROM ${PYTORCH_IMAGE}:${PYTORCH_TAG} | ||
|
||
ARG PACKAGE_DIR=model_packages | ||
|
||
ARG PACKAGE_NAME | ||
|
||
ARG MODEL_WORKSPACE | ||
|
||
# ${MODEL_WORKSPACE} and below needs to be owned by root:root rather than the current UID:GID | ||
# this allows the default user (root) to work in k8s single-node, multi-node | ||
RUN umask 002 && mkdir -p ${MODEL_WORKSPACE} && chgrp root ${MODEL_WORKSPACE} && chmod g+s+w,o+s+r ${MODEL_WORKSPACE} | ||
|
||
ADD --chown=0:0 ${PACKAGE_DIR}/${PACKAGE_NAME}.tar.gz ${MODEL_WORKSPACE} | ||
|
||
RUN chown -R root ${MODEL_WORKSPACE}/${PACKAGE_NAME} && chgrp -R root ${MODEL_WORKSPACE}/${PACKAGE_NAME} && chmod -R g+s+w ${MODEL_WORKSPACE}/${PACKAGE_NAME} && find ${MODEL_WORKSPACE}/${PACKAGE_NAME} -type d | xargs chmod o+r+x | ||
|
||
WORKDIR ${MODEL_WORKSPACE}/${PACKAGE_NAME} | ||
|
||
ENV USER_ID=0 | ||
|
||
ENV USER_NAME=root | ||
|
||
ENV GROUP_ID=0 | ||
|
||
ENV GROUP_NAME=root | ||
|
||
RUN apt-get update && \ | ||
apt-get install --no-install-recommends --fix-missing -y gosu | ||
|
||
RUN echo '#!/bin/bash\n\ | ||
USER_ID=$USER_ID\n\ | ||
USER_NAME=$USER_NAME\n\ | ||
GROUP_ID=$GROUP_ID\n\ | ||
GROUP_NAME=$GROUP_NAME\n\ | ||
if [[ $GROUP_NAME != root ]]; then\n\ | ||
groupadd -r -g $GROUP_ID $GROUP_NAME\n\ | ||
fi\n\ | ||
if [[ $USER_NAME != root ]]; then\n\ | ||
useradd --no-log-init -r -u $USER_ID -g $GROUP_NAME -s /bin/bash -M $USER_NAME\n\ | ||
fi\n\ | ||
exec /usr/sbin/gosu $USER_NAME:$GROUP_NAME "$@"\n '\ | ||
>> /tmp/entrypoint.sh | ||
|
||
RUN chmod u+x,g+x /tmp/entrypoint.sh | ||
|
||
ENTRYPOINT ["/tmp/entrypoint.sh"] |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
...rch/dlrm/training/bf16/.docs/baremetal.md → ...dlrm/training/bfloat16/.docs/baremetal.md
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
2 changes: 1 addition & 1 deletion
2
...orch/dlrm/training/bf16/.docs/datasets.md → .../dlrm/training/bfloat16/.docs/datasets.md
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<!--- 20. Datasets --> | ||
## Datasets | ||
|
||
Prepare your dataset according to the [instruction described here](/models/recommendation/pytorch/dlrm/training/bf16/README.md#4-prepare-dataset) | ||
Prepare your dataset according to the [instruction described here](/models/recommendation/pytorch/dlrm/training/bfloat16/README.md#4-prepare-dataset) | ||
|
||
Set the `DATA_PATH` to point to "<dir/to/save/dlrm_data>" directory when running DLRM. |
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
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
File renamed without changes.
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
34 changes: 17 additions & 17 deletions
34
.../pytorch-resnet50-bf16-inference_spec.yml → ...orch-resnet50-bfloat16-inference_spec.yml
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 |
---|---|---|
@@ -1,51 +1,51 @@ | ||
releases: | ||
versioned: | ||
tag_specs: | ||
- '{pytorch}{pytorch-resnet50-bf16-inference}' | ||
- '{pytorch}{pytorch-resnet50-bfloat16-inference}' | ||
slice_sets: | ||
pytorch-resnet50-bf16-inference: | ||
- add_to_name: -resnet50-bf16-inference | ||
pytorch-resnet50-bfloat16-inference: | ||
- add_to_name: -resnet50-bfloat16-inference | ||
args: | ||
- PYTORCH_TAG=1.5.0-rc3-ipex-latest | ||
- PACKAGE_NAME=pytorch-resnet50-bf16-inference | ||
- PACKAGE_NAME=pytorch-resnet50-bfloat16-inference | ||
dockerfile_subdirectory: pytorch | ||
documentation: | ||
docs: | ||
- name: Title | ||
uri: models/quickstart/image_recognition/pytorch/resnet50/inference/bf16/.docs/title.md | ||
uri: models/quickstart/image_recognition/pytorch/resnet50/inference/bfloat16/.docs/title.md | ||
- name: Description | ||
uri: models/quickstart/image_recognition/pytorch/resnet50/inference/bf16/.docs/description.md | ||
uri: models/quickstart/image_recognition/pytorch/resnet50/inference/bfloat16/.docs/description.md | ||
- name: Download link | ||
uri: models/quickstart/image_recognition/pytorch/resnet50/inference/bf16/.docs/download.md | ||
uri: models/quickstart/image_recognition/pytorch/resnet50/inference/bfloat16/.docs/download.md | ||
- name: Datasets | ||
uri: models/quickstart/image_recognition/pytorch/resnet50/inference/bf16/.docs/datasets.md | ||
uri: models/quickstart/image_recognition/pytorch/resnet50/inference/bfloat16/.docs/datasets.md | ||
- name: Quick Start Scripts | ||
uri: models/quickstart/image_recognition/pytorch/resnet50/inference/bf16/.docs/quickstart.md | ||
uri: models/quickstart/image_recognition/pytorch/resnet50/inference/bfloat16/.docs/quickstart.md | ||
- name: Bare Metal | ||
uri: models/quickstart/image_recognition/pytorch/resnet50/inference/bf16/.docs/baremetal.md | ||
uri: models/quickstart/image_recognition/pytorch/resnet50/inference/bfloat16/.docs/baremetal.md | ||
- name: Docker | ||
uri: models/quickstart/image_recognition/pytorch/resnet50/inference/bf16/.docs/docker.md | ||
uri: models/quickstart/image_recognition/pytorch/resnet50/inference/bfloat16/.docs/docker.md | ||
- name: License | ||
uri: models/quickstart/image_recognition/pytorch/resnet50/inference/bf16/.docs/license.md | ||
uri: models/quickstart/image_recognition/pytorch/resnet50/inference/bfloat16/.docs/license.md | ||
name: README.md | ||
text_replace: | ||
<docker image>: 'intel/image-recognition:pytorch-1.5.0-rc3-resnet50-bfloat16-inference' | ||
<mode>: inference | ||
<model name>: ResNet50 | ||
<package dir>: pytorch-resnet50-bf16-inference | ||
<package name>: pytorch-resnet50-bf16-inference.tar.gz | ||
<package url>: 'https://storage.googleapis.com/intel-optimized-tensorflow/models/v2_3_0/pytorch-resnet50-bf16-inference.tar.gz' | ||
<package dir>: pytorch-resnet50-bfloat16-inference | ||
<package name>: pytorch-resnet50-bfloat16-inference.tar.gz | ||
<package url>: 'https://storage.googleapis.com/intel-optimized-tensorflow/models/v2_3_0/pytorch-resnet50-bfloat16-inference.tar.gz' | ||
<precision>: BFloat16 | ||
<use case>: image_recognition | ||
uri: models/quickstart/image_recognition/pytorch/resnet50/inference/bf16 | ||
uri: models/quickstart/image_recognition/pytorch/resnet50/inference/bfloat16 | ||
downloads: [] | ||
files: | ||
- destination: models/image_recognition/pytorch/common | ||
source: models/image_recognition/pytorch/common | ||
- destination: quickstart/common | ||
source: quickstart/common | ||
- destination: quickstart | ||
source: quickstart/image_recognition/pytorch/resnet50/inference/bf16 | ||
source: quickstart/image_recognition/pytorch/resnet50/inference/bfloat16 | ||
partials: | ||
- model_package | ||
- entrypoint |
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