You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Repeat the same workflow for `wrappers/FlashMLA`, `wrappers/FlashKDA`,
99
+
`wrappers/DeepGEMM`, or `wrappers/SageAttention` when those package surfaces
100
+
match your framework.
101
+
102
+
### Verify and Diagnose
103
+
104
+
Start with these commands after installation:
105
+
106
+
```bash
107
+
mate check
108
+
mate show-config
109
+
mate env
110
+
```
111
+
59
112
### Notes
60
113
61
114
- If the checkout was cloned without `--recursive`, run `git submodule update --init --recursive`.
@@ -75,6 +128,7 @@ MATE provides a command-line interface for configuration, debugging, diagnostics
75
128
|`mate check`| Validate the runtime environment |
76
129
|`mate show-config`| Display installation and runtime configuration |
77
130
|`mate env`| Show relevant environment variables |
131
+
|`mate guard-run -- COMMAND`| Run a workload with the guarded MUSA allocator installed at startup |
78
132
|`mate replay --dir PATH`| Replay API calls from Level 10 dumps |
79
133
|`mate list-dumps PATH`| List recorded dump directories |
80
134
@@ -84,6 +138,7 @@ Example:
84
138
mate check
85
139
mate show-config
86
140
mate env
141
+
mate guard-run -- python your_script.py
87
142
mate replay --dir mate_dumps/
88
143
mate list-dumps mate_dumps/
89
144
```
@@ -92,15 +147,22 @@ See [docs/mate_cli.md](docs/mate_cli.md) for full CLI documentation.
92
147
See [docs/environment_variables.md](docs/environment_variables.md) for the
93
148
complete environment variable reference.
94
149
150
+
## Memory Debug / Guard Allocator
151
+
152
+
MATE includes a guarded MUSA allocator that can replace the default `torch_musa` allocator during debugging to help localize out-of-bounds reads and writes across MUSA workloads. Start with `mate guard-run --mode tail -- python your_script.py`, or enable it in tests with `pytest --guard-alloc`. The detailed workflow, pytest defaults, and limitations are documented in [docs/guard_allocator.md](docs/guard_allocator.md).
153
+
95
154
## Wrappers
96
155
97
156
MATE uses the packages under `wrappers/` as a compatibility layer for CUDA-oriented software stacks on MUSA. These wrappers preserve familiar package names and high-level APIs while routing execution to MATE operators and kernels on MUSA, which helps existing integrations migrate with smaller code changes.
98
157
158
+
For the guided wrapper-first documentation path, start with [docs/source/overview.rst](docs/source/overview.rst) and [docs/source/wrapper_tutorials.rst](docs/source/wrapper_tutorials.rst) for the wrapper quickstart flow.
|`wrappers/flash-attention`|`flash_attn_3`|`flash_attn_interface`| FlashAttention-3-compatible APIs on top of MATE attention operators on MUSA |[wrapper README](wrappers/flash-attention/README.md), [compatibility summary](docs/flash_attention.md)|
162
+
|`wrappers/flash-attention`|`flash_attn_3`|`flash_attn_interface`| FlashAttention-3-compatible APIs on top of MATE attention operators on MUSA |[wrapper README](wrappers/flash-attention/README.md), [compatibility summary](docs/source/wrappers/flash_attention_forward_compatibility.md)|
102
163
|`wrappers/SageAttention`|`sageattention`|`sageattention`| SageAttention-compatible dense quantized attention wrapper on top of MATE on MUSA |[wrapper README](wrappers/SageAttention/README.md)|
103
164
|`wrappers/FlashMLA`|`flash_mla`|`flash_mla`| FlashMLA-compatible MLA dense/sparse decode and sparse prefill APIs on top of MATE MLA operators on MUSA |[wrapper README](wrappers/FlashMLA/README.md)|
165
+
|`wrappers/FlashKDA`|`flash_kda`|`flash_kda`| FlashKDA-compatible KDA forward APIs on top of MATE KDA operators on MUSA |[wrapper README](wrappers/FlashKDA/README.md)|
104
166
|`wrappers/DeepGEMM`|`deep-gemm`|`deep_gemm`| DeepGEMM-compatible APIs on top of MATE GEMM operators on MUSA |[wrapper README](wrappers/DeepGEMM/README.md)|
105
167
106
168
## Repository Layout
@@ -118,19 +180,21 @@ MATE uses the packages under `wrappers/` as a compatibility layer for CUDA-orien
118
180
After installing `mate`, build the Sphinx docs with:
0 commit comments