1
0
mirror of https://git.savannah.gnu.org/git/guix.git synced 2026-04-09 14:40:36 +02:00
Files
guix/gnu/packages/patches/tensile-copy-if-not-exist.patch
David Elsing 1eb057021d gnu: Add tensile.
* gnu/packages/rocm-tools.scm (tensile): New variable.
* gnu/packages/patches/tensile-copy-if-not-exist.patch: New patch.
* gnu/local.mk (dist_patch_DATA): Register it.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2026-02-10 23:46:35 +01:00

27 lines
947 B
Diff

Remove target files if they exist
diff --git a/Tensile/TensileCreateLibrary.py b/Tensile/TensileCreateLibrary.py
index a164460..0ec998d 100644
--- a/Tensile/TensileCreateLibrary.py
+++ b/Tensile/TensileCreateLibrary.py
@@ -854,6 +854,9 @@ def copyStaticFiles(outputPath=None):
for fileName in libraryStaticFiles:
# copy file
+ path = Path(outputPath) / fileName
+ if path.is_file():
+ path.unlink()
shutil.copy(os.path.join(globalParameters["SourcePath"], fileName), outputPath)
return libraryStaticFiles
@@ -1762,6 +1765,9 @@ def TensileCreateLibrary():
# Make sure to copy the library static files.
for fileName in staticFiles:
+ path = Path(outputPath) / fileName
+ if path.is_file():
+ path.unlink()
shutil.copy(os.path.join(globalParameters["SourcePath"], fileName), outputPath)
codeObjectFiles, kernels, solutions = writeKernels(