Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…to erf-opt
  • Loading branch information
TaoLv committed Apr 17, 2019
2 parents 015fd0a + 3e2f752 commit 495ce36
Show file tree
Hide file tree
Showing 607 changed files with 21,585 additions and 7,837 deletions.
6 changes: 3 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@
path = 3rdparty/mkldnn
url = https://github.com/intel/mkl-dnn.git
branch = master
[submodule "3rdparty/cub"]
path = 3rdparty/cub
url = https://github.com/dmlc/cub
[submodule "3rdparty/tvm"]
path = 3rdparty/tvm
url = https://github.com/dmlc/tvm
[submodule "3rdparty/onnx-tensorrt"]
path = 3rdparty/onnx-tensorrt
url = https://github.com/onnx/onnx-tensorrt.git
[submodule "3rdparty/nvidia_cub"]
path = 3rdparty/nvidia_cub
url = https://github.com/NVlabs/cub.git
1 change: 0 additions & 1 deletion 3rdparty/cub
Submodule cub deleted from 05eb57
2 changes: 1 addition & 1 deletion 3rdparty/dmlc-core
Submodule dmlc-core updated 69 files
+1 −0 .gitignore
+13 −0 .travis.yml
+88 −12 CMakeLists.txt
+6 −1 Makefile
+121 −0 appveyor.yml
+24 −0 cmake/build_config.h.in
+5 −0 cmake/dmlc-config.cmake.in
+15 −0 cmake/gtest_cmake.in
+16 −0 doc/build.md
+1 −0 doc/index.md
+57 −1 include/dmlc/any.h
+6 −24 include/dmlc/base.h
+35 −0 include/dmlc/build_config.h
+1 −1 include/dmlc/concurrency.h
+23 −5 include/dmlc/endian.h
+158 −0 include/dmlc/filesystem.h
+113 −0 include/dmlc/io.h
+3 −2 include/dmlc/json.h
+28 −21 include/dmlc/logging.h
+1 −1 include/dmlc/optional.h
+26 −6 include/dmlc/parameter.h
+6 −2 include/dmlc/registry.h
+737 −0 include/dmlc/strtonum.h
+2 −2 include/dmlc/thread_group.h
+19 −15 include/dmlc/threadediter.h
+3 −0 make/config.mk
+1 −1 scripts/lint.py
+1 −1 scripts/packages.mk
+0 −2 scripts/travis/travis_osx_install.sh
+14 −0 scripts/travis/travis_script.sh
+16 −0 src/build_config.cc
+28 −4 src/data/csv_parser.h
+1 −1 src/data/libfm_parser.h
+1 −1 src/data/libsvm_parser.h
+0 −312 src/data/strtonum.h
+21 −17 src/data/text_parser.h
+0 −1 src/io.cc
+1 −1 src/io/azure_filesys.h
+32 −2 src/io/filesys.cc
+0 −128 src/io/filesys.h
+2 −1 src/io/hdfs_filesys.h
+3 −0 src/io/indexed_recordio_split.h
+28 −15 src/io/input_split_base.cc
+7 −1 src/io/input_split_base.h
+3 −0 src/io/line_split.h
+38 −28 src/io/local_filesys.cc
+1 −1 src/io/local_filesys.h
+3 −0 src/io/recordio_split.h
+4 −2 src/io/s3_filesys.cc
+1 −1 src/io/s3_filesys.h
+9 −4 src/io/single_file_split.h
+0 −1 src/io/uri_spec.h
+1 −1 test/dmlc_test.mk
+1 −1 test/filesys_test.cc
+8 −7 test/strtonum_test.cc
+1 −0 test/unittest/.gitignore
+59 −33 test/unittest/CMakeLists.txt
+1 −0 test/unittest/build_config.h.in
+ test/unittest/sample.rec
+117 −118 test/unittest/unittest_inputsplit.cc
+1 −1 test/unittest/unittest_lockfree.cc
+1 −2 test/unittest/unittest_logging.cc
+150 −12 test/unittest/unittest_param.cc
+56 −2 test/unittest/unittest_parser.cc
+77 −0 test/unittest/unittest_tempdir.cc
+30 −8 test/unittest/unittest_thread_group.cc
+13 −6 tracker/dmlc_tracker/local.py
+2 −0 tracker/dmlc_tracker/opts.py
+2 −2 tracker/dmlc_tracker/tracker.py
2 changes: 1 addition & 1 deletion 3rdparty/mkldnn
1 change: 1 addition & 0 deletions 3rdparty/nvidia_cub
Submodule nvidia_cub added at c3ccea
21 changes: 21 additions & 0 deletions 3rdparty/sparse-matrix/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
CC = g++
C = gcc
MKLROOT = /opt/intel/mkl

ifneq ($(USE_INTEL_PATH),)
MKLROOT = $(USE_INTEL_PATH)/mkl
endif

CFLAGS = -fpic -O2 -I/opt/intel/mkl/include -c -Wall -Werror -DMKL_ILP64 -m64 -std=c++11
LDFLAGS = -Wl,--start-group -L${MKLROOT}/../compiler/lib/intel64 ${MKLROOT}/lib/intel64/libmkl_intel_ilp64.a ${MKLROOT}/lib/intel64/libmkl_intel_thread.a ${MKLROOT}/lib/intel64/libmkl_core.a -Wl,--end-group -liomp5 -lpthread -lm -ldl

default: libsparse_matrix.so

libsparse_matrix.so: sparse_matrix.o
$(CC) -shared -o libsparse_matrix.so sparse_matrix.o $(LDFLAGS)

sparse_matrix.o: sparse_matrix.cc sparse_matrix.h
$(CC) $(CFLAGS) sparse_matrix.cc

clean:
$(RM) libsparse_matrix.so *.o *~
45 changes: 45 additions & 0 deletions 3rdparty/sparse-matrix/sparse_matrix.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#include <iostream>
#include <string>
#include <fstream>
#include <mkl_spblas.h>
#include "sparse_matrix.h"



bool mkl_DotCsrDnsDns(SP_INT64* rows_start, SP_INT64* col_indx,
float* values, float* X, float* y,
int rows, int cols, int X_columns)
{

sparse_index_base_t indexing = SPARSE_INDEX_BASE_ZERO;
sparse_status_t status;
sparse_matrix_t A = NULL;
sparse_layout_t layout = SPARSE_LAYOUT_ROW_MAJOR;
float one, zero;
one = (float)1.0;
zero = (float)0.0;

MKL_INT* rows_end = rows_start + 1;
status = mkl_sparse_s_create_csr(&A, indexing, rows, cols, rows_start, rows_end, col_indx, values);

if (status != SPARSE_STATUS_SUCCESS)
{
std::cout << "mkl_sparse_s_create_csr status :" << status << std::endl;
return false;
}
sparse_operation_t operation = SPARSE_OPERATION_NON_TRANSPOSE;
struct matrix_descr descrA;
descrA.type = SPARSE_MATRIX_TYPE_GENERAL;

status = mkl_sparse_s_mm(operation, one, A, descrA, layout, X, X_columns, X_columns, zero, y, X_columns);
if (status != SPARSE_STATUS_SUCCESS)
{
std::cout << "mkl_sparse_s_create_csr status :" << status << std::endl;
return false;
}

mkl_sparse_destroy(A);

return true;

}
48 changes: 48 additions & 0 deletions 3rdparty/sparse-matrix/sparse_matrix.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
#ifndef MXNET_OPERATOR_SPARSE_MATRIX_INL_H_
#define MXNET_OPERATOR_SPARSE_MATRIX_INL_H_


#if (!defined(__INTEL_COMPILER)) & defined(_MSC_VER)
#define SP_INT64 __int64
#define SP_UINT64 unsigned __int64
#else
#define SP_INT64 long long int
#define SP_UINT64 unsigned long long int
#endif


#if defined _WIN32 || defined __CYGWIN__
#ifdef BUILDING_DLL
#ifdef __GNUC__
#define SPM_API_PUBLIC __attribute__ ((dllexport))
#else
#define SPM_API_PUBLIC __declspec(dllexport) // Note: actually gcc seems to also supports this syntax.
#endif
#else
#ifdef __GNUC__
#define SPM_API_PUBLIC __attribute__ ((dllimport))
#else
#define SPM_API_PUBLIC __declspec(dllimport) // Note: actually gcc seems to also supports this syntax.
#endif
#endif
#define SPM_API_LOCAL
#else
#if __GNUC__ >= 4
#define SPM_API_PUBLIC __attribute__ ((visibility ("default")))
#define SPM_API_LOCAL __attribute__ ((visibility ("hidden")))
#else
#define SPM_API_PUBLIC
#define SPM_API_LOCAL
#endif
#endif



extern "C"
{
extern SPM_API_PUBLIC bool mkl_DotCsrDnsDns(SP_INT64* rows_start, SP_INT64* col_indx,
float* values, float* X, float* y, int rows, int cols, int X_columns);

}

#endif //MXNET_OPERATOR_SPARSE_MATRIX_INL_H_
7 changes: 4 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ mxnet_option(USE_MKL_IF_AVAILABLE "Use MKL if found" ON)
mxnet_option(USE_MKLML_MKL "Use MKLDNN variant of MKL (if MKL found)" ON IF USE_MKL_IF_AVAILABLE AND (NOT APPLE))
mxnet_option(USE_MKLDNN "Use MKLDNN variant of MKL (if MKL found)" ON IF USE_MKL_IF_AVAILABLE AND (NOT APPLE) AND (NOT MSVC) AND (CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "x86_64") AND (NOT CMAKE_CROSSCOMPILING))
mxnet_option(USE_OPERATOR_TUNING "Enable auto-tuning of operators" ON IF NOT MSVC)
mxnet_option(USE_GPERFTOOLS "Build with GPerfTools support (if found)" ON)
mxnet_option(USE_GPERFTOOLS "Build with GPerfTools support" OFF)
mxnet_option(USE_JEMALLOC "Build with Jemalloc support" ON)
mxnet_option(USE_PROFILER "Build with Profiler support" ON)
mxnet_option(USE_DIST_KVSTORE "Build with DIST_KVSTORE support" OFF)
Expand Down Expand Up @@ -255,6 +255,7 @@ if(USE_MKLDNN)
add_subdirectory(3rdparty/mkldnn)

include_directories(3rdparty/mkldnn/include)
include_directories(${PROJECT_BINARY_DIR}/3rdparty/mkldnn/include)
add_definitions(-DUSE_MKL=1)
add_definitions(-DCUB_MKL=1)
add_definitions(-DMXNET_USE_MKLDNN=1)
Expand Down Expand Up @@ -327,7 +328,7 @@ endforeach()

