Skip to content
Snippets Groups Projects

Client workload generator

Merged Jonathan Mace requested to merge client-workload-generator into master
12 files
+ 690
339
Compare changes
  • Side-by-side
  • Inline
Files
12
@@ -29,6 +29,8 @@ public:
@@ -29,6 +29,8 @@ public:
virtual std::string source() = 0;
virtual std::string source() = 0;
virtual size_t input_size() = 0;
virtual size_t input_size() = 0;
virtual size_t output_size() = 0;
virtual size_t output_size() = 0;
 
virtual int user_id() = 0;
 
virtual void set_user_id(int user_id) = 0;
/*
/*
Perform an inference with the provided input and return the output.
Perform an inference with the provided input and return the output.
@@ -45,6 +47,10 @@ public:
@@ -45,6 +47,10 @@ public:
*/
*/
virtual std::future<std::vector<uint8_t>> infer_async(std::vector<uint8_t> &input) = 0;
virtual std::future<std::vector<uint8_t>> infer_async(std::vector<uint8_t> &input) = 0;
 
virtual void infer(std::vector<uint8_t> &input,
 
std::function<void(std::vector<uint8_t>&)> onSuccess,
 
std::function<void(int, std::string&)> onError) = 0;
 
/*
/*
This is a backdoor API call that's useful for testing.
This is a backdoor API call that's useful for testing.
Instructs the server to evict the weights of this model from the GPU.
Instructs the server to evict the weights of this model from the GPU.
Loading