From c24e153eaed0f8fb8439bfdf19c5816cdc946b36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Mochol=C3=AD?= Date: Tue, 6 Feb 2024 00:59:43 +0100 Subject: [PATCH 1/2] Update throughput docs --- src/lightning/pytorch/callbacks/throughput_monitor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lightning/pytorch/callbacks/throughput_monitor.py b/src/lightning/pytorch/callbacks/throughput_monitor.py index 6d3cb93022070..71a85e431bb7d 100644 --- a/src/lightning/pytorch/callbacks/throughput_monitor.py +++ b/src/lightning/pytorch/callbacks/throughput_monitor.py @@ -50,7 +50,7 @@ def setup(self, stage): model = MyModel() def sample_forward(): - batch = torch.randn(...) + batch = torch.randn(..., device="meta") return model(batch) self.flops_per_batch = measure_flops(model, sample_forward, loss_fn=torch.Tensor.sum) From c10e654a1f9265e1e44ee223d9dea78f7ae6a202 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Mochol=C3=AD?= Date: Tue, 6 Feb 2024 01:01:05 +0100 Subject: [PATCH 2/2] Update throughput docs --- docs/source-fabric/index.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/source-fabric/index.rst b/docs/source-fabric/index.rst index 5051d9c1c02a9..d0aea2cc8a8e4 100644 --- a/docs/source-fabric/index.rst +++ b/docs/source-fabric/index.rst @@ -211,6 +211,7 @@ Get Started Loggers Precision Strategies + Utilities .. toctree::