`PredictionEpochLoop` performance varies on OS!

I’m trying to run a simple pytorch-lightning code, mostly inference. And inspecting with profiler, I’ve found that, based on theOS, the execution time of PredictionEpochLoop varies.

For linux, it is pretty normal but with the same code, on windows it significantly show. I’m using trainer.predict method.

trainer = Trainer(
trainer.predict(datamodule=datamodule, model=model)

On linux, the prediction data loop for single image takes 0.013406. (it would be better if I can post screen-shot but rules).


on widnows, it takes 2.2553


I’m doing inference with few (10) amount of samples for test. I’ve went trhough the source code of PredictionEpochLoop, but found not clue of the cause. Note that, the package version for both windows and linux are exactly same, install from poetry.

This seems not expected. Is it because of any known issue regarding OS side?