Граф коммитов

501 Коммитов

Автор SHA1 Сообщение Дата
Yang Chen 3d809bf54c Added several internal API header files
In case other projects may use these header files, we added
them into API/Internals.

* ComputationGraphAlgorithms.h was moved from Source/ComputationNetworkLib

* PrimitiveOpType.h and EvaluatorWrapper.h were moved from Source/CNTKv2Library

* PrimitiveFunctionAttribute.h was extracted from PrimitiveFunction.h. It contains
  a new class PrimitiveFunctionAttribute which is the collection of all attribute
  names for PrimitiveFunction.

  This change actually had a subtle side-effect. We had a global static variable
  s_stateAttributes that depended on PrimitiveFunction::AttributeNameRngSeed and
  PrimitiveFunction::AttributeNameRngOffset. After we moved those static
  attribute-variables into another translation unit, s_stateAttributes can be
  initialized with empty wstring, because PrimitiveFunctionAttribute::AttributeNameRngSeed
  PrimitiveFunctionAttribute::AttributeNameRngSeedOffset were initialized after
  s_stateAttributes. Note that the initialization order of global static variables
  is not well-defined cross translation units. To fix the issue, we also moved
  s_stateAttributes into PrimitiveFunctionAttribute class, and renamed it to
  s_rngStateAttributes. I think it's reasonable to consider s_rngStateAttributes
  to be part of the PrimitiveFunctionAttribute class.

* PrimitiveFunction.h was moved from Source/CNTKv2Library
2018-08-22 10:47:18 -07:00
TJ 9040c9d607 Build c# test dlls in sequence 2018-08-17 11:32:42 -07:00
Vadim Mazalov 0ef680ec24 add binary MLF reader to makefile 2018-08-16 21:25:37 -07:00
TJ 91d990182d Squashed commit of the following:
commit a08e22e7b812891dd641cc512198528a3cd1cddc
Author: TJ <tix@microsoft.com>
Date:   Thu Jul 19 17:53:21 2018 -0700

    Enabled example tests for linux

commit 2b0b7c49f7ab3ad8ba40684efdaf4c4e4fd2265f
Author: Tix <tix@microsoft.com>
Date:   Thu Jun 28 18:30:51 2018 -0700

    Enabled V2 lib CS unit tests on linux
2018-07-20 09:33:25 -07:00
Bowen Bao 5ca4bb3a93 Add Sequential Convolution.
adding convolution over sequential axis related tests.

adding convolution over sequential axis.
currently additional supported parameters:
  auto padding
  strides
  groups
support for dilation needs to be tested on GPU.

updating PrimitiveOpType SerializationTests that is missing from other commits ..

convert tabs to spaces.

Refine cpp convolution unit tests. Add dilation tests to python convolution unit tests.

more detailed comments on shape change for 1d seq conv with reduction rank 0. And other minor tweaks.

add EndToEndTests of sequential convolution on MNIST

add init_bias tests for seq conv

minor change in comments

rename ConvolutionOverSequenceAxisNode. Add comment on cudnn failed new test.

add more comments, trim spaces

add more comments, remove magic number, add more boundary checks.

remove the last SetValue for outputSeqAxisDimValue as TensorView Unary Op has already updated the value.

fix bug in python seqconv default bias shape, and add related unit tests.

small tweak in seq conv to avoid additional gpu memory allocation and increase performance.

Example: seq MNIST, and profiling

adjust conv c++ value unit test channel size.

small update on python seq mnist

Sequential convolution v2.
* re-designed ConvolutionSequenceShapeNode: refactored to separate out computing output sequence length from v1 node design. And refactored ConvolutionNodeBaseExtended as their common base class. (Since "ConvolutionNodeBase" is not only base class of ConvolutionNode but also PoolingNode).
* Performance increase against v1.
- compute sequence length by MBLayout instead of mask output from unpack. Avoiding the unnecessary cpu/gpu memory copy.

not include py sequence example for now .. need to find they a correct location.

add check for truncated sequences in sequential convolution

improve code style.

Moving sequential convolution in python to a new high level api, to maintain compatibility with previous implementation (special case 1d sequential convolution).

