Skip to content

Commit e4f9d37

Browse files
authored
Show Benchmark Plots in CuPy Notebook (#1073)
* make env work * fix docs * bring back benchmarks * use github resource
1 parent 754b86d commit e4f9d37

File tree

2 files changed

+2
-16
lines changed

2 files changed

+2
-16
lines changed

docs/changelog.qmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ work in progress.
4747
We add CuPy and SciPy Backend to run the demeaning algorithm on the GPU via the sparse LSMR solver. For problems
4848
where the standard demeaner struggles to converge, this strategy can lead to significant speedups if paired with a GPU.
4949

50-
![Complex Fixed Effects Benchmark](../benchmarks/complex_benchmarks.png)
50+
![Complex Fixed Effects Benchmark](https://raw.githubusercontent.com/py-econometrics/pyfixest/master/benchmarks/complex_benchmarks.png)
5151

5252
### HAC Standard Errors
5353

docs/pyfixest-gpu-cupy.ipynb

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -20,21 +20,7 @@
2020
"languageId": "plaintext"
2121
}
2222
},
23-
"source": [
24-
"Besides JAX, it is possible to run PyFixest on the GPU via CuPy (linux and windows). Instead of applying the alternating projections algorithm to demean fixed effects, CuPy works with sparse matrices and the sparse LSMR solver (as is e.g. [available in scipy](https://docs.scipy.org/doc/scipy/reference/generated/scipy.sparse.linalg.lsmr.html)).\n",
25-
"\n",
26-
"This strategy is amenable for GPU acceleration, and for problems where the standard demeaner struggles to converge, this strategy can lead to significant speedups if paired with a GPU.\n",
27-
"\n",
28-
"![Complex Fixed Effects Structure: Benchmark](../benchmarks/complex_benchmarks.png)\n",
29-
"\n",
30-
"Note that for smaller and more well-behaved problems, running the alternating projections algorithm on the CPU via `numba` or `rust` usually seems to work better: \n",
31-
"\n",
32-
"![Simply Fixed Effects Structure: Benchmark](../benchmarks/simple_benchmarks_cupy.png)\n",
33-
"\n",
34-
"**Benchmark Hardware Specifications:**\n",
35-
"- **CPU**: x86_64, 8 physical cores @ 3.2 GHz, 44 GB RAM\n",
36-
"- **GPU**: NVIDIA RTX A6000, 48 GB memory, Compute Capability 8.6"
37-
]
23+
"source": "Besides JAX, it is possible to run PyFixest on the GPU via CuPy (linux and windows). Instead of applying the alternating projections algorithm to demean fixed effects, CuPy works with sparse matrices and the sparse LSMR solver (as is e.g. [available in scipy](https://docs.scipy.org/doc/scipy/reference/generated/scipy.sparse.linalg.lsmr.html)).\n\nThis strategy is amenable for GPU acceleration, and for problems where the standard demeaner struggles to converge, this strategy can lead to significant speedups if paired with a GPU.\n\n![Complex Fixed Effects Structure: Benchmark](https://raw.githubusercontent.com/py-econometrics/pyfixest/master/benchmarks/complex_benchmarks.png)\n\nNote that for smaller and more well-behaved problems, running the alternating projections algorithm on the CPU via `numba` or `rust` usually seems to work better: \n\n![Simply Fixed Effects Structure: Benchmark](https://raw.githubusercontent.com/py-econometrics/pyfixest/master/benchmarks/simple_benchmarks_cupy.png)\n\n**Benchmark Hardware Specifications:**\n- **CPU**: x86_64, 8 physical cores @ 3.2 GHz, 44 GB RAM\n- **GPU**: NVIDIA RTX A6000, 48 GB memory, Compute Capability 8.6"
3824
},
3925
{
4026
"cell_type": "markdown",

0 commit comments

Comments
 (0)