Skip to content

Commit

Permalink
Updated benchmark instructions and fixed typos
Browse files Browse the repository at this point in the history
  • Loading branch information
dmtrinh committed Feb 15, 2024
1 parent 1e3bbd7 commit da8138a
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 8 deletions.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -177,3 +177,9 @@ cython_debug/

# macOS
.DS_Store

# Benchmarks outputs
benches/benchmark-data.*
benches/*benchmarks_bar_plot*.png
benches/__pycache__
benches/elapsed_times.csv
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,12 @@ Then you can install PhastFT itself:

```bash
pip install numpy
RUSTFLAGS='-Ctarget-cpu=native' pip install git+https://github.com/QuState/PhastFT#subdirectory=pybindings
RUSTFLAGS='-Ctarget-cpu=native' pip install git+https://github.com/QuState/PhastFT#subdirectory=pyphastft
```

```python
import numpy as np
from pybindings import fft
from pyphastft import fft

sig_re = np.asarray(sig_re, dtype=np.float64)
sig_im = np.asarray(sig_im, dtype=np.float64)
Expand Down
12 changes: 7 additions & 5 deletions benches/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

### Setup Environment

1. Install [FFTW3](http://www.fftw.org/download.html)
1. Install [FFTW3](http://www.fftw.org/download.html)[^1]

It may be possible to install `fftw3` using a package manager.

Expand All @@ -13,19 +13,19 @@
sudo apt install libfftw3-dev
```

2. Clone the `PhastFT` git repository [^1].
2. Clone the `PhastFT` git repository [^2].

3. Create virtual env

```bash
cd ~/PhastFT/benches && python -m venv .env && source .env/bin/activate
```

4. Install python dependencies
4. Install python dependencies[^1]

```bash
pip install -r requirements.txt
cd ~/PhastFT/pybindings
cd ~/PhastFT/pyphastft
RUSTFLAGS='-Ctarget-cpu=native' pip install .
```

Expand Down Expand Up @@ -113,4 +113,6 @@ Finally, run:
./profile.sh
```

[^1]: This tutorial assumes you will clone `PhastFT` to `$HOME`
[^1]: Those with macOS on Apple Silicon should consult [pyFFTW Issue #352](https://github.com/pyFFTW/pyFFTW/issues/352#issuecomment-1945444558)

[^2]: This tutorial assumes you will clone `PhastFT` to `$HOME`
2 changes: 1 addition & 1 deletion benches/py_benchmarks.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

pyfftw.interfaces.cache.enable()

from pybindings import fft
from pyphastft import fft

from utils import bytes2human

Expand Down

0 comments on commit da8138a

Please sign in to comment.