Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add docstring for common
Signed-off-by: yiliu30 <[email protected]>
  • Loading branch information
yiliu30 committed Jul 26, 2024
commit d1d4ef1fb72ed02269603857e5c71fb8f717fcb9
6 changes: 5 additions & 1 deletion neural_compressor/common/benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
# 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.
"""Benchmark API for Intel Neural Compressor."""

import argparse
import os
Expand Down Expand Up @@ -242,7 +243,9 @@ def get_numa_node(core_list, reversed_numa_info):


def set_cores_for_instance(args, numa_info):
"""All use cases are listed below:
"""Set cores for each instance based on the input args.

All use cases are listed below:
Params: a=num_instance; b=num_cores_per_instance; c=cores;
- no a, b, c: a=1, c=numa:0
- no a, b: a=1, c=c
Expand Down Expand Up @@ -357,6 +360,7 @@ def generate_prefix(args, core_list):
Args:
args (argparse): arguments for setting different configurations
core_list: ["node_index", "cpu_index", num_cpu]

Returns:
command_prefix (str): command_prefix with specific core list for Linux or Windows.
"""
Expand Down
2 changes: 2 additions & 0 deletions neural_compressor/common/utils/utility.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,8 @@ def wrapper(*args, **kwargs):


class ProcessorType(enum.Enum):
"""The processor type."""

Client = "Client"
Server = "Server"

Expand Down