Download torch-ext/torch_binding.cpp from gagan3012/batch_invariant_kernel: direct link, hf CLI and curl.
- Browser
- Download file 576 Bytes
-
https://huggingface.co/gagan3012/batch_invariant_kernel/resolve/main/torch-ext/torch_binding.cpp
- Command line
-
hf download hf://gagan3012/batch_invariant_kernel/torch-ext/torch_binding.cpp
-
curl -L -o torch_binding.cpp https://huggingface.co/gagan3012/batch_invariant_kernel/resolve/main/torch-ext/torch_binding.cpp
576 Bytes
| TORCH_LIBRARY_EXPAND(TORCH_EXTENSION_NAME, ops) | |
| { | |
| ops.def("matmul_persistent(Tensor a, Tensor b, Tensor! c, Tensor? bias) -> ()"); | |
| ops.def("log_softmax(Tensor input, Tensor! output) -> ()"); | |
| ops.def("mean_dim(Tensor input, Tensor! output, int dim) -> ()"); | |
| ops.impl("matmul_persistent", torch::kCUDA, &matmul_persistent_cuda); | |
| ops.impl("log_softmax", torch::kCUDA, &log_softmax_cuda); | |
| ops.impl("mean_dim", torch::kCUDA, &mean_dim_cuda); | |
| } | |
| REGISTER_EXTENSION(TORCH_EXTENSION_NAME) |