{"id":16840573,"url":"https://github.com/mitmul/intel-chainer","last_synced_at":"2026-01-04T11:33:30.729Z","repository":{"id":141385263,"uuid":"90591466","full_name":"mitmul/intel-chainer","owner":"mitmul","description":null,"archived":false,"fork":false,"pushed_at":"2017-05-08T06:02:01.000Z","size":13679,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"add-build-options","last_synced_at":"2025-01-24T11:44:12.648Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mitmul.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-05-08T05:58:09.000Z","updated_at":"2018-12-02T18:35:39.000Z","dependencies_parsed_at":"2024-06-14T19:16:34.203Z","dependency_job_id":null,"html_url":"https://github.com/mitmul/intel-chainer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mitmul%2Fintel-chainer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mitmul%2Fintel-chainer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mitmul%2Fintel-chainer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mitmul%2Fintel-chainer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mitmul","download_url":"https://codeload.github.com/mitmul/intel-chainer/tar.gz/refs/heads/add-build-options","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244159989,"owners_count":20408019,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-13T12:37:14.454Z","updated_at":"2026-01-04T11:33:30.693Z","avatar_url":"https://github.com/mitmul.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"[![pypi](https://img.shields.io/pypi/v/chainer.svg)](https://pypi.python.org/pypi/chainer)\n[![GitHub license](https://img.shields.io/github/license/pfnet/chainer.svg)](https://github.com/pfnet/chainer)\n[![travis](https://img.shields.io/travis/pfnet/chainer/master.svg)](https://travis-ci.org/pfnet/chainer)\n[![coveralls](https://img.shields.io/coveralls/pfnet/chainer.svg)](https://coveralls.io/github/pfnet/chainer)\n[![Read the Docs](https://readthedocs.org/projects/chainer/badge/?version=stable)](http://docs.chainer.org/en/stable/?badge=stable)\n\n# Chainer: a neural network framework\n# Intel® Software Optimization\n##### This is a fast implementation of integration Chainer with Intel® Math Kernel Library for Deep Neural Networks (Intel® MKL-DNN). It accelerates Chainer on CPU, esp. Intel® Xeon® and Intel® Xeon Phi™ processors. Current optimized layers (operations) includes convolution (2D), local response normalization, ReLU, linear (inner product), pooling, concat, sum and gradient accumulation. Validated topologies includes Alexnet, Overfeat, VGGA, VGG-16, VGG-19 and GoogLeNet-v1 with performance gain from 50-250X on Xeon and Xeon Phi.\n\n## Requirements\n\nChainer is tested on Ubuntu 14.04 and CentOS 7. We recommend them to use Chainer, though it may run on other systems as well.\n\nMinimum requirements:\n\n- Python 2.7.6+, 3.4.3+, 3.5.1+, 3.6.0+\n- NumPy 1.9, 1.10, 1.11, 1.12\n- Six 1.9\n\nRequirements for some features:\n\n- Intel MKL-DNN support\n  - mkl-dnn 0.7\n  - g++ 4.8.4+\n  - swig 3.0\n  - glog 0.3.3\n  - gflags 2.0\n  - python-setuptools 3.3\n  - boost 1.58\n- CUDA support\n  - CUDA 6.5, 7.0, 7.5, 8.0\n  - filelock\n  - g++ 4.8.4+\n- cuDNN support\n  - cuDNN v2, v3, v4, v5, v5.1\n- Caffe model support\n  - Protocol Buffers (pip install protobuf)\n    - protobuf\u003e=3.0.0 is required for Py3\n- Image dataset support\n  - Pillow\n- HDF5 serialization support\n  - h5py 2.5.0\n- Testing utilities\n  - Mock\n  - Nose\n\n## Installation\n\n### Minimum installation\n\nIf you use old ``setuptools``, upgrade it:\n\n```\npip install -U setuptools\n```\n\nThen, install Chainer via PyPI:\n\n```\npip install chainer\n```\n\nYou can also install Chainer from the source code:\n\n```\npython setup.py install\n```\n\n### Installation with Intel software optimization\nTo enable MKL-DNN, first you have to install MKL-DNN library.\n\n```\ngit clone https://github.com/01org/mkl-dnn.git\ncd scripts \u0026\u0026 ./prepare_mkl.sh \u0026\u0026 cd -\nmkdir -p build \u0026\u0026 cd build \u0026\u0026 cmake .. \u0026\u0026 make -j\nsudo make install\n```\n\n### Build Chainer with MKL-DNN support\r\n\n```\npython setup.py build\npython setup.py install\n```\n\n### Installation with CUDA\n\nIf you want to enable CUDA, first you have to install CUDA and set the environment variable `PATH` and `LD_LIBRARY_PATH` for CUDA executables and libraries.\nFor example, if you are using Ubuntu and CUDA is installed by the official distribution, then CUDA is installed at `/usr/local/cuda`.\nIn this case, you have to add the following lines to `.bashrc` or `.zshrc` (choose which you are using):\n```\nexport PATH=/usr/local/cuda/bin:$PATH\nexport LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH\n```\n\nChainer had `chainer-cuda-deps` module to enable CUDA in previous version.\nRecent version (\u003e=1.3) does not require this module.\nSo **you do not have to install** `chainer-cuda-deps`.\n\nIf you want to enable cuDNN, add a directory containing `cudnn.h` to `CFLAGS`, and add a directory containing `libcudnn.so` to `LDFLAGS` and `LD_LIBRARY_PATH`:\n```\nexport CFLAGS=-I/path/to/cudnn/include\nexport LDFLAGS=-L/path/to/cudnn/lib\nexport LD_LIBRARY_PATH=/path/to/cudnn/lib:$LD_LIBRARY_PATH\n```\nDo not forget to restart your terminal session (or `source` it) to enable these changes.\nAnd then, reinstall Chainer.\n\n\n### Image dataset support\n\nIf you want to use Image dataset (`chainer/datasets/ImageDataset`), please install Pillow manually.\nSupported image format depends on your environment.\n\n```\npip install pillow\n```\n\n\n### HDF5 Support\n\nIf you want to use HDF5 serialization, please install h5py manually.\nh5py requires libhdf5.\nAnaconda distribution includes this package.\nIf you are using another Python distribution, use either of the following commands to install libhdf5 depending on your Linux environment:\n\n```\napt-get install libhdf5-dev\nyum install hdf5-devel\n```\n\nAnd then, install h5py via PyPI.\nYou may need to install Cython for h5py.\n\n```\npip install cython\npip install h5py\n```\n\n## Run Chainer with Intel software optimization\nSet environment variable `LD_LIBRARY_PATH` for MKL-DNN library before run, most likely it will be /usr/local/lib:\n\n```\nexport LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH\n```\n\nThe rest of the steps is the same as before. To run convnet-benchmarks on IA, please check out [convnet-benchmarks](https://github.com/mitmul/convnet-benchmarks) repo:\n\n```\ncd chainer\n./train_imagenet.py -a alexnet -B 128 -g -1\n```\n\n*Note*: if an error of \"AttributeError: 'module' object has no attribute 'cupy'\" is reported, please refer to the following PR for the fix:\n[Timer fix for IA](https://github.com/mitmul/convnet-benchmarks/pull/3)\n\n\n## Run with Docker\n\nWe provide the official Docker image.\nUse [nvidia-docker](https://github.com/NVIDIA/nvidia-docker) command to run Chainer image with GPU.\nYou can login to the environment with bash, and run the Python interpreter.\n\n```\n$ nvidia-docker run -it chainer/chainer /bin/bash\n```\n\n\n## Reference\n\nTokui, S., Oono, K., Hido, S. and Clayton, J.,\nChainer: a Next-Generation Open Source Framework for Deep Learning,\n*Proceedings of Workshop on Machine Learning Systems(LearningSys) in\nThe Twenty-ninth Annual Conference on Neural Information Processing Systems (NIPS)*, (2015)\n[URL](http://learningsys.org/papers/LearningSys_2015_paper_33.pdf), [BibTex](chainer_bibtex.txt)\n\n\n## More information\n\n- Official site: http://chainer.org/\n- Official document: http://docs.chainer.org/\n- github: https://github.com/pfnet/chainer\n- Forum: https://groups.google.com/forum/#!forum/chainer\n- Forum (Japanese): https://groups.google.com/forum/#!forum/chainer-jp\n- Twitter: https://twitter.com/ChainerOfficial\n- Twitter (Japanese): https://twitter.com/chainerjp\n- External examples: https://github.com/pfnet/chainer/wiki/External-examples\n- Research projects using Chainer: https://github.com/pfnet/chainer/wiki/Research-projects-using-Chainer\n\n## License\n\nMIT License (see `LICENSE` file).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmitmul%2Fintel-chainer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmitmul%2Fintel-chainer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmitmul%2Fintel-chainer/lists"}