You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by tq...@apache.org on 2023/05/08 01:00:30 UTC

[tvm] branch unity-staging updated (4e6bc9a28c -> d837fd0738)

This is an automated email from the ASF dual-hosted git repository.

tqchen pushed a change to branch unity-staging
in repository https://gitbox.apache.org/repos/asf/tvm.git


 discard 4e6bc9a28c [MERGE] Fix lint after lint image upgrade
 discard 1c469d468f [LINT] Fix clang-format script for newest clang-format
     new e1c2ed4863 [LINT] Fix clang-format script for newest clang-format
     new d837fd0738 [MERGE] Fix lint after lint image upgrade

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (4e6bc9a28c)
            \
             N -- N -- N   refs/heads/unity-staging (d837fd0738)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 tests/lint/git-clang-format.sh | 2 --
 1 file changed, 2 deletions(-)


[tvm] 02/02: [MERGE] Fix lint after lint image upgrade

Posted by tq...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

tqchen pushed a commit to branch unity-staging
in repository https://gitbox.apache.org/repos/asf/tvm.git

commit d837fd0738d50ad9db29e04e0da0c55947978f14
Author: Junru Shao <ju...@gmail.com>
AuthorDate: Sun May 7 10:07:26 2023 -0700

    [MERGE] Fix lint after lint image upgrade
---
 python/tvm/contrib/cutlass/build.py          | 2 +-
 python/tvm/contrib/tvmjs.py                  | 2 +-
 python/tvm/meta_schedule/tir_integration.py  | 4 ----
 python/tvm/relax/analysis/analysis.py        | 2 +-
 python/tvm/relax/block_builder.py            | 2 +-
 python/tvm/relax/frontend/torch/dynamo.py    | 2 +-
 python/tvm/relax/testing/relay_translator.py | 3 ++-
 python/tvm/relax/testing/runtime_builtin.py  | 2 ++
 python/tvm/relax/training/trainer.py         | 4 ++--
 python/tvm/relax/utils.py                    | 2 +-
 src/runtime/metal/metal_module.mm            | 1 -
 tests/lint/cppdocs.sh                        | 2 +-
 tests/lint/pylintrc                          | 4 +++-
 13 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/python/tvm/contrib/cutlass/build.py b/python/tvm/contrib/cutlass/build.py
index 3c9e8a9e0f..389dbf3e5c 100644
--- a/python/tvm/contrib/cutlass/build.py
+++ b/python/tvm/contrib/cutlass/build.py
@@ -783,7 +783,7 @@ class CutlassRelaxFunctionAnnotator(relax.PyExprMutator):
         elif _get_call_node(f.body, "relax.nn.attention_bias") is not None:
             op_attrs = _get_call_node(f.body, "relax.nn.attention_bias").attrs
         else:
-            raise ValueError(f"Cannot find call node for attention")
+            raise ValueError("Cannot find call node for attention")
         arg = {}
 
         if "stacked_attention" in op_type:
