The invention provides an MIG fragment rearrangement method and
system based on topology awareness and a double-layer agent, and belongs to the technical field of
artificial intelligence. The method comprises the steps of collecting calculation of each partition and
video memory occupation and remaining
execution time, generating partition embedding through Kronecker multiplication,
Hadamard product and PCIe neighborhood aggregation, constructing an address
adjacency matrix, generating a global condition vector through Sigmoid gating and fusion
pooling, and inputting a
diffusion network to generate a fragment evolution trajectory and confidence. And calculating continuous splicable capacity based on confidence, constructing a graph structure, evaluating candidate migration actions by a lightweight graph strategy network, and selecting an optimal sequence through risk
tensor and Bayesian calibration
iterative search. And in the execution stage, the migration duration is controlled through an NVML lock table, RDMA straight pulling and a sliding window, and the device tree is updated after the migration duration is completed. Real evolution is continuously collected on line, deviation is monitored through
divergence, the model is updated through
distillation, and the optimal action and pause duration are recorded through an experience
pool.