Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

R2.10.1 Fixes #126

Open
wants to merge 14 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
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
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "models/aidd/pytorch/alphafold2/inference/alphafold"]
path = models/aidd/pytorch/alphafold2/inference/alphafold
url = https://github.com/deepmind/alphafold
159 changes: 90 additions & 69 deletions README.md

Large diffs are not rendered by default.

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
203 changes: 85 additions & 118 deletions benchmarks/README.md

Large diffs are not rendered by default.

29 changes: 24 additions & 5 deletions benchmarks/common/base_benchmark_util.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
# -*- coding: utf-8 -*-
#
# Copyright (c) 2018-2019 Intel Corporation
# Copyright (c) 2018-2021 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -68,8 +68,8 @@ def _define_args(self):

self._common_arg_parser.add_argument(
"-p", "--precision",
help="Specify the model precision to use: fp32, int8, or bfloat16",
required=required_arg, choices=["fp32", "int8", "bfloat16"],
help="Specify the model precision to use: fp32, fp16, int8, or bfloat16",
required=required_arg, choices=["fp32", "fp16", "int8", "bfloat16"],
dest="precision")

self._common_arg_parser.add_argument(
Expand Down 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 like SSD-ResNet34 where support exists",
dest="synthetic_data", action="store_true")

self._common_arg_parser.add_argument(
"-c", "--checkpoint",
Expand Down Expand Up @@ -270,6 +274,12 @@ def _define_args(self):
help="Additional command line arguments (prefix flag start with"
" '--').")

# Check if GPU is enabled.
self._common_arg_parser.add_argument(
"--gpu",
help="Run the benchmark script using GPU",
dest="gpu", action="store_true")

def _validate_args(self):
"""validate the args and initializes platform_util"""
# check if socket id is in socket number range
Expand Down Expand Up @@ -300,8 +310,9 @@ def _validate_args(self):
format(system_num_cores))

if args.output_results and ((args.model_name != "resnet50" and
args.model_name != "resnet50v1_5") or args.precision != "fp32"):
raise ValueError("--output-results is currently only supported for resnet50 FP32 inference.")
args.model_name != "resnet50v1_5") or
(args.precision != "fp32" and args.precision != "fp16")):
raise ValueError("--output-results is currently only supported for resnet50 FP32 or FP16 inference.")
elif args.output_results and (args.mode != "inference" or not args.data_location):
raise ValueError("--output-results can only be used when running inference with a dataset.")

Expand Down Expand Up @@ -344,6 +355,14 @@ def _validate_args(self):
"This is less than the number of cores per socket on the system ({})".
format(args.socket_id, cpuset_len_for_socket, self._platform_util.num_cores_per_socket))

if args.gpu:
if args.socket_id != -1:
raise ValueError("--socket-id cannot be used with --gpu parameter.")
if args.num_intra_threads is not None:
raise ValueError("--num-intra-threads cannot be used with --gpu parameter.")
if args.num_inter_threads is not None:
raise ValueError("--num-inter-threads cannot be used with --gpu parameter.")

def initialize_model(self, args, unknown_args):
"""Create model initializer for the specified model"""
model_initializer = None
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/common/platform_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ def _get_list_from_string_ranges(self, str_ranges):
start, end = section.split("-")
section_list = range(int(start), int(end) + 1)
result_list += section_list
elif(len(section)):
elif len(section):
# This section is either empty or just a single number and not a range
result_list.append(int(section))

Expand Down
Loading