The present invention discloses a thread bundle
size measurement method based on reconfigurable thread
divergence, which constructs a first
CUDA kernel function to reconstruct linear
divergence so that threads in different thread bundles generate memory access conflicts to greatly increase the
execution time of the threads, and gradually increases the thread
block size so that the threads therein are assigned to different thread bundles for execution, resulting in an increase in
execution time, thereby realizing coarse-grained measurement of the thread bundle size; constructs a second
CUDA kernel function to reconstruct linear
divergence so that the last thread in the thread block performs complex calculations to increase the
execution time, and increases the thread
block size in a fine-grained manner so that the last thread is assigned to different thread bundles for execution, resulting in a significant reduction in the execution time of the first thread, thereby realizing fine-grained and accurate measurement of the thread bundle size, and accurately measuring the thread bundle size of the GPU in a
software manner without the aid of querying a hardware manual, thereby providing accurate parameter support for the optimization of related computing programs.