Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/keroro824/HashingDeepLearning
Codebase for "SLIDE : In Defense of Smart Algorithms over Hardware Acceleration for Large-Scale Deep Learning Systems"
https://github.com/keroro824/HashingDeepLearning
Last synced: 12 days ago
JSON representation
Codebase for "SLIDE : In Defense of Smart Algorithms over Hardware Acceleration for Large-Scale Deep Learning Systems"
- Host: GitHub
- URL: https://github.com/keroro824/HashingDeepLearning
- Owner: keroro824
- License: mit
- Created: 2019-02-06T03:26:18.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2021-04-13T01:32:24.000Z (over 3 years ago)
- Last Synced: 2024-08-01T03:28:14.679Z (3 months ago)
- Language: C++
- Homepage:
- Size: 22 MB
- Stars: 1,068
- Watchers: 53
- Forks: 169
- Open Issues: 24
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- my-awesome-starred - keroro824/HashingDeepLearning - Codebase for "SLIDE : In Defense of Smart Algorithms over Hardware Acceleration for Large-Scale Deep Learning Systems" (C++)
README
# SLIDE
The SLIDE package contains the source code for reproducing the main experiments in this [paper](https://arxiv.org/abs/1903.03129).
For Optimized Code on CPUs (with AVX, BFloat and other memory optimization) from the newer [paper](https://proceedings.mlsys.org/paper/2021/file/3636638817772e42b59d74cff571fbb3-Paper.pdf) please refer [here](https://github.com/RUSH-LAB/SLIDE)
## Dataset
The Datasets can be downloaded in [Amazon-670K](https://drive.google.com/open?id=0B3lPMIHmG6vGdUJwRzltS1dvUVk). Note that the data is sorted by labels so please shuffle at least the validation/testing data.
## TensorFlow Baselines
We suggest directly get TensorFlow docker image to install [TensorFlow-GPU](https://www.tensorflow.org/install/docker).
For TensorFlow-CPU compiled with AVX2, we recommend using this precompiled [build](https://github.com/lakshayg/tensorflow-build).Also there is a TensorFlow docker image specifically built for CPUs with AVX-512 instructions, to get it use:
```bash
docker pull clearlinux/stacks-dlrs_2-mkl
````config.py` controls the parameters of TensorFlow training like `learning rate`. `example_full_softmax.py, example_sampled_softmax.py` are example files for `Amazon-670K` dataset with full softmax and sampled softmax respectively.
Run
```bash
python python_examples/example_full_softmax.py
python python_examples/example_sampled_softmax.py
```## Running SLIDE
### Dependencies
- CMake v3.0 and above
- C++11 Compliant compiler
- Linux: Ubuntu 16.04 and newer
- Transparent Huge Pages must be enabled.
- SLIDE requires approximately 900 2MB pages, and 10 1GB pages: ([Instructions](https://wiki.debian.org/Hugepages))### Notes:
- For simplicity, please refer to the our [Docker](https://hub.docker.com/repository/docker/ottovonxu/slide) image with all environments installed. To replicate the experiment without setting Hugepages, please download [Amazon-670K](https://drive.google.com/open?id=0B3lPMIHmG6vGdUJwRzltS1dvUVk) in path ```/home/code/HashingDeepLearning/dataset/Amazon```
- Also, note that only Skylake or newer architectures support Hugepages. For older Haswell processors, we need to remove the flag `-mavx512f` from the `OPT_FLAGS` line in Makefile. You can also revert to the commit `2d10d46b5f6f1eda5d19f27038a596446fc17cee` to ignore the HugePages optimization and still use SLIDE (which could lead to a 30% slower performance).
- This version builds all dependencies (which currently are [ZLIB](https://github.com/madler/zlib/tree/v1.2.11) and [CNPY](https://github.com/sarthakpati/cnpy)).
### Commands
Change the paths in ```./SLIDE/Config_amz.csv``` appropriately.
```bash
git clone https://github.com/sarthakpati/HashingDeepLearning.git
cd HashingDeepLearning
mkdir bin
cd bin
cmake ..
make
./runme ../SLIDE/Config_amz.csv
```