Skip to content

add config option for launcher #1354

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 31 commits into from
Dec 14, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
bae1519
added launcher
Nov 29, 2021
b39976c
added README.md
min-jean-cho Nov 29, 2021
48ad12f
updated README
min-jean-cho Nov 29, 2021
f0a9bf3
fixed typo
min-jean-cho Nov 29, 2021
feb65cc
handling launcher
Nov 30, 2021
4313dc9
handled launcher w/o ipex
Nov 30, 2021
a90217f
changed to bool
Nov 30, 2021
3c413d5
fixed typo
Nov 30, 2021
a744304
updated README
min-jean-cho Nov 30, 2021
e9e8184
updated README
min-jean-cho Nov 30, 2021
f12a736
checks numactl
Dec 1, 2021
477fa3c
Merge branch 'launcher' of https://github.com/min-jean-cho/serve into…
Dec 1, 2021
1d8ab51
fixed launcher check
Dec 1, 2021
93e5dd6
updated launcher check
Dec 1, 2021
4109c6d
updated launcher check
Dec 1, 2021
b1b9023
updated launcher check
Dec 2, 2021
4e0d29a
added launcher to README
min-jean-cho Dec 2, 2021
f182802
updated README
min-jean-cho Dec 2, 2021
9fee5b4
updated README
min-jean-cho Dec 2, 2021
6d1e315
fixed formatting
Dec 2, 2021
370f62e
Merge branch 'launcher' of https://github.com/min-jean-cho/serve into…
Dec 2, 2021
769cf5e
updated launcher
Dec 9, 2021
bc49f07
Merge branch 'master' into launcher
min-jean-cho Dec 9, 2021
c12061e
addressed feedback
min-jean-cho Dec 9, 2021
773434f
updated README
min-jean-cho Dec 9, 2021
d1e7104
updated README
min-jean-cho Dec 9, 2021
506fc08
added comment on dummy cmd
Dec 9, 2021
4cc8a76
Merge branch 'launcher' of https://github.com/min-jean-cho/serve into…
Dec 9, 2021
b99100d
Merge branch 'master' into launcher
msaroufim Dec 13, 2021
9283e32
Merge branch 'master' into launcher
msaroufim Dec 13, 2021
40aff06
Merge branch 'master' into launcher
lxning Dec 14, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
added launcher
  • Loading branch information
min-jean-cho committed Nov 29, 2021
commit bae151978d5771179807f371c84de068c8c931a4
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ public final class ConfigManager {

// IPEX config option that can be set at config.properties
private static final String TS_IPEX_ENABLE = "ipex_enable";
private static final String TS_CPU_LAUNCHER_ENABLE = "cpu_launcher_enable";
private static final String TS_CPU_LAUNCHER_ARGS = "cpu_launcher_args";

private static final String TS_ASYNC_LOGGING = "async_logging";
private static final String TS_CORS_ALLOWED_ORIGIN = "cors_allowed_origin";
Expand Down Expand Up @@ -339,6 +341,14 @@ public boolean isMetricApiEnable() {
return Boolean.parseBoolean(getProperty(TS_ENABLE_METRICS_API, "true"));
}

public boolean isCPULauncherEnabled() {
return Boolean.parseBoolean(getProperty(TS_CPU_LAUNCHER_ENABLE, "false"));
}

public String getCPULauncherArgs() {
return getProperty(TS_CPU_LAUNCHER_ARGS, null);
}

public int getNettyThreads() {
return getIntProperty(TS_NUMBER_OF_NETTY_THREADS, 0);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,20 @@ public void startWorker(int port) throws WorkerInitializationException, Interrup

ArrayList<String> argl = new ArrayList<String>();
argl.add(EnvironmentUtils.getPythonRunTime(model));
if (configManager.isCPULauncherEnabled()) {
argl.add("-m");
argl.add("intel_extension_for_pytorch.cpu.launch");
argl.add("----ninstance")
argl.add("1")
String largs = configManager.getCPULauncherArgs();
if (largs != null && largs.length() > 1) {
String[] argarray = largs.split(" ");
for (int i = 0; i < argarray.length; i++) {
argl.add(argarray[i]);
}
}
}

argl.add(new File(workingDir, "ts/model_service_worker.py").getAbsolutePath());
argl.add("--sock-type");
argl.add(connector.getSocketType());
Expand Down