diff --git a/python/tvm/contrib/tvmjs.py b/python/tvm/contrib/tvmjs.py
index 6bee154e96..c146427a97 100644
--- a/python/tvm/contrib/tvmjs.py
+++ b/python/tvm/contrib/tvmjs.py
@@ -210,7 +210,7 @@ def dump_ndarray_cache(
     with open(nd_cache_json, "w") as outfile:
         json.dump({"metadata": meta_data, "records": records}, outfile, indent=4)
     print(
-        f"\nAll finished, %d total shards committed, record saved to %s"
+        "\nAll finished, %d total shards committed, record saved to %s"
         % (shard_manager.counter, nd_cache_json)
     )
 
diff --git a/python/tvm/meta_schedule/tir_integration.py b/python/tvm/meta_schedule/tir_integration.py
index 6d0af39923..36e89a11b4 100644
--- a/python/tvm/meta_schedule/tir_integration.py
+++ b/python/tvm/meta_schedule/tir_integration.py
@@ -175,7 +175,6 @@ def _tune_tir(
     task_scheduler: TaskScheduler.TaskSchedulerType = "round-robin",
     space: SpaceGenerator.SpaceGeneratorType = "post-order-apply",
     strategy: SearchStrategy.SearchStrategyType = "evolutionary",
-    task_name: str = "main",
     num_tuning_cores: Union[Literal["physical", "logical"], int] = "physical",
     seed: Optional[int] = None,
 ) -> Database:
@@ -209,8 +208,6 @@ def _tune_tir(
         The space generator.
     strategy : SearchStrategy.SearchStrategyType
         The search strategy.
-    task_name : str
-        The name of the task.
     num_tuning_cores : Union[Literal["physical", "logical"], int]
         The number of CPU cores to use during tuning.
     seed : Optional[int]
@@ -237,7 +234,6 @@ def _tune_tir(
         task_scheduler=task_scheduler,
         space=space,
         strategy=strategy,
-        task_name=task_name,
         num_tuning_cores=num_tuning_cores,
         seed=seed,
     )
diff --git a/python/tvm/relax/analysis/analysis.py b/python/tvm/relax/analysis/analysis.py
index 3db79ed8be..e3b3c288ef 100644
--- a/python/tvm/relax/analysis/analysis.py
+++ b/python/tvm/relax/analysis/analysis.py
@@ -14,7 +14,7 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-# pylint: disable=no-else-return
+# pylint: disable=no-else-return, invalid-name
 # pylint: disable=unidiomatic-typecheck
 """
 This file contains the set of passes for Relax, which exposes an interface for
diff --git a/python/tvm/relax/block_builder.py b/python/tvm/relax/block_builder.py
index 2b9cdc5fe6..fb44a3bf43 100644
--- a/python/tvm/relax/block_builder.py
+++ b/python/tvm/relax/block_builder.py
@@ -14,7 +14,7 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-# pylint: disable=no-else-return, invalid-name
+# pylint: disable=no-else-return, invalid-name, unused-argument
 """Developer API of constructing Relax AST."""
 
 from typing import Dict, List, Optional, Union, Any, Callable
diff --git a/python/tvm/relax/frontend/torch/dynamo.py b/python/tvm/relax/frontend/torch/dynamo.py
index 56eb257421..3015f77428 100644
--- a/python/tvm/relax/frontend/torch/dynamo.py
+++ b/python/tvm/relax/frontend/torch/dynamo.py
@@ -16,7 +16,7 @@
 # under the License.
 
 # pylint: disable=invalid-name, missing-function-docstring, not-callable
-# pylint: disable=import-outside-toplevel, unused-argument
+# pylint: disable=import-outside-toplevel, unused-argument, use-list-literal
 # mypy: ignore-errors
 """PyTorch Dynamo backend of Relax."""
 import functools
diff --git a/python/tvm/relax/testing/relay_translator.py b/python/tvm/relax/testing/relay_translator.py
index 46fdb7021d..b66a4f8434 100644
--- a/python/tvm/relax/testing/relay_translator.py
+++ b/python/tvm/relax/testing/relay_translator.py
@@ -14,7 +14,8 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-# pylint: disable=unused-argument, invalid-name, no-else-return, too-many-nested-blocks
+# pylint: disable=unused-argument, invalid-name, no-else-return,
+# pylint: disable=too-many-nested-blocks, unused-variable
 """Relay to Relax translator."""
 
 from typing import Any, Dict, List, Optional
diff --git a/python/tvm/relax/testing/runtime_builtin.py b/python/tvm/relax/testing/runtime_builtin.py
index 1b04364e69..c161d4e6cf 100644
--- a/python/tvm/relax/testing/runtime_builtin.py
+++ b/python/tvm/relax/testing/runtime_builtin.py
@@ -14,6 +14,8 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
+
+# pylint: disable=invalid-name
 """Testing utilities for runtime builtin functions."""
 from enum import IntEnum
 
diff --git a/python/tvm/relax/training/trainer.py b/python/tvm/relax/training/trainer.py
index fea2088d4e..d2c417a651 100644
--- a/python/tvm/relax/training/trainer.py
+++ b/python/tvm/relax/training/trainer.py
@@ -183,7 +183,7 @@ class Trainer:
                     raise ValueError(f"Parameter {key} is not found in the model")
                 self._params[self._param_name_to_pos[key]] = tvm.nd.array(val, self.device)
         else:
-            raise ValueError(f"The type of extern_params should be either list or dict")
+            raise ValueError("The type of extern_params should be either list or dict")
 
     def load_states(
         self,
@@ -217,7 +217,7 @@ class Trainer:
                     raise ValueError(f"Parameter {key} is not found in the model")
                 self._states[self._param_name_to_pos[key]] = tvm.nd.array(val, self.device)
         else:
-            raise ValueError(f"The type of extern_states should be either list or dict")
+            raise ValueError("The type of extern_states should be either list or dict")
 
     def export_params(self) -> Dict[str, NDArray]:
         """Export parameters to a dict (parameter name -> NDArray).
diff --git a/python/tvm/relax/utils.py b/python/tvm/relax/utils.py
index 3998fb8863..02dd941080 100644
--- a/python/tvm/relax/utils.py
+++ b/python/tvm/relax/utils.py
@@ -137,7 +137,7 @@ class _ArgsConverter:
         """
 
         if any([x in args_to_list_expr for x in args_to_expr]):
-            raise ValueError(f"`args_to_expr` and `args_to_list_expr` should be disjoint.")
+            raise ValueError("`args_to_expr` and `args_to_list_expr` should be disjoint.")
 
         def _convert(name: str, value: Any) -> Any:
             if value is None:
diff --git a/src/runtime/metal/metal_module.mm b/src/runtime/metal/metal_module.mm
index 6534d7c876..7e62412c72 100644
--- a/src/runtime/metal/metal_module.mm
+++ b/src/runtime/metal/metal_module.mm
@@ -286,7 +286,6 @@ TVM_REGISTER_GLOBAL("runtime.module.create_metal_module")
           source);
     });
 
-
 Module MetalModuleLoadBinary(void* strm) {
   dmlc::Stream* stream = static_cast<dmlc::Stream*>(strm);
   // version is reserved for future changes and
diff --git a/tests/lint/cppdocs.sh b/tests/lint/cppdocs.sh
index af5a98c513..00bb355551 100755
--- a/tests/lint/cppdocs.sh
+++ b/tests/lint/cppdocs.sh
@@ -25,7 +25,7 @@ trap cleanup EXIT
 
 make cppdoc 2>/tmp/$$.log.txt
 
-grep -v -E "ENABLE_PREPROCESSING|unsupported tag" < /tmp/$$.log.txt > /tmp/$$.logclean.txt || true
+grep -v -E "ENABLE_PREPROCESSING|unsupported tag|Inheritance graph" < /tmp/$$.log.txt > /tmp/$$.logclean.txt || true
 echo "---------Error Log----------"
 cat /tmp/$$.logclean.txt
 echo "----------------------------"
diff --git a/tests/lint/pylintrc b/tests/lint/pylintrc
index e646736a30..3b5e14d15b 100644
--- a/tests/lint/pylintrc
+++ b/tests/lint/pylintrc
@@ -120,7 +120,9 @@ disable=
     use-dict-literal,
     use-maxsplit-arg,
     useless-object-inheritance,
-    useless-suppression
+    useless-suppression,
+    use-list-literal,
+    arguments-renamed
 
 [REPORTS]
 


[tvm] 01/02: [LINT] Fix clang-format script for newest clang-format

Posted by tq...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

tqchen pushed a commit to branch unity-staging
in repository https://gitbox.apache.org/repos/asf/tvm.git

commit e1c2ed4863aec1e5cc3974b05eed0282d88f6027
Author: tqchen <ti...@gmail.com>
AuthorDate: Sun May 7 20:50:14 2023 -0400

    [LINT] Fix clang-format script for newest clang-format
    
    In the new clang-format, git-clang-format will exit 1 when there
    is diff, this PR ensures that the diff shows up in console.
---
 tests/lint/git-clang-format.sh | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/tests/lint/git-clang-format.sh b/tests/lint/git-clang-format.sh
index e640e05867..22e5833775 100755
--- a/tests/lint/git-clang-format.sh
+++ b/tests/lint/git-clang-format.sh
@@ -51,7 +51,12 @@ done
 
 cleanup()
 {
-  rm -rf /tmp/$$.clang-format.txt
+    if [ -f /tmp/$$.clang-format.txt ]; then
+       echo ""
+       echo "---------clang-format log----------"
+        cat /tmp/$$.clang-format.txt
+    fi
+    rm -rf /tmp/$$.clang-format.txt
 }
 trap cleanup 0
 
@@ -84,9 +89,6 @@ else
     git-${CLANG_FORMAT} --diff --extensions h,mm,c,cc --binary=${CLANG_FORMAT} "$REVISION" 1> /tmp/$$.clang-format.txt
 fi
 
-echo "---------clang-format log----------"
-cat /tmp/$$.clang-format.txt
-echo ""
 if grep --quiet -E "diff" < /tmp/$$.clang-format.txt; then
     echo "clang-format lint error found. Consider running clang-format-15 on these files to fix them."
     exit 1