Skip to content

Commit 37f7ba4

Browse files
committed
[DeepRec] Support user setup cpusets for each session_group.
1 parent a2721b5 commit 37f7ba4

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

tensorflow_serving/example/config_files/session_group_multi_models_platform_config

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ platform_configs {
1515
use_per_session_stream: true
1616
}
1717
session_num: 2
18+
cpusets: "1,2;5,6"
1819
}
1920
model_session_config {
2021
session_config {
@@ -27,6 +28,7 @@ platform_configs {
2728
use_per_session_stream: true
2829
}
2930
session_num: 4
31+
cpusets: "20,21;23,24;26,27;29,30"
3032
}
3133
}
3234
}

tensorflow_serving/servables/tensorflow/bundle_factory_util.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,8 @@ SessionGroupOptions GetSessionOptions(const SessionGroupBundleConfig& config, in
9696
options.metadata.streams_vec.emplace_back(conf.session_num());
9797
}
9898
options.metadata.model_id = model_id;
99+
options.metadata.cpusets = config.model_session_config()[model_id].cpusets();
100+
99101
return options;
100102
}
101103

tensorflow_serving/servables/tensorflow/session_bundle_config.proto

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,11 +170,13 @@ message SessionGroupBundleConfig {
170170
// See details at tensorflow/core/protobuf/config.proto.
171171
ConfigProto session_config = 1;
172172
// session_num of the session group.
173-
int32 session_num = 2;// [default = 1];
173+
int32 session_num = 2;
174174
// gpu num
175175
//int32 gpu_num = 3;
176176
// model id in multi-models
177177
int32 model_id = 3;
178+
// cpusets
179+
string cpusets = 4;
178180
}
179181

180182
repeated ModelSessionConfig model_session_config = 784;

0 commit comments

Comments
 (0)