2021-02-24 07:43:24 +03:00
|
|
|
# Copyright (c) Microsoft Corporation.
|
|
|
|
# Licensed under the MIT license.
|
|
|
|
|
2021-03-04 08:20:13 +03:00
|
|
|
"""A module for statuses of benchmarks."""
|
2021-02-24 07:43:24 +03:00
|
|
|
|
2021-03-04 08:20:13 +03:00
|
|
|
from superbench.benchmarks.context import Enum
|
2021-02-24 07:43:24 +03:00
|
|
|
|
|
|
|
|
|
|
|
class ReturnCode(Enum):
|
|
|
|
"""The Enum class representing benchmark status."""
|
|
|
|
# Common return codes.
|
|
|
|
SUCCESS = 0
|
|
|
|
INVALID_ARGUMENT = 1
|
|
|
|
INVALID_BENCHMARK_TYPE = 2
|
|
|
|
INVALID_BENCHMARK_RESULT = 3
|
2021-06-07 05:19:05 +03:00
|
|
|
RUNTIME_EXCEPTION_ERROR = 4
|
2021-09-01 17:15:42 +03:00
|
|
|
# Return codes related to model benchmarks.
|
2021-02-24 07:43:24 +03:00
|
|
|
NO_SUPPORTED_PRECISION = 10
|
2021-03-04 08:20:13 +03:00
|
|
|
DISTRIBUTED_SETTING_INIT_FAILURE = 13
|
2021-04-12 04:58:53 +03:00
|
|
|
DISTRIBUTED_SETTING_DESTROY_FAILURE = 14
|
|
|
|
DATASET_GENERATION_FAILURE = 15
|
|
|
|
DATALOADER_INIT_FAILURE = 16
|
|
|
|
OPTIMIZER_CREATION_FAILURE = 17
|
|
|
|
MODEL_CREATION_FAILURE = 18
|
2021-09-01 17:15:42 +03:00
|
|
|
# Return codes related to micro benchmarks.
|
2021-05-13 13:58:47 +03:00
|
|
|
MICROBENCHMARK_BINARY_NAME_NOT_SET = 30
|
|
|
|
MICROBENCHMARK_BINARY_NOT_EXIST = 31
|
|
|
|
MICROBENCHMARK_EXECUTION_FAILURE = 32
|
|
|
|
MICROBENCHMARK_RESULT_PARSING_FAILURE = 33
|
2021-06-02 04:15:58 +03:00
|
|
|
MICROBENCHMARK_UNSUPPORTED_ARCHITECTURE = 34
|
2021-07-23 22:40:24 +03:00
|
|
|
MICROBENCHMARK_DEVICE_GETTING_FAILURE = 35
|
2021-11-09 20:18:41 +03:00
|
|
|
MICROBENCHMARK_MPI_INIT_FAILURE = 36
|
2021-09-01 17:15:42 +03:00
|
|
|
# Return codes related to docker benchmarks.
|
|
|
|
DOCKERBENCHMARK_IMAGE_NOT_SET = 50
|
|
|
|
DOCKERBENCHMARK_CONTAINER_NOT_SET = 51
|
|
|
|
DOCKERBENCHMARK_IMAGE_PULL_FAILURE = 52
|
|
|
|
DOCKERBENCHMARK_EXECUTION_FAILURE = 53
|
|
|
|
DOCKERBENCHMARK_RESULT_PARSING_FAILURE = 54
|