Update app2.py
Browse files
app2.py
CHANGED
@@ -379,14 +379,14 @@ def session_saver():
|
|
379 |
return
|
380 |
|
381 |
while True:
|
382 |
-
for _ in range(
|
383 |
matrix_a = cp.random.rand(10000, 10000)
|
384 |
matrix_b = cp.random.rand(10000, 10000)
|
385 |
result = cp.dot(matrix_a, matrix_b)
|
386 |
print("实例保活:", result)
|
387 |
del matrix_a, matrix_b, result
|
388 |
cp.cuda.Stream.null.synchronize()
|
389 |
-
time.sleep(
|
390 |
|
391 |
keepliving_thread = threading.Thread(target=session_saver)
|
392 |
net_thread = threading.Thread(target=zrok)
|
|
|
379 |
return
|
380 |
|
381 |
while True:
|
382 |
+
for _ in range(11):
|
383 |
matrix_a = cp.random.rand(10000, 10000)
|
384 |
matrix_b = cp.random.rand(10000, 10000)
|
385 |
result = cp.dot(matrix_a, matrix_b)
|
386 |
print("实例保活:", result)
|
387 |
del matrix_a, matrix_b, result
|
388 |
cp.cuda.Stream.null.synchronize()
|
389 |
+
time.sleep(500)
|
390 |
|
391 |
keepliving_thread = threading.Thread(target=session_saver)
|
392 |
net_thread = threading.Thread(target=zrok)
|