File pytorch-hipify_python-copy-attrs.patch of Package python-torch

diff --git a/torch/utils/hipify/hipify_python.py b/torch/utils/hipify/hipify_python.py
index 755a50404..0be123db3 100755
--- a/torch/utils/hipify/hipify_python.py
+++ b/torch/utils/hipify/hipify_python.py
@@ -207,10 +207,12 @@ def preprocess_file_and_save_result(
                           hip_clang_launch, is_pytorch_extension, clean_ctx, show_progress)
 
     # Show what happened
-    if show_progress and "ignored" not in result.status:
-        print(
-            fin_path, "->",
-            result.hipified_path, result.status, flush=True)
+    if "ignored" not in result.status:
+        shutil.copystat(fin_path, result.hipified_path)
+        if show_progress:
+            print(
+                fin_path, "->",
+                result.hipified_path, result.status, flush=True)
 
     HIPIFY_FINAL_RESULT[fin_path] = result
 
openSUSE Build Service is sponsored by