| 7 | #include "position_embedding/pos_encoding.h" |
| 8 | |
| 9 | PYBIND11_MODULE(TORCH_EXTENSION_NAME, m) |
| 10 | { |
| 11 | m.def("layernorm_forward_cuda", &layernorm_forward_cuda, "FasterTransformer layernorm kernel"); |
| 12 | m.def("gemm_forward_cuda", &gemm_forward_cuda, "Quantized GEMM kernel."); |
| 13 | m.def("gemv_forward_cuda", &gemv_forward_cuda, "Quantized GEMV kernel."); |
| 14 | m.def("rotary_embedding_neox", &rotary_embedding_neox, "Apply GPT-NeoX style rotary embedding to query and key"); |
| 15 | m.def("single_query_attention", &single_query_attention, "Attention with a single query", |
| 16 | py::arg("q"), py::arg("k"), py::arg("v"), py::arg("k_cache"), py::arg("v_cache"), |
| 17 | py::arg("length_per_sample_"), py::arg("alibi_slopes_"), py::arg("timestep"), py::arg("rotary_embedding_dim")=0, |
| 18 | py::arg("rotary_base")=10000.0f, py::arg("neox_rotary_style")=true); |
| 19 | } |
nothing calls this directly
no outgoing calls
no test coverage detected