https://github.com/vmchale/kullback-liebler
Kullback-Liebler divergence in Futhark
https://github.com/vmchale/kullback-liebler
futhark gpu-acceleration information-theory
Last synced: 3 months ago
JSON representation
Kullback-Liebler divergence in Futhark
- Host: GitHub
- URL: https://github.com/vmchale/kullback-liebler
- Owner: vmchale
- License: bsd-3-clause
- Created: 2020-01-01T16:41:25.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2021-06-05T22:25:02.000Z (almost 5 years ago)
- Last Synced: 2025-01-08T12:08:04.912Z (over 1 year ago)
- Topics: futhark, gpu-acceleration, information-theory
- Language: Futhark
- Size: 214 KB
- Stars: 8
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# futhark-kullback-liebler
The Kullback-Liebler divergence, Hellinger distance, and alpha-divergence in Futhark.
## Documentation
Documentation is available [here](https://vmchale.github.io/kullback-liebler/).
## Benchmarks
To run the benchmarks:
```
make
pipenv run python harness.py
```
and
```
futhark bench information.fut --backend opencl --runs=100
```
### Comparison
| Computation | Array Size | Implementation | Time |
| ----------- | ---------- | -------------- | ---- |
| Entropy | 10000000 | Futhark | 19.61 ms |
| Kullback-Liebler Divergence | 10000000 | Futhark | 27.41 ms |
| Entropy | 10000000 | Python + Futhark | 52.80 ms |
| Kullback-Liebler Divergence | 10000000 | Python + Futhark | 94.07 ms |
| Entropy | 10000000 | Python (SciPy) | 233.45 ms |
| Kullback-Liebler Divergence | 10000000 | Python (SciPy) | 340.83 ms |
| Entropy | 10000000 | J | 227.37 ms |
| Entropy | 10000000 | Haskell Accelerate | 46.27 ms |
| Kullback-Liebler Divergence | 10000000 | Haskell Accelerate | 70.99 ms |
(Have a look at
[accelerate-kullback-liebler](https://hub.darcs.net/vmchale/accelerate-kullback-liebler/)
for details on its benchmarks).