Skip to content

Commit 84a49fa

Browse files
Christopher Olstontensorflower-gardener
authored andcommitted
Add a resource dimension called "model slots" that bounds the number of models that can share a given model server.
Change: 146167969
1 parent 65f5062 commit 84a49fa

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

tensorflow_serving/resources/resource_values.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ const char* const kGpu = "gpu";
2424
} // namespace device_types
2525

2626
namespace resource_kinds {
27+
const char* const kNumModelSlots = "num_model_slots";
2728
const char* const kRamBytes = "ram_in_bytes";
2829
const char* const kProcessingMillis = "processing_in_millicores";
2930
} // namespace resource_kinds

tensorflow_serving/resources/resource_values.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ namespace serving {
2626
// Standard device types.
2727
namespace device_types {
2828

29-
// CPU(s) and main memory.
29+
// The primary devices such as CPU(s) and main memory, as well as aspects of the
30+
// server as a whole.
3031
extern const char* const kMain;
3132

3233
// Graphics processing unit(s).
@@ -37,6 +38,10 @@ extern const char* const kGpu;
3738
// Standard resource kinds.
3839
namespace resource_kinds {
3940

41+
// If a server can accommodate at most N models, depicted as the server having N
42+
// "model slots", this is the number of slots needed or allocated.
43+
extern const char* const kNumModelSlots;
44+
4045
// RAM in bytes.
4146
extern const char* const kRamBytes;
4247

0 commit comments

Comments
 (0)