Meng-Shiuan Shih, H.M. Lai, Chao-Lin Lee, Chung-Kai Chen, Jenq-Kuen Lee
{"title":"Register-Pressure Aware Predicator for Length Multiplier of RVV","authors":"Meng-Shiuan Shih, H.M. Lai, Chao-Lin Lee, Chung-Kai Chen, Jenq-Kuen Lee","doi":"10.1145/3547276.3548513","DOIUrl":null,"url":null,"abstract":"The use of parallel processing with vector processors is indispensable. The RISC-V vector extension (RVV) is a highly anticipated extension due to the demand for growing AI applications. The modularity and extensibility make RISC-V a popular instruction set in the industry. Compared to SIMD instruction, vector instructions use fewer instructions with a larger register size which can handle multiple registers within one instruction, resulting in higher performance. With the vector grouping mechanism called vector length multiplier (LMUL) provided by RVV, RVV can combine multiple vector registers into one group so that the processor can increase the throughput of processing data under the same issue rate. However, due to the register pressure, the vector length is not always positively relative to the performance. Therefore, in this paper, we develop an LMUL predicator with register-pressure-aware models to accurately assign the proper LMUL for different programs. The algorithm is based on a priority-based register allocation algorithm and considers the cost of the register pressures and program use patterns. This design helps assign the proper vector length multiplier in compile time for RVV. The experiment result shows that, with a total of 76 vectorization cases of TSVC, the proposed register pressure aware length multiplier achieves 73 correct predictions of the optimal value of Length Multiplier.","PeriodicalId":255540,"journal":{"name":"Workshop Proceedings of the 51st International Conference on Parallel Processing","volume":"1 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2022-08-29","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Workshop Proceedings of the 51st International Conference on Parallel Processing","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/3547276.3548513","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0
Abstract
The use of parallel processing with vector processors is indispensable. The RISC-V vector extension (RVV) is a highly anticipated extension due to the demand for growing AI applications. The modularity and extensibility make RISC-V a popular instruction set in the industry. Compared to SIMD instruction, vector instructions use fewer instructions with a larger register size which can handle multiple registers within one instruction, resulting in higher performance. With the vector grouping mechanism called vector length multiplier (LMUL) provided by RVV, RVV can combine multiple vector registers into one group so that the processor can increase the throughput of processing data under the same issue rate. However, due to the register pressure, the vector length is not always positively relative to the performance. Therefore, in this paper, we develop an LMUL predicator with register-pressure-aware models to accurately assign the proper LMUL for different programs. The algorithm is based on a priority-based register allocation algorithm and considers the cost of the register pressures and program use patterns. This design helps assign the proper vector length multiplier in compile time for RVV. The experiment result shows that, with a total of 76 vectorization cases of TSVC, the proposed register pressure aware length multiplier achieves 73 correct predictions of the optimal value of Length Multiplier.