Skip to content
This repository has been archived by the owner on May 22, 2023. It is now read-only.

[Relax][frontend] torch fx importer #419

Merged
merged 4 commits into from
Feb 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion python/tvm/relax/block_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -601,7 +601,7 @@ def match_cast(self, value: Expr, struct_info: StructInfo) -> Var:
"""
return _ffi_api.BlockBuilderEmitMatchCast(self, value, struct_info) # type: ignore

def emit_output(self, output: Union[Expr, Tuple, List[Expr]]) -> None:
def emit_output(self, output: Union[Expr, Tuple, List[Expr]]) -> Var:
"""Emit output for the current dataflow block or function.

Parameters
Expand Down
19 changes: 19 additions & 0 deletions python/tvm/relax/frontend/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# 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.
"""
Frontends for constructing Relax programs, with the model importers
"""
20 changes: 20 additions & 0 deletions python/tvm/relax/frontend/torch/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# 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.
"""
PyTorch Frontends for constructing Relax programs, with the model importers
"""
from .fx_translator import from_fx
Loading