Update docs.

This commit is contained in:
Matt Tancik authored and Matthew Tancik committed 2022-06-09 10:29:59 -07:00
1 parent bed39763a1
commit 35deb34515
17 files changed
+86 -26

No files matched your search

+5 -5
View File
@@ -6,7 +6,7 @@ We provide built-in performance profiling capabilities to make it easier for you
#### In-house profiler
You can use our built-in profiler by enabling the profiler in the config:
```
```yaml
# e.g. configs/graphs_default.yaml
logging:
@@ -17,7 +17,7 @@ The profiler computes the average total time of execution for any function with
For instance, if you wanted to profile the total time it takes to generate rays given pixel and camera indices via the `RayGenerator` class, you would want to evaluate its `forward()` function. In that class, you would need to add the decorator to the function.
```
```python
class RayGenerator(nn.Module):
...
@@ -38,13 +38,13 @@ If you want to profile the entire codebase, we provide functionality to generate
Install PySpy
```
```bash
pip install py-spy
```
To perform the profiling, you can either specify that you want to generate a flame graph or generate a live-view of the profiler.
```
```bash
## for flame graph
./scripts/debugging/profile.sh -t flame -o flame.svg -p <python_command>
@@ -56,7 +56,7 @@ To perform the profiling, you can either specify that you want to generate a fla
In both cases, `<python_command>` can be replaced with any command you would normally run in the terminal. For instance, you can replace `<python_function>` with `scripts/run_train.py data/dataset=blender_lego`. Then the full command would be e.g.:
```
```bash
./scripts/debugging/profile.sh -t flame -o flame.svg -p scripts/run_train.py data/dataset=blender_lego
```