Skip to content

Commit

Permalink
rebasing
Browse files Browse the repository at this point in the history
  • Loading branch information
Giuseppe Rossini committed Dec 10, 2020
1 parent 36c6bfa commit bb39526
Showing 1 changed file with 0 additions and 87 deletions.
87 changes: 0 additions & 87 deletions python/tvm/driver/tvmc/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,93 +36,6 @@ class TVMCException(Exception):
"""TVMC Exception"""


def add_tuning_options(parser):
""" Add common tuning options for the autotuner/autoscheduler."""

parser.add_argument(
"--early-stopping",
type=int,
help="minimum number of trials before early stopping",
)

# There is some extra processing required to define the actual default value
# for --min-repeat-ms. This is done in `drive_tune`.
parser.add_argument(
"--min-repeat-ms",
default=None,
type=int,
help="minimum time to run each trial, in milliseconds. "
"Defaults to 0 on x86 and 1000 on all other targets",
)
parser.add_argument(
"--number",
default=10,
type=int,
help="number of runs a single repeat is made of. "
"The final number of tuning executions is: "
"(1 + number * repeat)",
)
parser.add_argument(
"-o",
"--output",
required=True,
help="output file to store the tuning records for the tuning process",
)
parser.add_argument(
"--parallel",
default=4,
type=int,
help="the maximum number of parallel devices to use when tuning",
)
parser.add_argument(
"--repeat",
type=int,
default=1,
help="how many times to repeat each measurement",
)
parser.add_argument(
"--rpc-key",
help="the RPC tracker key of the target device. Required when --rpc-tracker is provided.",
)
parser.add_argument(
"--rpc-tracker",
help="hostname (required) and port (optional, defaults to 9090) of the RPC tracker, "
"e.g. '192.168.0.100:9999'",
)
parser.add_argument(
"--target",
help="compilation target as plain string, inline JSON or path to a JSON file",
required=True,
)
parser.add_argument(
"--target-host",
help="the host compilation target, defaults to 'llvm'",
default="llvm",
)
parser.add_argument("--timeout", default=10, help="compilation timeout, in seconds")
parser.add_argument(
"--trials",
type=int,
default=1000,
help="the maximum number of tuning trials to perform",
)
parser.add_argument(
"--tuning-records",
metavar="PATH",
help="path to an auto-tuning json file produced by the autoscheduler",
)
parser.add_argument(
"--desired-layout",
choices=["NCHW", "NHWC"],
default=None,
help="change the data layout of the whole graph",
)
# TODO (@leandron) This is a path to a physical file, but
# can be improved in future to add integration with a modelzoo
# or URL, for example.
parser.add_argument("FILE", help="path to the input model file")


def convert_graph_layout(mod, desired_layout):
"""Alter the layout of the input graph.
Expand Down

0 comments on commit bb39526

Please sign in to comment.