Skip to content

sm120 attempt - #1

Draft
createthis wants to merge 1 commit into
mainfrom
sm120a
Draft

createthis wants to merge 1 commit into
mainfrom
sm120a

Conversation

@createthis

Copy link
Copy Markdown
Owner
  • Copied sm100_fp8_paged_mqa_logits.cuh over to sm120_fp8_paged_mqa_logits.cuh.
  • Tweaked knobs so that it uses 46k shared memory.
  • Currently failing with Illegal barrier arrive operation.

My initial goal was to get this working on my blackwell 6000 pro:

DG_JIT_DEBUG=1 python bench_fp8_paged_mqa_logits.py

But it fails.

So I ran compute sanitizer:

python tests/test_sanitizer.py   --funcs test_attention.test_paged_mqa_logits   --tools memcheck,synccheck

Result:

========= Illegal barrier arrive operation
=========     at void deep_gemm::sm120_fp8_paged_mqa_logits<(unsigned int)1, (unsigned int)64, (unsigned int)128, (unsigned int)64, (bool)0, (unsigned int)2, (unsigned int)1, (unsigned int)64, (unsigned int)128, (unsigned int)128>(unsigned int, unsigned long, unsigned long, const unsigned int *, float *, const unsigned int *, const unsigned int *, CUtensorMap_st, CUtensorMap_st, CUtensorMap_st, CUtensorMap_st)+0x2380
=========     by thread (34,0,0) in block (15,0,0)
=========     Saved host backtrace up to driver entry point at kernel launch time
=========         Host Frame: deep_gemm::attention::fp8_paged_mqa_logits(at::Tensor const&, at::Tensor const&, at::Tensor const&, at::Tensor const&, at::Tensor const&, at::Tensor const&, int const&, bool const&) [0x5eebf] in _C.cpython-311-x86_64-linux-gnu.so
=========         Host Frame: pybind11::cpp_function::initialize<at::Tensor (*&)(at::Tensor const&, at::Tensor const&, at::Tensor const&, at::Tensor const&, at::Tensor const&, at::Tensor const&, int const&, bool const&), at::Tensor, at::Tensor const&, at::Tensor const&, at::Tensor const&, at::Tensor const&, at::Tensor const&, at::Tensor const&, int const&, bool const&, pybind11::name, pybind11::scope, pybind11::sibling, pybind11::arg, pybind11::arg, pybind11::arg, pybind11::arg, pybind11::arg, pybind11::arg, pybind11::arg, pybind11::arg_v>(at::Tensor (*&)(at::Tensor const&, at::Tensor const&, at::Tensor const&, at::Tensor const&, at::Tensor const&, at::Tensor const&, int const&, bool const&), at::Tensor (*)(at::Tensor const&, at::Tensor const&, at::Tensor const&, at::Tensor const&, at::Tensor const&, at::Tensor const&, int const&, bool const&), pybind11::name const&, pybind11::scope const&, pybind11::sibling const&, pybind11::arg const&, pybind11::arg const&, pybind11::arg const&, pybind11::arg const&, pybind11::arg const&, pybind11::arg const&, pybind11::arg const&, pybind11::arg_v const&)::{lambda(pybind11::detail::function_call&)#1}::_FUN(pybind11::detail::function_call&) [0x93e91] in _C.cpython-311-x86_64-linux-gnu.so
=========         Host Frame: pybind11::cpp_function::dispatcher(_object*, _object*, _object*) [0x896ed] in _C.cpython-311-x86_64-linux-gnu.so
=========         Host Frame: cfunction_call in methodobject.c:542 [0x128656] in python
=========         Host Frame: _PyObject_MakeTpCall in call.c:214 [0x10400b] in python
=========         Host Frame: _PyEval_EvalFrameDefault in ceval.c:4769 [0x111615] in python
=========         Host Frame: _PyEval_Vector in ceval.c:6434 [0x1cc389] in python
=========         Host Frame: PyEval_EvalCode in ceval.c:1148 [0x1cba5e] in python
=========         Host Frame: run_eval_code_obj in pythonrun.c:1741 [0x1ec976] in python
=========         Host Frame: run_mod in pythonrun.c:1762 [0x1e850f] in python
=========         Host Frame: PyRun_StringFlags in pythonrun.c:1632 [0x1db0be] in python
=========         Host Frame: PyRun_SimpleStringFlags in pythonrun.c:487 [0x1dae6a] in python
=========         Host Frame: Py_RunMain in main.c:684 [0x1f71a7] in python
=========         Host Frame: Py_BytesMain in main.c:738 [0x1bbf48] in python
=========         Host Frame: __libc_start_call_main in libc_start_call_main.h:58 [0x2a1c9] in libc.so.6
=========         Host Frame: __libc_start_main in libc-start.c:360 [0x2a28a] in libc.so.6
=========         Host Frame:  [0x1bbd96] in python
=========         Host Frame: test_paged_mqa_logits in test_attention.py:245
=========         Host Frame: <module> in <string>:13

sm120_fp8_paged_mqa_logits.cuh. Tweaked knobs so that it uses 46k shared
memory. Currently failing with Illegal barrier arrive operation.
@fernandaspets

Copy link
Copy Markdown

@createthis

createthis commented Dec 4, 2025 •

Copy link
Copy Markdown
Owner Author

nice! not sure how related or not this is but might be interesting: https://github.com/IISuperluminaLII/FlashMLA_Windows_Linux_sm120

This repo is strange. It looks like the sparse kernels are only sm90 and sm100, just like DeepGEMM. There is a dense kernel for sm120... but... we need sparse kernels. Odd. Also, since this is FlashMLA, I don't think this repo even has an FP8 lightning indexer kernel. This is intended to cover other parts of the DSA system.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants