Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
tilelang
Commits
b1922518
Unverified
Commit
b1922518
authored
Nov 18, 2025
by
Yichen Yan
Committed by
GitHub
Nov 18, 2025
Browse files
[Minor] Remove from __future__ import annotations for python 3.8 (#1273)
parent
220c3236
Changes
47
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
5 additions
and
29 deletions
+5
-29
tilelang/carver/arch/arch_base.py
tilelang/carver/arch/arch_base.py
+0
-3
tilelang/carver/common_schedules.py
tilelang/carver/common_schedules.py
+0
-1
tilelang/carver/roller/hint.py
tilelang/carver/roller/hint.py
+1
-2
tilelang/carver/roller/policy/common.py
tilelang/carver/roller/policy/common.py
+0
-1
tilelang/carver/roller/rasterization.py
tilelang/carver/roller/rasterization.py
+0
-1
tilelang/carver/roller/shape_inference/common.py
tilelang/carver/roller/shape_inference/common.py
+0
-1
tilelang/carver/roller/shape_inference/tir.py
tilelang/carver/roller/shape_inference/tir.py
+0
-1
tilelang/carver/template/base.py
tilelang/carver/template/base.py
+3
-4
tilelang/carver/template/conv.py
tilelang/carver/template/conv.py
+0
-1
tilelang/carver/template/elementwise.py
tilelang/carver/template/elementwise.py
+0
-1
tilelang/carver/template/flashattention.py
tilelang/carver/template/flashattention.py
+0
-1
tilelang/carver/template/gemv.py
tilelang/carver/template/gemv.py
+0
-1
tilelang/carver/template/matmul.py
tilelang/carver/template/matmul.py
+0
-1
tilelang/contrib/cc.py
tilelang/contrib/cc.py
+0
-1
tilelang/contrib/nvcc.py
tilelang/contrib/nvcc.py
+0
-1
tilelang/intrinsics/mma_sm70_layout.py
tilelang/intrinsics/mma_sm70_layout.py
+0
-3
tilelang/jit/adapter/ctypes/adapter.py
tilelang/jit/adapter/ctypes/adapter.py
+0
-1
tilelang/jit/adapter/cython/adapter.py
tilelang/jit/adapter/cython/adapter.py
+0
-1
tilelang/jit/adapter/dlpack.py
tilelang/jit/adapter/dlpack.py
+0
-2
tilelang/language/allocate.py
tilelang/language/allocate.py
+1
-1
No files found.
tilelang/carver/arch/arch_base.py
View file @
b1922518
from
__future__
import
annotations
class
TileDevice
:
class
TileDevice
:
"""
"""
Represents the architecture of a computing device, capturing various hardware specifications.
Represents the architecture of a computing device, capturing various hardware specifications.
...
...
tilelang/carver/common_schedules.py
View file @
b1922518
...
@@ -19,7 +19,6 @@
...
@@ -19,7 +19,6 @@
# Modifications Copyright (c) Microsoft.
# Modifications Copyright (c) Microsoft.
# The code below is mostly copied from apache/tvm common_schedules.py in dlight.
# The code below is mostly copied from apache/tvm common_schedules.py in dlight.
"""Common schedule strategies for TIR."""
"""Common schedule strategies for TIR."""
from
__future__
import
annotations
from
typing
import
Callable
from
typing
import
Callable
from
tvm
import
tir
from
tvm
import
tir
...
...
tilelang/carver/roller/hint.py
View file @
b1922518
"""Hint definition for schedule"""
"""Hint definition for schedule"""
from
__future__
import
annotations
from
tvm
import
DataType
from
tvm
import
DataType
from
.
import
PrimFuncNode
from
.
import
PrimFuncNode
import
numpy
as
np
import
numpy
as
np
...
@@ -218,7 +217,7 @@ class Hint:
...
@@ -218,7 +217,7 @@ class Hint:
return
dic
return
dic
@
classmethod
@
classmethod
def
from_dict
(
cls
,
dic
:
dict
)
->
Hint
:
def
from_dict
(
cls
,
dic
:
dict
)
->
'
Hint
'
:
hint
=
cls
()
hint
=
cls
()
for
k
,
v
in
dic
.
items
():
for
k
,
v
in
dic
.
items
():
setattr
(
hint
,
k
,
v
)
setattr
(
hint
,
k
,
v
)
...
...
tilelang/carver/roller/policy/common.py
View file @
b1922518
from
__future__
import
annotations
import
numpy
as
np
import
numpy
as
np
...
...
tilelang/carver/roller/rasterization.py
View file @
b1922518
"""Rasteration Plan For L2 Cache Locality"""
"""Rasteration Plan For L2 Cache Locality"""
from
__future__
import
annotations
class
Rasterization
:
class
Rasterization
:
...
...
tilelang/carver/roller/shape_inference/common.py
View file @
b1922518
from
__future__
import
annotations
from
collections
import
OrderedDict
from
collections
import
OrderedDict
from
tvm
import
arith
from
tvm
import
arith
...
...
tilelang/carver/roller/shape_inference/tir.py
View file @
b1922518
from
__future__
import
annotations
from
collections.abc
import
Mapping
from
collections.abc
import
Mapping
from
tvm.tir.schedule.schedule
import
BlockRV
from
tvm.tir.schedule.schedule
import
BlockRV
from
tvm.ir
import
structural_equal
from
tvm.ir
import
structural_equal
...
...
tilelang/carver/template/base.py
View file @
b1922518
# Import necessary modules and classes
# Import necessary modules and classes
from
__future__
import
annotations
from
abc
import
ABC
,
abstractmethod
# For defining abstract base classes
from
abc
import
ABC
,
abstractmethod
# For defining abstract base classes
from
dataclasses
import
dataclass
,
field
# For defining data classes
from
dataclasses
import
dataclass
,
field
# For defining data classes
from
..arch
import
(
# Import architecture-related utilities and classes
from
..arch
import
(
# Import architecture-related utilities and classes
...
@@ -42,7 +41,7 @@ class BaseTemplate(ABC):
...
@@ -42,7 +41,7 @@ class BaseTemplate(ABC):
"""
"""
pass
pass
def
with_arch
(
self
,
arch
:
TileDevice
)
->
BaseTemplate
:
def
with_arch
(
self
,
arch
:
TileDevice
)
->
'
BaseTemplate
'
:
"""
"""
Sets the architecture for this template and returns itself.
Sets the architecture for this template and returns itself.
...
@@ -110,7 +109,7 @@ class BaseTemplate(ABC):
...
@@ -110,7 +109,7 @@ class BaseTemplate(ABC):
"""
"""
raise
NotImplementedError
(
"initialize_function is not implemented"
)
raise
NotImplementedError
(
"initialize_function is not implemented"
)
def
set_function
(
self
,
func
:
PrimFunc
)
->
BaseTemplate
:
def
set_function
(
self
,
func
:
PrimFunc
)
->
'
BaseTemplate
'
:
"""
"""
Sets the function for this template and returns itself.
Sets the function for this template and returns itself.
...
@@ -123,7 +122,7 @@ class BaseTemplate(ABC):
...
@@ -123,7 +122,7 @@ class BaseTemplate(ABC):
self
.
_func
=
func
self
.
_func
=
func
return
self
return
self
def
set_output_nodes
(
self
,
output_nodes
:
list
[
OutputNode
])
->
BaseTemplate
:
def
set_output_nodes
(
self
,
output_nodes
:
list
[
OutputNode
])
->
'
BaseTemplate
'
:
"""
"""
Sets the output nodes for this template and returns itself.
Sets the output nodes for this template and returns itself.
...
...
tilelang/carver/template/conv.py
View file @
b1922518
from
__future__
import
annotations
from
dataclasses
import
dataclass
from
dataclasses
import
dataclass
from
.base
import
BaseTemplate
from
.base
import
BaseTemplate
from
tvm
import
te
,
tir
from
tvm
import
te
,
tir
...
...
tilelang/carver/template/elementwise.py
View file @
b1922518
# Import necessary modules
# Import necessary modules
from
__future__
import
annotations
from
dataclasses
import
dataclass
# Used for defining data classes
from
dataclasses
import
dataclass
# Used for defining data classes
from
.base
import
BaseTemplate
# Importing the base class for templates
from
.base
import
BaseTemplate
# Importing the base class for templates
from
tvm
import
te
# Importing TVM's tensor expression module
from
tvm
import
te
# Importing TVM's tensor expression module
...
...
tilelang/carver/template/flashattention.py
View file @
b1922518
from
__future__
import
annotations
from
dataclasses
import
dataclass
from
dataclasses
import
dataclass
from
.base
import
BaseTemplate
from
.base
import
BaseTemplate
from
tvm
import
te
from
tvm
import
te
...
...
tilelang/carver/template/gemv.py
View file @
b1922518
from
__future__
import
annotations
from
dataclasses
import
dataclass
from
dataclasses
import
dataclass
from
.base
import
BaseTemplate
from
.base
import
BaseTemplate
from
tvm
import
te
from
tvm
import
te
...
...
tilelang/carver/template/matmul.py
View file @
b1922518
from
__future__
import
annotations
from
dataclasses
import
dataclass
from
dataclasses
import
dataclass
from
.base
import
BaseTemplate
from
.base
import
BaseTemplate
from
tvm
import
te
from
tvm
import
te
...
...
tilelang/contrib/cc.py
View file @
b1922518
...
@@ -15,7 +15,6 @@
...
@@ -15,7 +15,6 @@
# specific language governing permissions and limitations
# specific language governing permissions and limitations
# under the License.
# under the License.
"""Util to invoke C/C++ compilers in the system."""
"""Util to invoke C/C++ compilers in the system."""
from
__future__
import
annotations
import
functools
import
functools
import
os
import
os
import
shutil
import
shutil
...
...
tilelang/contrib/nvcc.py
View file @
b1922518
# pylint: disable=invalid-name
# pylint: disable=invalid-name
# modified from apache tvm python/tvm/contrib/nvcc.py
# modified from apache tvm python/tvm/contrib/nvcc.py
"""Utility to invoke nvcc compiler in the system"""
"""Utility to invoke nvcc compiler in the system"""
from
__future__
import
absolute_import
as
_abs
from
__future__
import
annotations
from
__future__
import
annotations
import
os
import
os
...
...
tilelang/intrinsics/mma_sm70_layout.py
View file @
b1922518
from
__future__
import
annotations
def
shared_16x4_to_mma_a_32x4_layout
(
row
,
col
,
rep
):
def
shared_16x4_to_mma_a_32x4_layout
(
row
,
col
,
rep
):
tid
=
(
row
%
4
)
+
16
*
((
row
//
4
)
%
2
)
+
4
*
(
row
//
8
)
+
8
*
rep
tid
=
(
row
%
4
)
+
16
*
((
row
//
4
)
%
2
)
+
4
*
(
row
//
8
)
+
8
*
rep
local_id
=
col
local_id
=
col
...
...
tilelang/jit/adapter/ctypes/adapter.py
View file @
b1922518
"""The profiler and convert to torch utils"""
"""The profiler and convert to torch utils"""
from
__future__
import
annotations
from
__future__
import
annotations
import
torch
import
torch
from
..base
import
BaseKernelAdapter
from
..base
import
BaseKernelAdapter
import
ctypes
import
ctypes
...
...
tilelang/jit/adapter/cython/adapter.py
View file @
b1922518
"""The profiler and convert to torch utils"""
"""The profiler and convert to torch utils"""
from
__future__
import
annotations
from
__future__
import
annotations
import
ctypes
import
ctypes
import
logging
import
logging
import
torch
import
torch
...
...
tilelang/jit/adapter/dlpack.py
View file @
b1922518
"""The profiler and convert to torch utils"""
"""The profiler and convert to torch utils"""
from
__future__
import
annotations
import
torch
import
torch
from
tilelang.contrib.dlpack
import
to_pytorch_func
from
tilelang.contrib.dlpack
import
to_pytorch_func
from
.base
import
BaseKernelAdapter
from
.base
import
BaseKernelAdapter
...
...
tilelang/language/allocate.py
View file @
b1922518
...
@@ -13,8 +13,8 @@ Available allocation functions:
...
@@ -13,8 +13,8 @@ Available allocation functions:
Each function takes shape and dtype parameters and returns a TVM buffer object
Each function takes shape and dtype parameters and returns a TVM buffer object
with the appropriate memory scope.
with the appropriate memory scope.
"""
"""
from
__future__
import
annotations
from
__future__
import
annotations
from
typing
import
overload
,
Literal
from
typing
import
overload
,
Literal
from
tilelang
import
tvm
as
tvm
from
tilelang
import
tvm
as
tvm
from
tvm.script
import
tir
as
T
from
tvm.script
import
tir
as
T
...
...
Prev
1
2
3
Next
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