sglang_v0.5.2/pytorch_2.8.0/test/custom_backend/custom_backend.cpp

17 lines
423 B
C++

#include "custom_backend.h"
#include <torch/csrc/jit/backends/backend_preprocess.h>
namespace torch {
namespace custom_backend {
namespace {
constexpr auto kBackendName = "custom_backend";
static auto cls = torch::jit::backend<CustomBackend>(kBackendName);
static auto pre_reg = torch::jit::backend_preprocess_register(kBackendName, preprocess);
}
std::string getBackendName() {
return std::string(kBackendName);
}
}
}