You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by "yongwww (via GitHub)" <gi...@apache.org> on 2023/04/14 23:21:26 UTC

[GitHub] [tvm] yongwww commented on a diff in pull request #14460: [Unity][Frontend] Translate StableHLO to Relax

yongwww commented on code in PR #14460:
URL: https://github.com/apache/tvm/pull/14460#discussion_r1167329579


##########
python/tvm/relax/frontend/stablehlo/stablehlo_translator.py:
##########
@@ -0,0 +1,417 @@
+# 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.
+
+# pylint: disable=invalid-name, inconsistent-return-statements, unidiomatic-typecheck
+# pylint: disable=import-outside-toplevel, unused-argument, no-member
+"""StableHLO frontend of Relax."""
+from typing import Callable, Dict, List, Tuple, Union, Any
+import numpy as np
+
+from jaxlib import mlir
+from jaxlib.mlir.dialects import stablehlo
+
+import tvm
+from tvm import relax, tir
+
+
+class StableHLOImporter:

Review Comment:
   That's a good idea. We can certainly proceed with it. For now in this pr, we may consider this as a todo, as the currently available shared helper functions are somewhat limited.



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

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