Scratch-pad memory (SPM) has been widely used in embedded systems because it allows software-controlled data placement. By designing data placement strategies, optimal solutions with minimal memory access latency for loops on SPM-DRAM architecture can be explored. Although existing works effectively reduce the latency by using fine-grained data placement methods, they fail in solving the case of inconsecutive array access. Meanwhile, fine-grained strategy can lead to excessive memory activation overhead, making it less efficient. Therefore, in this paper, we first propose a finegrained dynamic programming algorithm, called FiDP, to tackle unsolved case and minimize latency. In order to mitigate the frequent activation before data access, we then add a medium-grained scheme to our strategy. It can achieve a better solution than FiDP by strictly formulating an integer linear programming (ILP) problem and considering multiple granularities, which is called MuILP. Furthermore, to compensate for the high time complexity of ILP, we develop a heuristic multi-granularity data placement algorithm, called HMuDP, which achieves a near-optimal solution with lower complexity. Experimental results show that our FiDP reduces the total latency by 75.90%, 47.70% and 12.34% compared with LRU-cache, a greedy-based comparison method (called Uday) and a dynamic programming-based comparison method (called DLAA). Besides, our MuILP and HMuDP yield less latency than FiDP with 45.10% and 43.14% average improvement, respectively.
Quantum circuit simulation is an important tool for evaluating designed quantum algorithms. Full-state simulation gives the entire state vectors produced by the running of algorithms. Distributed simulation aims to take advantage of resources on multiple machines (a.k.a. nodes) for high-performance simulation. As a quantum circuit may have many levels, simulation on each level is called a step. The reduction in the cost on each step results in a significant saving in total cost. In existing distributed full-state simulations, the communication cost in each step dominates. In this paper, we propose a new simulation technique, namely QuanPath, which completely eliminates communications and synchronizations on each step until the final merge step. Each node can compute its portion of the state vector independently in parallel. We present detailed mathematical analyses to guarantee the correctness of QuanPath. In the final merge step, an efficient communication scheme is further designed. Experimental results show that when simulating quantum algorithms, QuanPath achieves thousands times of reduction in communication cost and obtains dozens times of simulation acceleration compared with existing techniques. In addition, QuanPath realizes almost linear speedup, so it presents good scalability.
针对目前ChatGPT在学生学习中产生的依赖作用,为了更有利于计算机初学者专业素质培养,以计算机导论课程习题为案例,分析ChatGPT带来的挑战,提出计算机专业基础教学阶段的教学对策.