Skip to content

Commit

Permalink
[backend] add overwrite info
Browse files Browse the repository at this point in the history
  • Loading branch information
botbw committed Oct 9, 2024
1 parent c2f1349 commit 8f63b21
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion csrc/backend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,10 @@ AsyncIO *create_asyncio(unsigned int n_entries, std::string backend)

std::string default_backend = get_default_backend();
if (default_backend.size() > 0) {
std::cout << "[backend] backend is overwritten by environ TENSORNVME_BACKEND from " << backend << std::endl;
backend = default_backend;
}

std::cout << "[backend] using backend: " << backend << std::endl;
if (backends.find(backend) == backends.end())
throw std::runtime_error("Unsupported backend: " + backend);
if (!probe_backend(backend))
Expand Down
1 change: 1 addition & 0 deletions include/backend.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#include <string>
#include <unordered_set>
#include <cstdlib>
#include <iostream>

std::unordered_set<std::string> get_backends();

Expand Down

0 comments on commit 8f63b21

Please sign in to comment.