The Error
[SYCL-GRAPH] Exception when updating graph, Cannot update using a graph with a different topology. Mismatch found in the number of nodes.
Root Cause
SYCL command graphs can only be updated (via update()) if the new graph has the exact same topology as the cached one—same number of nodes, same kernel types, same execution order. Parameter values (buffer pointers, scalar arguments) can differ, but structure cannot.