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
3852d58b
Commit
3852d58b
authored
Apr 03, 2026
by
wangziyang
Browse files
update cp_async & init inject_ds_read
parent
19cdf0ca
Changes
22
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
0 deletions
+23
-0
tilelang/tileop/gemm/gemm_mma.py
tilelang/tileop/gemm/gemm_mma.py
+4
-0
tilelang/transform/__init__.py
tilelang/transform/__init__.py
+19
-0
No files found.
tilelang/tileop/gemm/gemm_mma.py
View file @
3852d58b
...
...
@@ -29,24 +29,28 @@ class GemmMMA(GemmBase):
chunk
=
self
.
chunk
,
)
if
self
.
is_gemm_ss
():
print
(
"gemm_ss"
)
return
{
self
.
A
:
make_swizzled_layout
(
self
.
A
),
self
.
B
:
make_swizzled_layout
(
self
.
B
),
self
.
C
:
mma_emitter
.
make_mma_store_layout
(
self
.
C
),
}
elif
self
.
is_gemm_sr
():
print
(
"gemm_ss"
)
return
{
self
.
A
:
make_swizzled_layout
(
self
.
A
),
self
.
B
:
mma_emitter
.
make_mma_load_layout
(
self
.
B
,
matrix
=
"B"
),
self
.
C
:
mma_emitter
.
make_mma_store_layout
(
self
.
C
),
}
elif
self
.
is_gemm_rs
():
print
(
"gemm_ss"
)
return
{
self
.
A
:
mma_emitter
.
make_mma_load_layout
(
self
.
A
,
matrix
=
"A"
),
self
.
B
:
make_swizzled_layout
(
self
.
B
),
self
.
C
:
mma_emitter
.
make_mma_store_layout
(
self
.
C
),
}
elif
self
.
is_gemm_rr
():
print
(
"gemm_ss"
)
return
{
self
.
A
:
mma_emitter
.
make_mma_load_layout
(
self
.
A
,
matrix
=
"A"
),
self
.
B
:
mma_emitter
.
make_mma_load_layout
(
self
.
B
,
matrix
=
"B"
),
...
...
tilelang/transform/__init__.py
View file @
3852d58b
...
...
@@ -338,9 +338,28 @@ def InjectPTXAsyncCopy():
fpass : tvm.transform.Pass
The result pass
"""
print
(
"Injecting PTX async copy for global to shared memory copy on DCU."
)
return
_ffi_api
.
InjectPTXAsyncCopy
()
# type: ignore
def
InjectDSRead
():
"""Rewrite shared memory to register load using ds_read hardware instructions on DCU.
This pass replaces BufferLoad from shared memory with ds_read_b64 or
ds_read_m32x16_b16 hardware instructions for AMD DCU (gfx936, gfx942, etc.).
- ds_read_b64: loads 8 bytes (4 halfs or 2 floats) at once
- ds_read_m32x16_b16: loads 32 bytes (16 halfs) at once
Returns
-------
fpass : tvm.transform.Pass
The result pass
"""
print
(
"Injecting ds_read for shared to register memory copy on DCU."
)
return
_ffi_api
.
InjectDSRead
()
# type: ignore
def
LowerDeviceStorageAccessInfo
():
"""Lower attached storage access information on device.
...
...
Prev
1
2
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