@@ -78,15 +78,14 @@ std::string GetPromptFromStream(std::istream& input, int verbosity,
7878
7979// Get prompt either from interactive input or command line
8080std::string GetPrompt (const InferenceArgs& inference) {
81- PROFILER_ZONE (" Gen.input" );
8281 // If prompt is provided via command line, use that
83- if (!inference.prompt .empty ()) {
84- return inference.prompt ;
85- }
82+ if (!inference.prompt .empty ()) return inference.prompt ;
8683 if (!inference.prompt_file .Empty ()) {
84+ PROFILER_ZONE (" Gen.ReadPrompt" );
8785 return ReadFileToString (inference.prompt_file );
8886 }
8987
88+ PROFILER_ZONE (" Gen.input" );
9089 return GetPromptFromStream (std::cin, inference.verbosity , inference.eot_line );
9190}
9291
@@ -299,8 +298,7 @@ void Run(const LoaderArgs& loader, const ThreadingArgs& threading,
299298int main (int argc, char ** argv) {
300299 gcpp::InternalInit ();
301300 {
302- PROFILER_ZONE (" Startup.misc" );
303-
301+ // Negligible CPU time.
304302 gcpp::LoaderArgs loader (argc, argv);
305303 gcpp::ThreadingArgs threading (argc, argv);
306304 gcpp::InferenceArgs inference (argc, argv);
0 commit comments