Skip to content

Commit c01e1cb

Browse files
committed
single-threaded
1 parent 35e7e05 commit c01e1cb

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

reconstruction/ai/src/main/java/org/jlab/service/ai/DCDenoiseEngine.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@ public DCDenoiseEngine() {
5858

5959
@Override
6060
public boolean init() {
61+
System.setProperty("ai.djl.pytorch.num_interop_threads", "1");
62+
System.setProperty("ai.djl.pytorch.num_threads", "1");
63+
System.setProperty("ai.djl.pytorch.graph_optimizer", "false");
6164
if (getEngineConfigString(CONF_THRESHOLD) != null)
6265
threshold = Float.parseFloat(getEngineConfigString(CONF_THRESHOLD));
6366
try {
@@ -81,7 +84,7 @@ public boolean init() {
8184
public static void main(String args[]){
8285
DCDenoiseEngine dn = new DCDenoiseEngine();
8386
dn.init();
84-
for (int i=0; i<100; i++) {
87+
for (int i=0; i<10000; i++) {
8588
dn.processFakeEvent();
8689
}
8790
}

0 commit comments

Comments
 (0)