Instructions to use Ashiedu/mamba1-selective-scan with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Kernels
How to use Ashiedu/mamba1-selective-scan with Kernels:
# !pip install kernels from kernels import get_kernel kernel = get_kernel("Ashiedu/mamba1-selective-scan") - Notebooks
- Google Colab
- Kaggle
File size: 676 Bytes
50cbada | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | #include <torch/library.h>
#include "registration.h"
#include "torch_binding.h"
TORCH_LIBRARY_EXPAND(TORCH_EXTENSION_NAME, ops) {
ops.def("mamba1_selective_scan(Tensor! out, Tensor input) -> ()");
#if defined(CPU_KERNEL)
ops.impl("mamba1_selective_scan", torch::kCPU, &mamba1_selective_scan);
#elif defined(CUDA_KERNEL) || defined(ROCM_KERNEL)
ops.impl("mamba1_selective_scan", torch::kCUDA, &mamba1_selective_scan);
#elif defined(METAL_KERNEL)
ops.impl("mamba1_selective_scan", torch::kMPS, mamba1_selective_scan);
#elif defined(XPU_KERNEL)
ops.impl("mamba1_selective_scan", torch::kXPU, &mamba1_selective_scan);
#endif
}
REGISTER_EXTENSION(TORCH_EXTENSION_NAME) |