diff --git a/tensilelite/Tensile/Parallel.py b/tensilelite/Tensile/Parallel.py index cf9de09db7..9489a810d9 100644 --- a/tensilelite/Tensile/Parallel.py +++ b/tensilelite/Tensile/Parallel.py @@ -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 diff --git a/tensilelite/Tensile/TensileCreateLibrary.py b/tensilelite/Tensile/TensileCreateLibrary.py index 06fe929017..fae4cfa727 100644 --- a/tensilelite/Tensile/TensileCreateLibrary.py +++ b/tensilelite/Tensile/TensileCreateLibrary.py @@ -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 @@ -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 == "": @@ -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 ################################################################################