Skip to content

Commit

Permalink
do model loading after dataset loading and processing for better memo…
Browse files Browse the repository at this point in the history
…ry measurments.
  • Loading branch information
IlyasMoutawwakil committed Dec 4, 2024
1 parent e051a83 commit d36a9f2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion optimum_benchmark/scenarios/energy_star/scenario.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,12 @@ def run(self, backend: Backend[BackendConfigT]) -> BenchmarkReport:
)

self.init_trackers(backend)
self.run_model_loading_tracking(backend)

self.run_dataset_loading_tracking(backend)
self.run_dataset_preprocessing_tracking(backend)

self.run_model_loading_tracking(backend)

self.logger.info("\t+ Preparing sample inputs for model warmup")
self.sample_inputs = self.dataset[: self.config.input_shapes["batch_size"]]
self.sample_inputs = backend.prepare_inputs(self.sample_inputs)
Expand Down

0 comments on commit d36a9f2

Please sign in to comment.