Skip to content

armgit / laya

Public Imported from GitHub
0

Non-autoregressive System 1 decision engine. Typed choice, score and yes/no decisions over any text in a single forward pass, in 100+ languages, with a router that picks the right checkpoint per request.

test(onnx): correct the shared-agents comment

Adeshina Lasisi340266e919ee
diff --git a/laya-cpp/tests/onnx_test.cpp b/laya-cpp/tests/onnx_test.cpp
index 6b8de1f8..ad561fd2 100644
--- a/laya-cpp/tests/onnx_test.cpp
+++ b/laya-cpp/tests/onnx_test.cpp
@@ -344,10 +344,8 @@ std::string Need(const char* var) {
std::mutex g_agents_mu;
std::map<std::string, std::unique_ptr<laya::agent::Agent>> g_agents;
-// The agents hold ONNX Runtime sessions, which must be closed before static destruction begins: the
-// runtime's statics may already be gone by then, and an agent still open at exit aborted some
-// asan/tsan processes after their tests passed ("recursive_mutex lock failed"). Close is the
-// supported way to end a session held in a static.
+// Closes the shared agents after the last test, so Close on a live agent is checked once per run.
+// Holding them open at exit is also fine (AStaticSessionAndAgentExitCleanly).
class CloseAgents : public ::testing::Environment {
public:
void TearDown() override {