Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions tensilelite/Tensile/Parallel.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,8 @@ def ParallelMap2(function, objects, message="", enable=True, multiArg=True, retu
rv = Parallel(n_jobs=threadCount,timeout=99999)(delayed(pcall)(function, a, params) for a, params in pargs)

totalTime = time.time() - currentTime
print("{0}Done. ({1:.1f} secs elapsed)".format(message, totalTime))
sys.stdout.flush()

if return_as == 'list':
print("{0}Done. ({1:.1f} secs elapsed)".format(message, totalTime))
sys.stdout.flush()
return rv
8 changes: 7 additions & 1 deletion tensilelite/Tensile/TensileCreateLibrary.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
import shutil
import subprocess
import sys
import time
from timeit import default_timer as timer
from pathlib import Path
from typing import Sequence, List
Expand Down Expand Up @@ -1095,7 +1096,9 @@ def libraryIter(lib: MasterSolutionLibrary):
for _, lazyLib in lib.lazyLibraries.items():
yield from libraryIter(lazyLib)

for library in Common.ParallelMap2(LibraryIO.parseLibraryLogicFile, fIter, "Loading Logics...", return_as="generator_unordered"):
logicProcessBegTime = time.time()

for library in Common.ParallelMap2(LibraryIO.parseLibraryLogicFile, fIter, "Loading & Processing Logics...", return_as="generator_unordered"):
_, architectureName, _, _, _, newLibrary, srcFile = library

if architectureName == "":
Expand Down Expand Up @@ -1149,6 +1152,9 @@ def libraryIter(lib: MasterSolutionLibrary):
if args.GenSolTable:
LibraryIO.write("MatchTable", matchTable)

logicProcessEndTime = time.time()
print(f"Loading & Processing Logics Done({logicProcessEndTime-logicProcessBegTime:.2f} secs elapsed)")

return solutions, masterLibraries, fullMasterLibrary

################################################################################
Expand Down