leandron commented on a change in pull request #6302: URL: https://github.com/apache/incubator-tvm/pull/6302#discussion_r483539372
########## File path: python/tvm/driver/tvmc/frontends.py ########## @@ -0,0 +1,389 @@ +# 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 parse models from different frameworks into Relay networks. + +Frontend classes do lazy-loading of modules on purpose, to reduce time spent on +loading the tool. +""" +import logging +import os +import sys +from abc import ABC +from abc import abstractmethod +from pathlib import Path + +from tvm.driver.tvmc.common import TVMCException + + +class Frontend(ABC): + """Abstract class for frontend""" + + @staticmethod + @abstractmethod + def name(): + """Frontend name""" + + @staticmethod + @abstractmethod + def suffixes(): + """File suffixes (extensions) used by this frontend""" + + @abstractmethod + def load(self, path, shapes): + """Load network""" Review comment: Done ---------------------------------------------------------------- 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]
