You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2020/12/10 17:03:02 UTC

[GitHub] [tvm] leandron commented on a change in pull request #7070: Add autoscheduler support to tvmc

leandron commented on a change in pull request #7070:
URL: https://github.com/apache/tvm/pull/7070#discussion_r540331693



##########
File path: python/tvm/driver/tvmc/autoscheduler.py
##########
@@ -0,0 +1,212 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, 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.
+"""
+Provides support to auto-tuning networks using AutoScheduler.
+"""
+import logging
+
+from urllib.parse import urlparse
+
+from tvm import auto_scheduler
+from tvm.auto_scheduler.auto_schedule import HardwareParams
+
+from . import common, frontends
+from .common import add_tuning_options
+from .main import register_parser
+
+
+# pylint: disable=invalid-name
+logger = logging.getLogger("TVMC")
+
+
+@register_parser
+def add_autoscheduler_parser(subparsers):
+    """ Include parser for 'autoschedule' subcommand """
+    parser = subparsers.add_parser("autoschedule", help="auto-schedule a model")

Review comment:
       I agree that adding this feature to `tune`, rather than a new `autoschedule` is s good idea, and simplifies the message for the end-user.
   
   In this case, I think we will need a way to enable this autoschedule mode on `tvmc tune`. We don't have any other flag-type option on TVMC yet, so it is a good opportunity so see which format we want.
   
   Thinking about the name, I think `--enable-[thing]` (e.g. `--enable-auto-scheduler`) is clear and generic enough to be extended to other flags in future. Looking into `clang` options, for example, I couldn't find a specific standard they use for flag-type options - any thoughts?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org