From f446938184b8b48179f51f55a91593cb3c6138e6 Mon Sep 17 00:00:00 2001 From: Jake Stevens Date: Fri, 24 Jul 2026 14:53:46 -0700 Subject: [PATCH] Add timeout default in NeutronBackend (#21293) Summary: The driver header specifies "60" as a default but is never set. Here, we set the default accordingly. Without a default, there is a crash in our specific setup. This may because ET allocates the object, but does not memset or anything so there may be garbage values that negatively impact. Reviewed By: rascani Differential Revision: D113453148 --- backends/nxp/runtime/NeutronBackend.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/backends/nxp/runtime/NeutronBackend.cpp b/backends/nxp/runtime/NeutronBackend.cpp index 6eb7941949f..4c75f76712a 100644 --- a/backends/nxp/runtime/NeutronBackend.cpp +++ b/backends/nxp/runtime/NeutronBackend.cpp @@ -290,6 +290,10 @@ class NeutronBackend final : public PyTorchBackendInterface { auto* cfg = allocator->allocateInstance(); + // allocateInstance returns raw, uninitialized memory (no constructor runs), + // so set the driver-config timeout explicitly. + cfg->mcfg.timeoutSeconds = 60; + // The following data is read from the "processed" data blob. // cfg->numInputs // cfg->numoutputs @@ -673,4 +677,4 @@ static auto registered = register_backend(backend_id); } // namespace } // namespace neutron } // namespace executor -} // namespace torch \ No newline at end of file +} // namespace torch