US 12,217,032 B2
Code performance optimization based on an information-enhanced diffusion model
Zhong Fang Yuan, Xi'an (CN); Tong Liu, Xi'an (CN); Han Qiao Yu, Shaanxi Province (CN); Lin Feng, Xi'an (CN); Xiang Yu Yang, Xi'an (CN); and Hai Bo Zou, Beijing (CN)
Assigned to International Business Machines Corporation, Armonk, NY (US)
Filed by International Business Machines Corporation, Armonk, NY (US)
Filed on Mar. 31, 2023, as Appl. No. 18/129,288.
Prior Publication US 2024/0329948 A1, Oct. 3, 2024
Int. Cl. G06F 8/41 (2018.01); G06F 8/71 (2018.01); G06N 20/00 (2019.01)
CPC G06F 8/427 (2013.01) [G06F 8/4441 (2013.01); G06F 8/71 (2013.01); G06N 20/00 (2019.01)] 20 Claims
OG exemplary drawing
 
1. A method comprising:
obtaining, using a hardware processor, a given segment of computer code;
modifying, using the hardware processor, the given segment of computer code to produce one or more inefficient versions of the given segment of computer code in comparison to the given segment of computer code;
generating, using the hardware processor, a code parse tree for the given segment of computer code and each inefficient version of the given segment of computer code;
generating, using the hardware processor, model embeddings based on the generated code parse trees; and
training, using the hardware processor, a diffusion model based on the generated model embeddings.