unconditionally call InitializeBackend on the FFI layer

This commit is contained in:
Morgan Funtowicz 2024-07-08 22:09:09 +00:00
parent da926feaa1
commit 68a0247a2c

View File

@ -13,6 +13,9 @@ namespace huggingface::tgi::backends {
* @return
*/
std::unique_ptr<TensorRtLlmBackend> create_trtllm_backend(rust::Str engineFolder, rust::Str executorWorker) {
// Unconditionally call this to initialize and discover TRTLLM plugins
InitializeBackend();
const auto enginePath = std::string_view(engineFolder.begin(), engineFolder.end());
const auto executorPath = std::string_view(executorWorker.begin(), executorWorker.end());
return std::make_unique<TensorRtLlmBackend>(std::move(enginePath), std::move(executorPath));