Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tic
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wenyuanbo
tic
Commits
869b718a
Unverified
Commit
869b718a
authored
Apr 07, 2020
by
Tianqi Chen
Committed by
GitHub
Apr 07, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[TIR] Fix perf regression of tir refactor (#5258)
parent
7902f762
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
6 additions
and
6 deletions
+6
-6
python/tvm/driver/build_module.py
+1
-1
python/tvm/testing.py
+1
-1
src/driver/driver_api.cc
+1
-1
tests/python/unittest/test_target_codegen_static_init.py
+1
-1
tests/python/unittest/test_target_codegen_vm_basic.py
+1
-1
tests/python/unittest/test_tir_transform_make_packed_api.py
+1
-1
No files found.
python/tvm/driver/build_module.py
View file @
869b718a
...
...
@@ -198,7 +198,7 @@ def lower(sch,
f
=
tvm
.
tir
.
PrimFunc
(
arg_list
,
stmt
)
.
with_attr
(
"global_symbol"
,
tvm
.
runtime
.
String
(
name
))
if
cfg
.
restricted_func
:
f
=
f
.
with_attr
(
"tir.no
_
alias"
,
True
)
f
=
f
.
with_attr
(
"tir.noalias"
,
True
)
mod
=
tvm
.
IRModule
({
name
:
f
})
return
tvm
.
tir
.
transform
.
MakePackedAPI
()(
mod
)
...
...
python/tvm/testing.py
View file @
869b718a
...
...
@@ -199,7 +199,7 @@ def MakeAPILegacy(stmt, name, args, num_unpacked_args, noalias):
"global_symbol"
,
tvm
.
runtime
.
String
(
name
))
f
=
f
.
with_attr
(
"tir.is_entry_func"
,
True
)
if
noalias
:
f
=
f
.
with_attr
(
"tir.no
_
alias"
,
True
)
f
=
f
.
with_attr
(
"tir.noalias"
,
True
)
mod
=
tvm
.
IRModule
({
name
:
f
})
return
tvm
.
tir
.
transform
.
MakePackedAPI
(
num_unpacked_args
)(
mod
)
...
...
src/driver/driver_api.cc
View file @
869b718a
...
...
@@ -214,7 +214,7 @@ IRModule lower(te::Schedule sch,
f
=
WithAttr
(
std
::
move
(
f
),
"global_symbol"
,
runtime
::
String
(
name
));
if
(
config
->
restricted_func
)
{
f
=
WithAttr
(
std
::
move
(
f
),
"tir.no
_
alias"
,
Integer
(
1
));
f
=
WithAttr
(
std
::
move
(
f
),
"tir.noalias"
,
Integer
(
1
));
}
auto
mod
=
IRModule
(
Map
<
GlobalVar
,
BaseFunc
>
({{
GlobalVar
(
name
),
f
}}));
return
tir
::
transform
::
MakePackedAPI
(
0
)(
mod
);
...
...
tests/python/unittest/test_target_codegen_static_init.py
View file @
869b718a
...
...
@@ -26,7 +26,7 @@ def MakeAPILegacy(stmt, name, args, num_unpacked_args, noalias):
"global_symbol"
,
tvm
.
runtime
.
String
(
name
))
f
=
f
.
with_attr
(
"tir.is_entry_func"
,
True
)
if
noalias
:
f
=
f
.
with_attr
(
"tir.no
_
alias"
,
True
)
f
=
f
.
with_attr
(
"tir.noalias"
,
True
)
mod
=
tvm
.
IRModule
.
from_expr
(
f
)
return
tvm
.
tir
.
transform
.
MakePackedAPI
()(
mod
)
...
...
tests/python/unittest/test_target_codegen_vm_basic.py
View file @
869b718a
...
...
@@ -33,7 +33,7 @@ def MakeAPILegacy(stmt, name, args, num_unpacked_args, noalias):
"global_symbol"
,
tvm
.
runtime
.
String
(
name
))
f
=
f
.
with_attr
(
"tir.is_entry_func"
,
True
)
if
noalias
:
f
=
f
.
with_attr
(
"tir.no
_
alias"
,
True
)
f
=
f
.
with_attr
(
"tir.noalias"
,
True
)
mod
=
tvm
.
IRModule
.
from_expr
(
f
)
return
tvm
.
tir
.
transform
.
MakePackedAPI
()(
mod
)
...
...
tests/python/unittest/test_tir_transform_make_packed_api.py
View file @
869b718a
...
...
@@ -36,7 +36,7 @@ def test_makeapi():
num_unpacked_args
=
2
f
=
tvm
.
tir
.
PrimFunc
([
n
,
Ab
,
Bb
,
Cb
],
stmt
)
.
with_attr
(
"tir.no
_
alias"
,
True
)
.
with_attr
(
"global_symbol"
,
tvm
.
runtime
.
String
(
"myadd"
))
"tir.noalias"
,
True
)
.
with_attr
(
"global_symbol"
,
tvm
.
runtime
.
String
(
"myadd"
))
mod
=
tvm
.
IRModule
.
from_expr
(
f
)
f
=
tvm
.
tir
.
transform
.
MakePackedAPI
(
num_unpacked_args
)(
mod
)[
"main"
]
assert
(
len
(
f
.
params
)
==
7
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment