-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ideep python package `ideep4py` Signed-off-by: fengyuan <[email protected]>
- Loading branch information
0 parents
commit c006b3c
Showing
184 changed files
with
25,265 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
*~ | ||
*.egg/ | ||
*.pyc | ||
*.pyo | ||
*.cpp | ||
*.so | ||
cscope.* | ||
tags | ||
build | ||
\#*\# | ||
.\#* | ||
.coverage | ||
.eggs/ | ||
_readthedocs_build | ||
ideep.egg-info/ | ||
dist/ | ||
htmlcov/ | ||
.idea/ | ||
ideep/python/api/c_api.py | ||
ideep/python/api/support.py | ||
ideep/python/api/memory.py | ||
ideep/python/api/inner_product_*.py | ||
ideep/python/api/reorder.py | ||
ideep/python/api/convolution_*.py | ||
ideep/python/api/eltwise_*.py | ||
ideep/python/api/concat.py | ||
ideep/python/api/lrn_*.py | ||
ideep/python/api/pooling_*.py | ||
ideep/python/api/bn_*.py | ||
ideep/python/api/view.py | ||
ideep/python/api/sum.py | ||
ideep/python/api/cosim_dump.py | ||
ideep/python/api/dropout.py | ||
ideep/python/mdarray.py | ||
external/mkldnn/source |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "mkl-dnn"] | ||
path = mkl-dnn | ||
url = https://github.com/01org/mkl-dnn.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[pep8] | ||
exclude=caffe_pb*,.eggs,*.egg,build | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
Copyright (c) 2018 Intel Corporation. | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in | ||
all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# iDeep: Intel Deep Learning Package | ||
|
||
Intel Deep Learning Package (iDeep) is an open source performance library of primitives for accelerating deep learning frameworks on Intel Architecture. iDeep provides user-friendly API and highly tuned implementations for DNN standard routines. | ||
|
||
The package provides C and Python API. | ||
|
||
## iDeep Python Package (ideep4py) Requirements | ||
|
||
We recommend these Linux distributions. | ||
- Ubuntu 14.04/16.04 LTS 64bit | ||
- CentOS 7 64bit | ||
|
||
The following versions of Python can be used: | ||
- 2.7.5+, 3.5.2+, and 3.6.0+ | ||
|
||
Above recommended environments are tested. We cannot guarantee that ideep4py works on other environments including Windows and macOS, even if ideep4py looks running correctly. | ||
|
||
|
||
Minimum requirements: | ||
- Numpy 1.9+ | ||
- Six 1.9+ | ||
- Swig 3.0.12 | ||
- Glog 0.3.5 | ||
- Cmake 2.8.0 | ||
- Doxygen 1.8.5 | ||
- C++ compiler with C++11 standard support | ||
|
||
## Installation of ideep4py | ||
|
||
If you use old ``setuptools``, upgrade it: | ||
|
||
``` | ||
pip install -U setuptools | ||
``` | ||
|
||
Then, install ideep from the source code: | ||
``` | ||
python setup.py install | ||
``` | ||
|
||
Use pip to uninstall ideep4py: | ||
|
||
```sh | ||
$ pip uninstall ideep4py | ||
``` | ||
|
||
## More information | ||
- ideep github: https://github.com/intel/ideep.git | ||
|
||
## License | ||
MIT License (see `LICENSE` file). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
################################################################################## | ||
# # Copyright (c) 2018 Intel Corporation. | ||
# # | ||
# # Permission is hereby granted, free of charge, to any person obtaining a copy | ||
# # of this software and associated documentation files (the "Software"), to deal | ||
# # in the Software without restriction, including without limitation the rights | ||
# # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
# # copies of the Software, and to permit persons to whom the Software is | ||
# # furnished to do so, subject to the following conditions: | ||
# # | ||
# # The above copyright notice and this permission notice shall be included in | ||
# # all copies or substantial portions of the Software. | ||
# # | ||
# # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
# # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
# # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
# # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
# # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
# # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
# # THE SOFTWARE. | ||
# # | ||
################################################################################## | ||
|
||
|
||
LOCAL_DIR = $(shell pwd) | ||
|
||
DLCP_CXX ?= icpc | ||
|
||
FLAG_DEBUG ?= 0 | ||
|
||
AR = ar | ||
CXXFLAGS += -fPIC | ||
|
||
ifneq (,$(findstring icpc, $(DLCP_CXX))) | ||
CXX = $(DLCP_CXX) | ||
CXXFLAGS += -std=c++11 | ||
LDFLAGS += -static-intel | ||
else | ||
$(error Unsupported compiler $(DLCP_CXX)) | ||
endif | ||
|
||
ifeq ($(FLAG_DEBUG), 1) | ||
CXXFLAGS += -O0 -g | ||
else | ||
CXXFLAGS += -O2 | ||
endif | ||
|
||
ifneq (,$(findstring icpc,$(CXX))) | ||
LDFLAGS += -static-intel | ||
endif | ||
|
||
ifneq (,$(findstring icpc,$(CXX))) | ||
CXXFLAGS += -qopenmp | ||
endif | ||
|
||
COMPRESSION_LIB = lib/libdlcomp.so | ||
COMPRESSION_LIBNAME = libdlcomp.so | ||
SRC_DIR = $(LOCAL_DIR)/src | ||
INCL_DIR = $(LOCAL_DIR)/include $(LOCAL_DIR)/src | ||
|
||
TARGET = libdlcomp.so | ||
INCS = -I$(INCLUDE_DIR) -I$(SRC_DIR) | ||
LDFLAGS += -ldl -lrt -lpthread -liomp5 | ||
CXXFLAGS += $(addprefix -I,$(INCL_DIR)) | ||
|
||
|
||
SRCS += src/dl_compression_impl.cpp | ||
SRCS += src/dl_compression_util.cpp | ||
SRCS += src/dl_compression.cpp | ||
|
||
OBJS := $(SRCS:.cpp=.o) | ||
|
||
|
||
all: $(TARGET) | ||
|
||
$(TARGET): $(COMPRESSION_LIB) | ||
|
||
$(COMPRESSION_LIB): $(OBJS) | ||
$(CXX) $(CXXFLAGS) -shared -Wl,-soname,$(COMPRESSION_LIBNAME) -o $(COMPRESSION_LIB) $(OBJS) $(LDFLAGS) | ||
|
||
$(SRC_DIR)/%.o: $(SRC_DIR)/%.cpp | ||
$(CXX) -c $(CXXFLAGS) $< -o $@ | ||
|
||
clean: | ||
rm -f $(SRC_DIR)/*.o $(COMPRESSION_LIB) | ||
|
||
cleanall: clean | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/bash | ||
|
||
source /opt/intel/bin/compilervars.sh intel64 |
Oops, something went wrong.