(This page is preserved for anything I have encountered during my experiments with GPGPU-SIM. More will come!)
-Thread block (TB) scheduling
The function issue_block2core() deals with thread block scheduling. By default there is no TB scheduler class in GPGPU-SIM. There is a simple for loop which acts as a round-robin scheduler.
There are multiple issue_block2core() functions, each of which belongs to a different class; one to gpgpu_sim, one to “cluster”, and one to “shader”, each calling the next one. The “shader” one will call ptx_thread_init)() (or similar) to initiate every thread in the program. Each thread will then run until, in the end, register_cta_thread_exit() is called.
There are already several scheduling methods for warps. In scheduler_unit::cycle(), we can see the process resulting in issuing the warp. There are methods to check a warp’s instruction opcode. However, there was no number indicating an ID for SPs or SFUs within the SMs.
The can_issue() function during the shader core’s execution checks every functional unit per SM to determine whether the warp can be launched there. The permissions for different operations can be overridden here, but there is also the matter of whether enough registers have been assigned for this task. That is handled in another area.