Instructions to use Ashiedu/fused-split with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Kernels
How to use Ashiedu/fused-split with Kernels:
# !pip install kernels from kernels import get_kernel kernel = get_kernel("Ashiedu/fused-split") - Notebooks
- Google Colab
- Kaggle
| import platform | |
| import torch | |
| import fused_split | |
| def test_fused_split(): | |
| if platform.system() == "Darwin": | |
| device = torch.device("mps") | |
| elif hasattr(torch, "xpu") and torch.xpu.is_available(): | |
| device = torch.device("xpu") | |
| elif torch.version.cuda is not None and torch.cuda.is_available(): | |
| device = torch.device("cuda") | |
| else: | |
| device = torch.device("cpu") | |
| x = torch.randn(1024, 1024, dtype=torch.float32, device=device) | |
| expected = x + 1.0 | |
| result = fused_split.fused_split(x) | |
| torch.testing.assert_close(result, expected) |