microsoft / microsoft/MInference
[Bug]: "Illegal memory access was encountered" at vertical_slash_kernel
Open
@iofu728 is already working on this.
Since Mar 18, 2025.
bug
- Dominant language
- Python
- Stars
- 1.2k
- Forks
- 82
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 1
Description
Describe the bug
Hi! Thanks for the great work! I encountered this error when trying to use vertical_slash_sparse_attention, any possible solution would be greatly appreciated!
File "/path/MInference/minference/ops/pit_sparse_flash_attention_v2.py", line 203, in vertical_slash_sparse_attention
out = _triton_mixed_sparse_attention(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/path/MInference/minference/ops/pit_sparse_flash_attention_v2.py", line 153, in _triton_mixed_sparse_attention
o = torch.zeros_like(q)
^^^^^^^^^^^^^^^^^^^
RuntimeError: CUDA error: an illegal memory access was encountered
Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.
Steps to reproduce
I try to create some extra pytorch tensors before using the kernel, and the more operations I make, the more easily this error is reproduced. Is it possible that some tensor operations contradict with the triton kernel?
Expected Behavior
No response
Logs
No response
Additional Information
No response
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.