Class Manager

Nested Relationships

Nested Types

Class Documentation

class Manager

The Manager holds all the state information about a running amdinfer-server. Read access to the state is thread-safe but all modifications are handled through a separate update thread to preserve consistency. It is a singleton instance.

Public Functions

Manager(Manager const&) = delete

Copy constructor.

Manager &operator=(const Manager&) = delete

Copy assignment constructor.

Manager(Manager &&other) = delete

Move constructor.

Manager &operator=(Manager &&other) = delete

Move assignment constructor.

std::string loadWorker(std::string const &key, RequestParameters parameters)
void unloadWorker(std::string const &key)
WorkerInfo *getWorker(std::string const &key) const

Get the WorkerInfo object associated with the given key. If the worker does not exist, returns nullptr.

Parameters

key – name of the worker

Returns

WorkerInfo*

std::vector<std::string> getWorkerEndpoints()
bool workerReady(const std::string &key) const
ModelMetadata getWorkerMetadata(const std::string &key) const
void workerAllocate(std::string const &key, int num)

Request that a worker support a request with num inputs. This means that the worker must allocate enough buffers to have at least num buffers.

Parameters
  • key – name of the worker to make the request to

  • num – the minimum number of buffers the worker should have after allocation

void init()

Initialize the Manager. This is called automatically by the constructor and may be called again after shutdown() to restart. If already initialized, this does nothing.

void shutdown()

Stop the Manager. This should be called prior to ending the server.

Public Static Functions

static inline Manager &getInstance()

Get the singleton Manager instance.