Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

[MXNET-133] Model Quantization with Calibration #9552

Merged
merged 16 commits into from
Mar 26, 2018

Commits on Mar 25, 2018

  1. [Quantization] 8bit Quantization and GPU Support

    [Quantization] CuDNN 8bit quantized relu v0.1
    
    [Quantization] CuDNN 8bit quantized max_pool v0.1
    
    [Quantization] CuDNN 8bit quantized lrn v0.1
    
    [Quantization] CuDNN 8bit quantized convolution v0.1
    
    [Quantization] CuDNN 8bit quantized fully connected v0.1
    
    [Quantization] Small fix
    
    [Quantization] Implement backward method
    
    [Quantization] Convolution backward method
    
    [Quantization] Add range for matmul and conv
    
    [Quantization] New types in ndarray.py
    
    [Quantization] 8bit conv works
    
    [Quantization] conv support multiple type
    
    [Quantization] matmul works now
    
    [Quantization] matmul works well
    
    [Quantization] efactor quantization operators
    
    [Quantization] Op: quantize_down_and_shrink_range
    
    [Quantization] Complete quantize_graph_pass
    
    [Quantization] Add example
    
    [Quantization] Take zero-center quantize, accuracy fixed
    
    [Quantization] Multiple layers MLP pass
    
    [Quantization] Make quantized_conv same as Convolution
    
    [Quantization] quantized_conv works
    
    [Quantization] Fix bug
    
    [Quantization] lenet works now
    
    [Quantization] Add quantized_flatten
    
    [Quantization] Quantized max pool works well
    
    [Quantization] Make quantized_conv support NHWC
    
    [Quantization] add max_pool
    
    [Quantization] add ignore_symbols
    
    [Quantization] Save change
    
    [Quantization] Reorganize tests, 8 layers resnet works on cifar
    
    [Quantization] Support for 'NHWC' max pool
    
    [Quantization] Support for 'NHWC' quantized max pool
    
    [Quantization] Fix speed of quantize_down_and_shrink_range
    
    [Quantization] script for resnet on imagenet
    
    [Quantization] refactor for quantize offline
    
    [Quantization] Fix infershape
    
    [Quantization] Update test
    
    [Quantization] Update example
    
    [Quantization] Fix build error
    ZihengJiang authored and reminisce committed Mar 25, 2018
    Configuration menu
    Copy the full SHA
    432cac0 View commit details
    Browse the repository at this point in the history
  2. [Quantization] Add calibration flow and refactor code

    Rebase with dmlc/master
    
    Add quantize_down_and_shrink by threshold
    
    Don't assign resource when threshold is available for quantize_down_and_shrink
    
    Fix quantize_down_and_shrink saturation
    
    Implement pass for setting calib table to node attrs
    
    Rebase with upstream master
    
    Change threshold to min/max quantized params
    
    Add c-api for setting calib table to graph
    
    Add calibration front end function
    
    Bug fixes and add unit test
    
    Add data iter type to calibration
    
    Fix bug in calibrate_quantized_model
    
    Bug fix and add example
    
    Add the second calibration approach and benchmark
    
    Fix
    
    Fix infer error and add benchmark for conv
    
    Add benchmark script
    
    Change output names and argument names
    
    Remove commented out code
    
    Change name
    
    Add layout to benchmark_convolution
    
    Remove redundant comment
    
    Remove common and add soft link
    
    More fix and benchmark
    
    Add scripts to plot images
    
    Minor fix
    
    More fix
    
    More fix and util tools
    
    Tools and support bias in quantized_conv2d
    
    Add script for getting the optimal thresholds using kl divergence
    
    Add kl divergence for optimizing thresholds
    
    Add benchmark scripts
    
    Fix compile after rebasing on master
    
    Allocate temp space only once for quantized_conv2d
    
    Change quantize_down_and_shrink_range to allocate temp space once
    
    No temp space for calib model
    
    Refactor quantize_down_and_shrink_range into requantize
    
    Refactor quantized convolution using nnvm interfaces
    
    Fix quantized_conv bug
    
    Use ConvolutionParam for QuantizedCuDNNConvOp
    
    Refactor quantized fc using nnvm interfaces
    
    Change TQuantizationNeedShrink to FNeedRequantize
    
    Refactor quantized_pooling
    
    Simplify FQuantizedOp interface
    
    Better naming
    
    Fix shape and type inference for quantized_flatten
    
    Clean up quantization frontend APIs and examples
    
    Delete quantized lrn and relu
    
    Add python script for generating quantized models
    
    Add script for running inference
    
    Add inference example
    
    Remove redundant files from example/quantization
    
    Simplify user-level python APIs
    
    Add logger
    
    Improve user-level python api
    
    Fix coding style
    
    Add unit test for quantized_conv
    
    Fix bugs in quantized_fully_connected and add unit test
    
    Add unit test for requantize
    
    Fix a bug and add python api unit tests
    
    Import test_quantization in test_operator_gpu.py
    
    Rebase with master
    
    Remove redundant files
    
    Fix test case for python3 and fix doc
    
    Fix unit tests
    
    Fix unit tests for python3
    
    Release used ndarrays in calibration for saving memory usage
    
    Simplify releasing memory of used ndarrays for calibration
    
    Fix a bug
    
    Revert "Fix a bug"
    
    This reverts commit f7853f2.
    
    Revert "Simplify releasing memory of used ndarrays for calibration"
    
    This reverts commit 70b9e38.
    
    Clean up benchmark script and improve example
    
    Add API and example documentation and fix bugs
    
    Remove redundant test file and improve error message
    
    Merge quantize and dequantize with master impl
    
    Remove commented code
    
    Hide monitor interface from users
    
    Remove interface from Module
    
    Add license header
    
    Move quantization unittests to a separate folder so that it can be only run on P3 instances
    
    Remove quantization unittests from test_operator_gpu.py
    
    Move quantization to contrib
    
    Fix lint
    
    Add mxnetlinux-gpu-p3 to jenkins
    
    Fix jenkins
    
    Fix CI build
    
    Fix CI
    
    Update jenkins file
    
    Use cudnn7 for ci
    
    Add docker file for quantization unit test only
    
    Correctly skip build with cudnn < 6
    
    Add doc for quantize symbol api
    
    Fix lint
    
    Fix python3 and add doc
    
    Try to fix cudnn build problem
    reminisce committed Mar 25, 2018
    Configuration menu
    Copy the full SHA
    115a07d View commit details
    Browse the repository at this point in the history
  3. Fix compile error

    reminisce committed Mar 25, 2018
    Configuration menu
    Copy the full SHA
    7590312 View commit details
    Browse the repository at this point in the history
  4. Fix CI

    reminisce committed Mar 25, 2018
    Configuration menu
    Copy the full SHA
    790f29c View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    5c593de View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    121e655 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    e100267 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    fa6a419 View commit details
    Browse the repository at this point in the history
  9. Address interface change cr

    reminisce committed Mar 25, 2018
    Configuration menu
    Copy the full SHA
    9f251ae View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    1995b73 View commit details
    Browse the repository at this point in the history
  11. Make unit test stable

    reminisce committed Mar 25, 2018
    Configuration menu
    Copy the full SHA
    4f33f92 View commit details
    Browse the repository at this point in the history
  12. Improve unit test

    reminisce committed Mar 25, 2018
    Configuration menu
    Copy the full SHA
    33964bd View commit details
    Browse the repository at this point in the history
  13. Address cr

    reminisce committed Mar 25, 2018
    Configuration menu
    Copy the full SHA
    d9f2068 View commit details
    Browse the repository at this point in the history
  14. Address cr

    reminisce committed Mar 25, 2018
    Configuration menu
    Copy the full SHA
    0a943c3 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    21512de View commit details
    Browse the repository at this point in the history
  16. Fix doc

    reminisce committed Mar 25, 2018
    Configuration menu
    Copy the full SHA
    7be4936 View commit details
    Browse the repository at this point in the history