Instructions to use Ashiedu/universal with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Kernels
How to use Ashiedu/universal with Kernels:
# !pip install kernels from kernels import get_kernel kernel = get_kernel("Ashiedu/universal") - Notebooks
- Google Colab
- Kaggle
File size: 568 Bytes
df5d07c | 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("universal(Tensor! out, Tensor input) -> ()");
#if defined(CPU_KERNEL)
ops.impl("universal", torch::kCPU, &universal);
#elif defined(CUDA_KERNEL) || defined(ROCM_KERNEL)
ops.impl("universal", torch::kCUDA, &universal);
#elif defined(METAL_KERNEL)
ops.impl("universal", torch::kMPS, universal);
#elif defined(XPU_KERNEL)
ops.impl("universal", torch::kXPU, &universal);
#endif
}
REGISTER_EXTENSION(TORCH_EXTENSION_NAME) |