Skip to content

Commit

Permalink
add annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
weilinquan committed Dec 15, 2023
1 parent 811d8ec commit e556e96
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 1 deletion.
20 changes: 20 additions & 0 deletions frontend/Python/graph/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,21 @@
# ===- __init__.py -------------------------------------------------------
#
# Licensed 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.
#
# ===---------------------------------------------------------------------------
#
# Init the packages in graph directory.
#
# ===---------------------------------------------------------------------------

from .graph import Graph
1 change: 1 addition & 0 deletions frontend/Python/graph/graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
# This is the graph level of the Buddy Compiler frontend.
#
# ===---------------------------------------------------------------------------

import mlir.ir as ir
from mlir.passmanager import *
from mlir.execution_engine import *
Expand Down
21 changes: 20 additions & 1 deletion frontend/Python/graph/graph_importer.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,30 @@
# ===- graph_importer.py -------------------------------------------------------
#
# Licensed 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.
#
# ===---------------------------------------------------------------------------
#
# This is the graph importer for Buddy Compiler's graph.
#
# ===---------------------------------------------------------------------------

import operator
from typing import Any, List, Optional
import functools

import mlir.dialects.func as func
import mlir.ir as ir
import torch
from torch._functorch.aot_autograd import aot_module_simplified


class FXGraphImporter:
Expand Down

0 comments on commit e556e96

Please sign in to comment.