Instructions to use SuperexponentialAI/relu with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Kernels
How to use SuperexponentialAI/relu with Kernels:
# !pip install kernels from kernels import get_kernel # a version (or an explicit revision) is required; see the "Files and versions" tab for the available ones kernel = get_kernel("SuperexponentialAI/relu", version=1) - Notebooks
- Google Colab
- Kaggle
Optimized relu: cpu/cuda/xpu, 1.2-1.85x faster on RTX 4090, benchmarked vs upstream and torch.relu
e873e70 verified Download build/torch-ext/torch_binding.cpp from SuperexponentialAI/relu: direct link, hf CLI and curl.
- Browser
- Download file 524 Bytes
-
https://huggingface.co/SuperexponentialAI/relu/resolve/main/build/torch-ext/torch_binding.cpp
- Command line
-
hf download hf://SuperexponentialAI/relu/build/torch-ext/torch_binding.cpp
-
curl -L -o torch_binding.cpp https://huggingface.co/SuperexponentialAI/relu/resolve/main/build/torch-ext/torch_binding.cpp
524 Bytes
| TORCH_LIBRARY_EXPAND(TORCH_EXTENSION_NAME, ops) { | |
| ops.def("relu(Tensor! out, Tensor input) -> ()"); | |
| ops.impl("relu", torch::kCPU, &relu); | |
| ops.impl("relu", torch::kCUDA, &relu); | |
| ops.impl("relu", torch::kMPS, relu); | |
| ops.impl("relu", torch::kXPU, &relu); | |
| } | |
| REGISTER_EXTENSION(TORCH_EXTENSION_NAME) | |