To enhance the instruction-level parallelism and pipeline utilization of the high-performance vector accelerator FT-Matrix, this paper proposes an automatic instruction scheduling method for assembly instructions based on Graph Neural Networks (GNN) and Reinforcement Learning (RL). The method models the instructions and their dependencies within a basic block as a Directed Acyclic Graph (DAG). It leverages GNN to compress the instruction state space, extract dependency features, and generate a low-dimensional global embedding representation. Building on this foundation, a Deep Q-Network (DQN)-driven reinforcement learning framework is designed to dynamically learn the optimal scheduling policy through a multi-objective reward function that includes the number of parallel instructions, critical path optimization, execution cycle, type balance, and task completion incentives. Experiments conducted on a set of operators (covering compute-intensive, data transfer, and control-flow operations) of the FT-Matrix3000 accelerator demonstrate the effectiveness of the proposed method. Compared to the manually optimized baseline, the instruction execution cycle is reduced by up to 9.6%, and the pipeline utilization for control-flow operators is increased from 36.2% to 41.8%. This method overcomes the limitations of traditional heuristic algorithms, which are prone to local optima and high computational overhead, and provides an end-to-end adaptive solution for efficient instruction scheduling in AI-accelerated hardware.

错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

GRIS: A Graph Neural Network-Based Reinforcement Learning Approach for Instruction Scheduling

  • Qijun Zheng,
  • Youmeng Li

摘要

To enhance the instruction-level parallelism and pipeline utilization of the high-performance vector accelerator FT-Matrix, this paper proposes an automatic instruction scheduling method for assembly instructions based on Graph Neural Networks (GNN) and Reinforcement Learning (RL). The method models the instructions and their dependencies within a basic block as a Directed Acyclic Graph (DAG). It leverages GNN to compress the instruction state space, extract dependency features, and generate a low-dimensional global embedding representation. Building on this foundation, a Deep Q-Network (DQN)-driven reinforcement learning framework is designed to dynamically learn the optimal scheduling policy through a multi-objective reward function that includes the number of parallel instructions, critical path optimization, execution cycle, type balance, and task completion incentives. Experiments conducted on a set of operators (covering compute-intensive, data transfer, and control-flow operations) of the FT-Matrix3000 accelerator demonstrate the effectiveness of the proposed method. Compared to the manually optimized baseline, the instruction execution cycle is reduced by up to 9.6%, and the pipeline utilization for control-flow operators is increased from 36.2% to 41.8%. This method overcomes the limitations of traditional heuristic algorithms, which are prone to local optima and high computational overhead, and provides an end-to-end adaptive solution for efficient instruction scheduling in AI-accelerated hardware.