The invention relates to a vector
register allocation method,
electronic equipment and a medium, and the method comprises the following steps: S1, setting a default maximum
executable thread count N0 in a
compiler, and generating a default
executable file; s2, generating the quantity P0 of vector registers which are defaulted and distributed for each thread; s3, starting a kernel function to obtain a
thread count N1 input by a user, judging whether N1 is greater than N0 or not, if so, executing S4, otherwise, executing S5; s4, the
compiler carries out recompilation based on the thread number N1 input by the user to generate an updated
executable file, the number P1 of vector registers distributed for updating of each thread is generated, P1 vector registers are distributed for each thread, and the
test case is executed based on the updated executable file; and S5, allocating P0 vector registers for each thread, and executing the
test case based on the default executable file. According to the invention, the execution speed of the
test case is improved.