Add ConvolutionSequenceShape OP.

nit

update conv_attribute test for updated convolution parameter
move sequential parameter to the last
update test shortcircuit for CPU convolution dilation.

update endtoendtest - unittest baseline file for new convolution unittests.

update makefile to include new unittest file for linux

nit

Update ConvolutionNode initialization code to handle TransformerNode Initialization.

nit

nit
2018-07-10 21:10:33 -07:00
Liqun Fu 1f0eed883e Merge branch 'liqun/gslfixstage' 2018-07-10 01:07:41 +00:00
TJ 83370c12a9 Squashed commit of the following:
commit 02eb64bf5e9f6c22138b5111f5518f6087cea7e0
Author: TJ <tix@microsoft.com>
Date:   Mon Jul 9 13:07:13 2018 -0700

    set the multiverso lib file when asgd is set to true, otherwise it will
    look for a lib that doesn't match any rule when asgd=false
2018-07-09 16:41:26 -07:00
liqfu 3c87d2012c upgrade linux build from c++11 to c++14, enable gsl, update with latest LotusIR 2018-07-09 13:29:47 -07:00
David Brownell add2896ae4 Not hard-coding build locations 2018-07-09 08:37:44 -07:00
Yang Chen 25a0896e99 use system CXX for building Multiverso on Linux
We used to set CXX to mpic++, which was then used for building
Multiverso. Unfortunately, this kind of configuration conflicted
with find_package(MPI), and hence caused failure.

This commit fixed the issue by using system CXX for building
Multiverso. It also fixed two other issues:

* EVAL_LIB depends on libmultiverso, so we had to set
  MULTIVERSO_LIB before the EVAL_LIB rule

* cmake variable doesn't have a "PATHNAME" type, we used
  PATH instead. We also replace FILEPATH with PATH because
  BOOST_LIBRARY_DIRS points to a path rather than a file.
2018-07-03 13:55:57 -07:00
liqfu c589619dec update to ONNX1.2.2 2018-06-28 08:38:36 -07:00
liqfu bc71c7e151 updatre onnx 1.2.1 2018-06-08 13:15:45 -07:00
David Brownell c42a444b87 Side-by-Side compilation for Windows and Linux 2018-06-06 11:50:19 -07:00
David Brownell 7882cf052b Building .Net Core on Linux 2018-06-06 08:38:54 -07:00
liqun fu cdb9afb6ea Add ONNX 1.2 support 2018-06-04 16:35:49 -07:00
Alexander Pereyaslavets e785a2b1ed
Allow to add some extra cxxflags via env
Allow to add some extra cxxflags via system env. 

Use cases:
1) https://github.com/Microsoft/CNTK/issues/3155
export CXXFLAGS="-Wno-unused-variable -Wno-sign-compare" 
configure && make

2) Our libc/libstdc has been built with gcc-4.9. So we fail to build cntk in current state with gcc-5 in compatibility mode.
https://gcc.gnu.org/onlinedocs/libstdc++/manual/using_dual_abi.html

