From 9b350754cc2ef558b9a19cec933d2a1add4f8eb5 Mon Sep 17 00:00:00 2001 From: Shadi Dashmiz <94885391+shadidashmiz@users.noreply.github.com> Date: Mon, 22 Sep 2025 08:41:19 -0400 Subject: [PATCH] SWDEV-555084: Fix the python script (#996) - no need to manually updated the newly generated hip_prof_str.h Signed-off-by: shadi --- projects/clr/hipamd/src/hip_prof_gen.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/projects/clr/hipamd/src/hip_prof_gen.py b/projects/clr/hipamd/src/hip_prof_gen.py index 7949d4c2fc..40d5a28511 100755 --- a/projects/clr/hipamd/src/hip_prof_gen.py +++ b/projects/clr/hipamd/src/hip_prof_gen.py @@ -745,12 +745,14 @@ output_dir = os.path.dirname(OUTPUT) if not os.path.exists(output_dir): os.makedirs(output_dir) -# Generating output header file +# Generating output header file (build directory) with open(OUTPUT, 'w') as f: generate_prof_header(f, api_map, api_callback_ids, opts_map) -if not filecmp.cmp(INPUT, OUTPUT): - message("Warning: \"" + INPUT + "\" needs to be re-generated and checked-in with the current changes") +# Also overwrite the original template file (source directory) +message("Also writing to original template file: " + INPUT) +with open(INPUT, 'w') as f: + generate_prof_header(f, api_map, api_callback_ids, opts_map) # Successfull exit sys.exit(0)