comaniac commented on a change in pull request #7823:
URL: https://github.com/apache/tvm/pull/7823#discussion_r616862256



##########
File path: python/tvm/auto_scheduler/search_task.py
##########
@@ -43,40 +43,74 @@
 
 @tvm._ffi.register_object("auto_scheduler.HardwareParams")
 class HardwareParams(Object):
-    """The parameters of target hardware used to guide the search policy
+    """The parameters of target hardware used to guide the search policy.
+
+    When a parameter isn't provided, it will instead use the
+    current machine's default value if target is specified.
     TODO(jcf94): This is considered to be merged with the new Target 
specification:
     https://discuss.tvm.apache.org/t/rfc-tvm-target-specification/6844
     Parameters
     ----------
-    num_cores : int
+    num_cores : int, optional
         The number of device cores.
-    vector_unit_bytes : int
+    vector_unit_bytes : int, optional
         The width of vector units in bytes.
-    cache_line_bytes : int
+    cache_line_bytes : int, optional
         The size of cache line in bytes.
-    max_shared_memory_per_block : int
+    max_shared_memory_per_block : int, optional
         The max shared memory per block in bytes.
-    max_local_memory_per_block : int
+    max_local_memory_per_block : int, optional
         The max local memory per block in bytes.
-    max_threads_per_block : int
+    max_threads_per_block : int, optional
         The max number of threads per block.
-    max_vthread_extent : int
+    max_vthread_extent : int, optional
         The max vthread extent.
-    warp_size : int
+    warp_size : int, optional
         The thread numbers of a warp.
+    target : str or Target, optional
+        The compilation target. Used to determine default values if provided.
+    target_host : str or Target, optional
+        The compilation target host. Used to determine default values if 
provided.
     """
 
     def __init__(
         self,
-        num_cores,
-        vector_unit_bytes,
-        cache_line_bytes,
-        max_shared_memory_per_block,
-        max_local_memory_per_block,
-        max_threads_per_block,
-        max_vthread_extent,
-        warp_size,
+        num_cores=None,
+        vector_unit_bytes=None,
+        cache_line_bytes=None,
+        max_shared_memory_per_block=None,
+        max_local_memory_per_block=None,
+        max_threads_per_block=None,
+        max_vthread_extent=None,
+        warp_size=None,
+        target=None,
+        target_host=None,
     ):
+        # If target is provided, get the default paramters for this machine.
+        if target is not None:

Review comment:
       Ok then it's definitely should not be handled by TVMC.
   cc @jcf94 to see if we should deal with this case in auto-scheduler.




-- 
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:
[email protected]


Reply via email to