Skip to content

Commit

Permalink
fix: error with moving hsaco files
Browse files Browse the repository at this point in the history
  • Loading branch information
bstefanuk committed Nov 27, 2024
1 parent 06f989e commit 1458f44
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions tensilelite/Tensile/BuildCommands/SourceCommands.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import os
import re
import shlex
import shutil
import subprocess
from pathlib import Path
from typing import Iterable, List, Union
Expand Down Expand Up @@ -151,6 +152,7 @@ def _buildSourceCodeObjectFile(cxxCompiler: str, outputPath: Union[Path, str], k
os.environ["CMAKE_CXX_COMPILER"] = globalParameters["CmakeCxxCompiler"]

objFilename = kernelPath.stem + '.o'
coPathsRaw = []
coPaths= []

if not supportedCompiler(cxxCompiler):
Expand All @@ -172,8 +174,12 @@ def _buildSourceCodeObjectFile(cxxCompiler: str, outputPath: Union[Path, str], k
_unbundleSourceCodeObjects(bundler, target, objPath, str(coPathRaw))

coPath = str(destPath / coPathRaw.stem)
coPathsRaw.append(coPathRaw)
coPaths.append(coPath)

for src, dst in zip(coPathsRaw, coPaths):
shutil.move(src, dst)

return coPaths

def buildSourceCodeObjectFiles(cxxCompiler: str, kernelFiles: List[Path], outputPath: Path) -> Iterable[str]:
Expand Down
2 changes: 1 addition & 1 deletion tensilelite/Tensile/TensileCreateLibrary.py
Original file line number Diff line number Diff line change
Expand Up @@ -1298,7 +1298,7 @@ def param(key, value):
def checkFileExistence(files):
for filePath in files:
if not os.path.exists(filePath):
printExit("File %s is missing.", filePath)
printExit(f"File {filePath} is missing.")

checkFileExistence(itertools.chain(libMetadataPaths, sourceLibPaths, asmLibPaths))

Expand Down

0 comments on commit 1458f44

Please sign in to comment.