mel_spectrogram / ext-torch /torch_binding.cpp
drbh
feat: implement mel-spectrogram with bindings
6c273f0
Raw History Blame
378 Bytes
#include <torch/library.h>
#include "registration.h"
#include "torch_binding.h"
TORCH_LIBRARY_EXPAND(TORCH_EXTENSION_NAME, ops) {
ops.def("mel_spectrogram(Tensor out, Tensor samples, Tensor filters, int64_t fft_size, int64_t fft_step) -> Tensor", &mel_spectrogram);
ops.impl("mel_spectrogram", torch::kCUDA, &mel_spectrogram);
}
REGISTER_EXTENSION(TORCH_EXTENSION_NAME)