include_directories("include")
include_directories("3rdparty/mshadow")
include_directories("3rdparty/cub")
include_directories("3rdparty/nvidia_cub")
include_directories("3rdparty/tvm/nnvm/include")
include_directories("3rdparty/tvm/include")
include_directories("3rdparty/dmlc-core/include")
Expand Down Expand Up @@ -511,7 +512,7 @@ list(APPEND CUDA ${MSHADOW_CUDASOURCE})
FILE(GLOB_RECURSE GROUP_SOURCE "src/*.cc" "3rdparty/tvm/nnvm/*.cc" "plugin/*.cc")
FILE(GLOB_RECURSE GROUP_Include "src/*.h" "3rdparty/tvm/nnvm/*.h" "3rdparty/mshadow/mshadow/*.h" "plugin/*.h")
FILE(GLOB_RECURSE GROUP_CUDA "src/*.cu" "src/*.cuh" "3rdparty/mshadow/mshadow/*.cuh" "plugin/*.cu"
"plugin/*.cuh" "3rdparty/cub/cub/*.cuh")
"plugin/*.cuh" "3rdparty/nvidia_cub/cub/*.cuh")
assign_source_group("Source" ${GROUP_SOURCE})
assign_source_group("Include" ${GROUP_Include})
assign_source_group("CUDA" ${GROUP_CUDA})
Expand Down
23 changes: 22 additions & 1 deletion CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ The committers are the granted write access to the project.
- Marco is the creator of the current MXNet CI.
* [Carin Meier](https://github.com/gigasquid)
- Carin created and is the current maintainer for the Clojure interface.
* [Patric Zhao](https://github.com/pengzhao-intel)
- Patric is a parallel computing expert and a major contributor to the MXNet MKL-DNN backend.
* [Tao Lv](https://github.com/TaoLv)
- Tao is a major contributor to the MXNet MKL-DNN backend and performance on CPU.


### Become a Committer
Expand Down Expand Up @@ -211,10 +215,27 @@ List of Contributors
* [Harsh Patel](https://github.com/harshp8l)
* [Xiao Wang](https://github.com/BeyonderXX)
* [Piyush Ghai](https://github.com/piyushghai)
* [Dang Trung Kien](https://github.com/kiendang)
* [Zach Boldyga](https://github.com/zboldyga)
* [Gordon Reid](https://github.com/gordon1992)

* [Ming Yang](http://ufoym.com)
* [Satya Krishna Gorti](https://github.com/satyakrishnagorti)
* [Neo Chien](https://github.com/cchung100m)
* [Wujie Zhou](https://github.com/eureka7mt)
* [Ciyong Chen](https://github.com/ciyongch)
* [Hao Li](https://github.com/lihaofd)
* [Jin Huang](https://github.com/jinhuang415)
* [Luobao Zou](https://github.com/luobao-intel)
* [Pengxin Yuan](https://github.com/pengxin99)
* [Rong Zhang](https://github.com/rongzha1/)
* [Shu Zhang](https://github.com/Sherry-Zhang)
* [Shufan Wu](https://github.com/juliusshufan)
* [Wenting Jiang](https://github.com/wentingj)
* [Xiaotao Chen](https://github.com/XiaotaoChen)
* [Xinyu Chen](https://github.com/xinyu-intel)
* [Zhennan Qin](https://github.com/ZhennanQin)
* [Zhiyuan Huang](https://github.com/huangzhiyuan)
* [Zak Jost](https://github.com/zjost)

Label Bot
---------
Expand Down
4 changes: 2 additions & 2 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -315,10 +315,10 @@
Copyright 2005-2008, Google Inc.
3. Moderngpu - For details, see, 3rdparty/ctc_include/contrib/moderngpu/LICENSE
Copyright (c) 2013, NVIDIA CORPORATION. All rights reserved.
4. CUB Library - For details, see, 3rdparty/cub/LICENSE.TXT
4. CUB Library - For details, see, 3rdparty/nvidia_cub/LICENSE.TXT
Copyright (c) 2010-2011, Duane Merrill. All rights reserved.
Copyright (c) 2011-2016, NVIDIA CORPORATION. All rights reserved.
5. CUB mersenne.h - For details, see 3rdparty/cub/test/mersenne.h
5. CUB mersenne.h - For details, see 3rdparty/nvidia_cub/test/mersenne.h
Copyright (C) 1997 - 2002, Makoto Matsumoto and Takuji Nishimura,
6. Googlemock - For details, see, 3rdparty/googletest/googlemock/LICENSE
Copyright 2006-2015, Google Inc.
Expand Down
Loading

0 comments on commit 495ce36

Please sign in to comment.