Skip to content

Commit bf80e6d

Browse files
committed
addressing comments
1 parent fc04678 commit bf80e6d

File tree

6 files changed

+10
-19
lines changed

6 files changed

+10
-19
lines changed

python/tvm/contrib/micro/meta_schedule/test_autotune_ms.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,15 +76,15 @@ def get_module():
7676
)
7777
def test_micro_tuning_with_meta_schedule(platform, options):
7878
if platform == "crt":
79-
target = tvm.target.target.micro(model="host", options="-num-cores=1")
79+
target = tvm.target.target.micro(model="host")
8080
else:
8181
boards_file = (
8282
pathlib.Path(tvm.micro.get_microtvm_template_projects("zephyr")) / "boards.json"
8383
)
8484
with open(boards_file) as f:
8585
boards = json.load(f)
8686
target = tvm.target.target.micro(
87-
model=boards[options["board"]]["model"], options="-mcpu=cortex-m4 -num-cores=1"
87+
model=boards[options["board"]]["model"], options="-mcpu=cortex-m4"
8888
)
8989

9090
work_dir = utils.tempdir()
@@ -156,7 +156,7 @@ def test_micro_tuning_with_meta_schedule(platform, options):
156156

157157
# Build reference model (without tuning)
158158
dev = tvm.cpu()
159-
target = tvm.target.target.micro(model="host", options="-num-cores=1")
159+
target = tvm.target.target.micro(model="host")
160160
with tvm.transform.PassContext(
161161
opt_level=3, config={"tir.disable_vectorize": True}, disabled_pass=["AlterOpLayout"]
162162
):

python/tvm/rpc/server.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ def __init__(
319319
load_library=None,
320320
custom_addr=None,
321321
silent=False,
322-
reuse_addr=False,
322+
reuse_addr=True,
323323
timeout=None,
324324
):
325325

@@ -377,7 +377,7 @@ def _popen_start_rpc_server(
377377
silent=False,
378378
no_fork=False,
379379
server_init_callback=None,
380-
reuse_addr=False,
380+
reuse_addr=True,
381381
timeout=None,
382382
):
383383
if no_fork:
@@ -488,7 +488,7 @@ def __init__(
488488
silent=False,
489489
no_fork=False,
490490
server_init_callback=None,
491-
reuse_addr=False,
491+
reuse_addr=True,
492492
timeout=None,
493493
):
494494
try:

python/tvm/rpc/tracker.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -387,9 +387,7 @@ class PopenTrackerServerState(object):
387387

388388
current = None
389389

390-
def __init__(
391-
self, host, port=9190, port_end=9199, silent=False, reuse_addr=False, timeout=None
392-
):
390+
def __init__(self, host, port=9190, port_end=9199, silent=False, reuse_addr=True, timeout=None):
393391
if silent:
394392
logger.setLevel(logging.WARN)
395393

@@ -419,7 +417,7 @@ def __init__(
419417

420418

421419
def _popen_start_tracker_server(
422-
host, port=9190, port_end=9199, silent=False, reuse_addr=False, timeout=None
420+
host, port=9190, port_end=9199, silent=False, reuse_addr=True, timeout=None
423421
):
424422
# This is a function that will be sent to the
425423
# Popen worker to run on a separate process.
@@ -458,7 +456,7 @@ class Tracker(object):
458456
"""
459457

460458
def __init__(
461-
self, host="0.0.0.0", port=9190, port_end=9199, silent=False, reuse_addr=False, timeout=None
459+
self, host="0.0.0.0", port=9190, port_end=9199, silent=False, reuse_addr=True, timeout=None
462460
):
463461
if silent:
464462
logger.setLevel(logging.WARN)

src/meta_schedule/mutator/mutator.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,7 @@ Map<Mutator, FloatImm> Mutator::DefaultMicro() {
8282
return Map<Mutator, FloatImm>{
8383
{Mutator::MutateTileSize(), FloatImm(DataType::Float(64), 0.9)},
8484
{Mutator::MutateComputeLocation(), FloatImm(DataType::Float(64), 0.05)},
85-
{Mutator::MutateUnroll(), FloatImm(DataType::Float(64), 0.03)},
86-
{Mutator::MutateParallel(/*max_jobs_per_core=*/16), FloatImm(DataType::Float(64), 0.02)}};
85+
{Mutator::MutateUnroll(), FloatImm(DataType::Float(64), 0.03)}};
8786
}
8887

8988
TVM_STATIC_IR_FUNCTOR(ReprPrinter, vtable)

src/meta_schedule/schedule_rule/schedule_rule.cc

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -271,11 +271,6 @@ Array<ScheduleRule> ScheduleRule::DefaultMicro() {
271271
Map<String, ObjectRef>{{"req", String("may")},
272272
{"levels", Array<Integer>{1, 2}},
273273
{"scope", String("global")}}),
274-
ScheduleRule::ParallelizeVectorizeUnroll(
275-
/*max_jobs_per_core=*/16,
276-
/*max_vectorize_extent=*/1,
277-
/*unroll_max_steps=*/Array<Integer>{0, 16, 64, 512},
278-
/*unroll_explicit=*/true),
279274
};
280275
}
281276

src/target/target_kind.cc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,6 @@ TVM_REGISTER_TARGET_KIND("c", kDLCPU)
309309
.add_attr_option<String>("march")
310310
.add_attr_option<Integer>("workspace-byte-alignment")
311311
.add_attr_option<Integer>("constants-byte-alignment")
312-
.add_attr_option<Integer>("num-cores")
313312
.set_default_keys({"cpu"})
314313
.set_target_parser(tvm::target::parsers::cpu::ParseTarget);
315314

0 commit comments

Comments
 (0)