Skip to content

Commit

Permalink
fix relay/relax import and debug_info
Browse files Browse the repository at this point in the history
  • Loading branch information
Hzfengsy committed Feb 6, 2024
1 parent 90e1f34 commit e5d1958
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
10 changes: 5 additions & 5 deletions python/tvm/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,11 @@
# support infra
from . import support

# tvm.relay
from . import relay

# tvm.relax
from . import relax
# Relay and Relax contain modules that are only available in compiler package
# Do not import them if TVM is built with runtime only
if not _RUNTIME_ONLY:
from . import relay
from . import relax

# Contrib initializers
from .contrib import rocm as _rocm, nvcc as _nvcc, sdaccel as _sdaccel
Expand Down
4 changes: 1 addition & 3 deletions tests/python/tir-base/test_debug_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,7 @@ def test_llvm_ir_debug_accuracy():
locations = find_di_locations(source)

# Find the 'assert' from MyModule
debug_dir_match = re.search(
r"tail call void %0\(i8\* getelementptr inbounds .* !dbg !(\d+)\n", source
)
debug_dir_match = re.search(r"tail call void %0\(.* !dbg !(\d+)\n", source)

# Extract out the debug directive line
directive_idx = debug_dir_match.groups()[0]
Expand Down

0 comments on commit e5d1958

Please sign in to comment.