mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2026-04-09 14:40:36 +02:00
* 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>
27 lines
947 B
Diff
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(
|