Skip to content

Commit 1c8c296

Browse files
committed
Update AINodeConcurrentInferenceIT.java
1 parent cc1df02 commit 1c8c296

File tree

1 file changed

+0
-60
lines changed

1 file changed

+0
-60
lines changed

integration-test/src/test/java/org/apache/iotdb/ainode/it/AINodeConcurrentInferenceIT.java

Lines changed: 0 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -90,33 +90,6 @@ private static void prepareDataForTableModel() throws SQLException {
9090
}
9191
}
9292

93-
// @Test
94-
public void concurrentCPUCallInferenceTest() throws SQLException, InterruptedException {
95-
concurrentCPUCallInferenceTest("timer_xl");
96-
concurrentCPUCallInferenceTest("sundial");
97-
}
98-
99-
private void concurrentCPUCallInferenceTest(String modelId)
100-
throws SQLException, InterruptedException {
101-
try (Connection connection = EnvFactory.getEnv().getConnection(BaseEnv.TREE_SQL_DIALECT);
102-
Statement statement = connection.createStatement()) {
103-
final int threadCnt = 4;
104-
final int loop = 10;
105-
final int predictLength = 96;
106-
statement.execute(String.format("LOAD MODEL %s TO DEVICES 'cpu'", modelId));
107-
checkModelOnSpecifiedDevice(statement, modelId, "cpu");
108-
concurrentInference(
109-
statement,
110-
String.format(
111-
"CALL INFERENCE(%s, 'SELECT s FROM root.AI', predict_length=%d)",
112-
modelId, predictLength),
113-
threadCnt,
114-
loop,
115-
predictLength);
116-
statement.execute(String.format("UNLOAD MODEL %s FROM DEVICES 'cpu'", modelId));
117-
}
118-
}
119-
12093
// @Test
12194
public void concurrentGPUCallInferenceTest() throws SQLException, InterruptedException {
12295
concurrentGPUCallInferenceTest("timer_xl");
@@ -150,39 +123,6 @@ private void concurrentGPUCallInferenceTest(String modelId)
150123
String forecastUDTFSql =
151124
"SELECT forecast(s, 'MODEL_ID'='%s', 'PREDICT_LENGTH'='%d') FROM root.AI";
152125

153-
@Test
154-
public void concurrentCPUForecastTest() throws SQLException, InterruptedException {
155-
concurrentCPUForecastTest("timer_xl", forecastUDTFSql);
156-
concurrentCPUForecastTest("sundial", forecastUDTFSql);
157-
concurrentCPUForecastTest("timer_xl", forecastTableFunctionSql);
158-
concurrentCPUForecastTest("sundial", forecastTableFunctionSql);
159-
}
160-
161-
private void concurrentCPUForecastTest(String modelId, String selectSQL)
162-
throws SQLException, InterruptedException {
163-
try (Connection connection = EnvFactory.getEnv().getConnection(BaseEnv.TABLE_SQL_DIALECT);
164-
Statement statement = connection.createStatement()) {
165-
final int threadCnt = 4;
166-
final int loop = 10;
167-
final int predictLength = 96;
168-
statement.execute(String.format("LOAD MODEL %s TO DEVICES 'cpu'", modelId));
169-
checkModelOnSpecifiedDevice(statement, modelId, "cpu");
170-
long startTime = System.currentTimeMillis();
171-
concurrentInference(
172-
statement,
173-
String.format(selectSQL, modelId, predictLength),
174-
threadCnt,
175-
loop,
176-
predictLength);
177-
long endTime = System.currentTimeMillis();
178-
LOGGER.info(
179-
String.format(
180-
"Model %s concurrent inference %d reqs (%d threads, %d loops) in CPU takes time: %dms",
181-
modelId, threadCnt * loop, threadCnt, loop, endTime - startTime));
182-
statement.execute(String.format("UNLOAD MODEL %s FROM DEVICES 'cpu'", modelId));
183-
}
184-
}
185-
186126
@Test
187127
public void concurrentGPUForecastTest() throws SQLException, InterruptedException {
188128
concurrentGPUForecastTest("timer_xl", forecastUDTFSql);

0 commit comments

Comments
 (0)