After patching cntk we have successful build:
COMMON_FLAGS="-D_GLIBCXX_USE_CXX11_ABI=0" CXXFLAGS="-D_GLIBCXX_USE_CXX11_ABI=0 -Wno-unused-variable -Wno-sign-compare" configure && make
(nvcc don't recongnise -W flags)
2018-04-24 16:36:56 +03:00
Project Philly ae8112923f Integrate jqian/nccl into master 2018-03-10 03:27:56 +00:00
Thiago Crepaldi 966f7ad3f7 Update pip package metadata (setup.py) 2018-03-09 14:00:55 -08:00
Junjie Qian 28f587f424 Get GPU ID with nvmlDeviceGetUUID instead of device id in /proc/
Thanks to Frank's initial code change.
Initialize NCCL with GPU ID frm nvml call instead of from device id in
/proc. Previous way causes "same device being used" error if two
different containers running on same host and try to initialize NCCL.

Add nvml library for nvml apis

Update the Makefile
2018-03-08 10:41:37 -08:00
Thiago Crepaldi 85c1429ad6 Rename ImageWriterDll to DelayLoadedExtensionsDll 2018-03-07 17:15:04 -08:00
Thiago Crepaldi 0f28edf814 Fix CNTK build and tests after 1bitSGD merge 2018-03-07 15:31:25 -08:00
liqfu 7651b0d567 ONNX LSTM support 2018-03-05 13:13:03 -08:00
Ratan Rai Sur 35ce24a606 update java make to make sources and javadoc jars 2018-03-04 16:23:49 -05:00
Thiago Crepaldi 772f0d927d Remove 3rd party libs and debug info wheel packages 2018-02-27 09:29:16 -08:00
Mark Hamilton 1d676a0c0f Add dependencies to java jar 2018-02-26 15:28:20 -05:00
KeDengMS 90321746eb Disable MKL-DNN for now before we pick up the fix for AMD cache size fix.
In MKL-DNN 0.12 release, there's a cache size detection issue causing crash on AMD Ryzen CPUs.
This change disables MKL-DNN to unblock AMD Ryzen users for now.
2018-02-20 16:18:38 -08:00
Manik Jindal 461b82d69f Move hard-coded CNTK version to a common place
This will help to build CNTK for nighlty builds with required CNTK
version. If environment variable 'BUILD_CNTK_VERSION' is set, then CNTK
will be build for that version as a public release('+' won't be appended
to CNTK version). Otherwise hard-coded CNTK version will be used as a
private build (2.4+).
2018-02-20 13:22:59 -08:00
KeDengMS 19719a656b Fast tensor ops using MKL
- Accelerates some common tensor ops in Intel CPU inference for float32, especially for fully connected networks
- Can be turned on/off by cntk.cntk_py.enable_cpueval_optimization()/cntk.cntk_py.disable_cpueval_optimization()
2018-02-08 22:22:27 -08:00
Manik Jindal fbbbaa92f6 Merge release/2.4
Squashed commit of the following:

commit 82e025bbe319008c535741a9fc78367032cc3be0
Merge: 0702c09c3 ed5451c83
Author: Manik Jindal <manikj@microsoft.com>
Date:   Wed Jan 31 21:23:23 2018 -0800

    Merge branch 'release/2.4' into manikj/merge-release-2.4

commit 0702c09c3c3cc1ae1e4cba28df3ce64f091a8c3e
Merge: 32f6844ca 1afe40461
Author: Manik Jindal <manikj@microsoft.com>
Date:   Wed Jan 31 21:23:11 2018 -0800

    Merge branch 'release/2.4' (early part) into manikj/merge-release-2.4

commit 32f6844ca84797db2dac8959eeb72576692986d0
Merge: 42a47a326 1f15d4649
Author: Manik Jindal <manikj@microsoft.com>
Date:   Wed Jan 31 21:21:55 2018 -0800

    Merge branch 'release/2.4' (early part) into manikj/merge-release-2.4

commit ed5451c834
Author: Manik Jindal <manikj@microsoft.com>
Date:   Wed Jan 31 19:32:04 2018 -0800

    MakeBinaryDrop: Fix lib names

commit c528a56d4a
Author: Manik Jindal <manikj@microsoft.com>
Date:   Wed Jan 31 12:35:40 2018 -0800

    Update README.md

commit 490a58e4a9
Author: Manik Jindal <manikj@microsoft.com>
Date:   Wed Jan 31 12:08:57 2018 -0800

    Add Halide to Release notes

commit 2196299a71
Author: Manik Jindal <manikj@microsoft.com>
Date:   Wed Jan 31 11:48:45 2018 -0800

    MakeBinaryDrop: Change Cuda libs to 9.0

commit 3df48ddd3a
Author: Manik Jindal <manikj@microsoft.com>
Date:   Wed Jan 31 06:06:29 2018 -0800

    Add release notes

commit 1afe404611
Author: Manik Jindal <manikj@microsoft.com>
Date:   Wed Jan 31 06:05:05 2018 -0800

    Replace 2.4+ with 2.4

commit 1f15d46496
Author: Manik Jindal <manikj@microsoft.com>
Date:   Wed Jan 31 06:04:24 2018 -0800

    Bump version to 2.4
2018-01-31 21:38:52 -08:00
marhamil723 6e846aa1c9 fix makefile 2018-01-29 15:44:29 -05:00
marhamil723 6db8b6eb31 Add image writer SOs and zlib dlls 2018-01-29 10:58:34 -05:00
marhamil723 08cc45c121 Edit makefile 2018-01-29 10:56:46 -05:00
Project Philly 950ac47a0b Integrate jaliyaek/config into master 2018-01-28 12:25:33 +00:00
jaliyaek dd47e2193d Making Halide default in Jenkin builds 2018-01-26 17:17:58 -08:00
Manik Jindal 343f38350a Remove Python 3.4 support 2018-01-26 14:55:22 -08:00
jaliyaek a7a52d7402 Adding halide based binary convolution operators and its dependancies 2018-01-24 16:41:17 -08:00
KeDengMS 3cf3af5df6 CNTK support for CUDA 9
CNTK now supports CUDA 9/cuDNN 7. This requires an update to build environment to Ubuntu 16/GCC 5 for Linux, and Visual Studio 2017/VCTools 14.11 for Windows. With CUDA 9, CNTK also added a preview for 16-bit floating point (a.k.a FP16) computation.

Please check out the example of FP16 in ResNet50 at /Examples/Image/Classification/ResNet/Python/TrainResNet_ImageNet_Distributed.py

Notes on FP16 preview:
* FP16 implementation on CPU is not optimized, and it's not supposed to be used in CPU inference directly. User needs to convert the model to 32-bit floating point before running on CPU.
* Loss/Criterion for FP16 training needs to be 32bit for accumulation without overflow, using cast function. Please check the example above.
* Readers do not have FP16 output unless using numpy to feed data, cast from FP32 to FP16 is needed. Please check the example above.
* FP16 gradient aggregation is currently only implemented on GPU using NCCL2. Distributed training with FP16 with MPI is not supported.
* FP16 math is a subset of current FP32 implementation. Some model may get Feature Not Implemented exception using FP16.
* FP16 is currently not supported in BrainScript. Please use Python for FP16.

To setup build and runtime environment on Windows:
* Install [Visual Studio 2017](https://www.visualstudio.com/downloads/) with following workloads and components. From command line (use Community version installer as example):
    vs_community.exe --add Microsoft.VisualStudio.Workload.NativeDesktop --add Microsoft.VisualStudio.Workload.ManagedDesktop --add Microsoft.VisualStudio.Workload.Universal --add Microsoft.Component.PythonTools --add Microsoft.VisualStudio.Component.VC.Tools.14.11
* Install [NVidia CUDA 9](https://developer.nvidia.com/cuda-90-download-archive?target_os=Windows&target_arch=x86_64)
* From PowerShell, run:
    /Tools/devInstall/Windows/DevInstall.ps1
* Start VCTools 14.11 command line, run:
    cmd /k "%VS2017INSTALLDIR%\VC\Auxiliary\Build\vcvarsall.bat" x64 --vcvars_ver=14.11
* Open /CNTK.sln from the VCTools 14.11 command line. Note that starting CNTK.sln other than VCTools 14.11 command line, would causes CUDA 9 [build error](https://developercommunity.visualstudio.com/content/problem/163758/vs-2017-155-doesnt-support-cuda-9.html).

To setup build and runtime environment on Linux using docker, please build Unbuntu 16.04 docker image using Dockerfiles /Tools/docker. For other Linux systems, please refer to the Dockerfiles to setup dependent libraries for CNTK.
2018-01-22 16:58:56 -08:00
Vadim Mazalov 13206a413b Add lattice index builder to makefile 2018-01-12 10:59:39 -08:00
Vadim Mazalov 2758a8c15d Lattice reader, cont 2018-01-12 10:51:49 -08:00
Lee Namgoo 959f1c8c04 Fixes #2704 (#2805) 2018-01-12 00:34:03 -08:00
Manik Jindal 95d88730b2 Bump version to 2.3.1 and update release notes.
commit b906b2e94748f0303f4e4f41e860d882ab434a57
Author: Manik Jindal <manikj@microsoft.com>
Date:   Tue Dec 5 18:35:02 2017 -0800

    Add whl and NuGet package links in README.md

commit 5f4ff237c5ee3a449577ec29cbf93d64273c562a
Author: Manik Jindal <manikj@microsoft.com>
Date:   Tue Dec 5 09:48:37 2017 -0800

    Bump version 2.3 to 2.3.1

commit 1d0f37072524ad1a6de36bedf43359e0596c7382
Author: Manik Jindal <manikj@microsoft.com>
Date:   Tue Dec 5 00:26:26 2017 -0800

    Add release notes

commit 78b941b3e4e8c345bd6e8e45b6180ff624756d27
Author: Manik Jindal <manikj@microsoft.com>
Date:   Tue Dec 5 00:19:23 2017 -0800

    Bump version from 2.3 to 2.3.1
2017-12-05 21:15:50 -08:00
liqfu 744871f52e integrate with LotusRT 2017-11-29 17:51:27 -08:00
Jacob DeWitt 07fcce92f8 First version of C API for evaluation, taking over Jacob's branch. 2017-11-29 16:16:38 +01:00
Manik Jindal 7579742935 Bump version from 2.2 to 2.3 2017-11-22 19:37:04 -08:00
Manik Jindal e4b8e85ef3 Remove OpenCV dependency from CNTK core
commit aecc380d21e04e803d683e25af2aac42c1a90125
Author: Manik Jindal <manikj@microsoft.com>
Date:   Thu Nov 16 15:03:13 2017 -0800

    Remove OpenCV dependency from CNTK core

    Tensorboard's Image feature has a hard dependency on OpenCV and
    Tensorboard is a part of CNTK core. Removing this hard dependency
    by creating a new DLL ImageWriter just to write an image an PNG.
2017-11-16 18:11:33 -08:00
liqfu 578c1898a0 Integrating LotusIR and a few CNTK-ONNX fixes 2017-11-15 21:44:46 -08:00
KeDengMS fbe030b0dc Switch from CNTKCustomMKL to Intel MKLML. MKLML is released with [Intel MKL-DNN](https://github.com/01org/mkl-dnn/releases) as a trimmed version of Intel MKL for MKL-DNN. To set it up:
On Linux:

    sudo mkdir /usr/local/mklml
    sudo wget https://github.com/01org/mkl-dnn/releases/download/v0.11/mklml_lnx_2018.0.1.20171007.tgz
    sudo tar -xzf mklml_lnx_2018.0.1.20171007.tgz -C /usr/local/mklml

On Windows:

    Create a directory on your machine to hold MKLML, e.g. mkdir c:\local\mklml
    Download the file [mklml_win_2018.0.1.20171007.zip](https://github.com/01org/mkl-dnn/releases/download/v0.11/mklml_win_2018.0.1.20171007.zip).
    Unzip it into your MKLML path, creating a versioned sub directory within.
    Set the environment variable `MKLML_PATH` to the versioned sub directory, e.g. setx MKLML_PATH c:\local\mklml\mklml_win_2018.0.1.20171007

This change also enables CPU convolution forward/backward using MKL, which leads to ~4x speedup in AlexNet training.
2017-11-10 11:48:16 -08:00
Ratan Rai Sur 1280bdeb7a make java so variable names in makefile less confusing 2017-10-13 10:55:08 -04:00
Ratan Rai Sur 78ee54d1e9 use correct mkl lib path for jar 2017-10-13 10:55:07 -04:00
marhamil723 0d1834f103 add DLL's and so's to jar (squashed)
minor fixes

fixing Native utils path, loader, and the Native Load Utils

remove path and classpath setting in tests

cleaning up native utils

Unified CNTKNativeUtils class. Changed the code generation to use CNTKNativeUtils directly instead of the intermediary CNTK.init().

adding fixes to post bild

Added NATIVE_LOAD_MANIFEST for the cases when only specific high-level libraries should be loaded

linux side

Add gpu support

linux gpu .so copying
2017-10-13 10:55:07 -04:00