Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add dot product support for quantized convolution. #6445

Merged
merged 10 commits into from
Oct 6, 2020

Commits on Sep 29, 2020

  1. Add dot product support for quantized convolution.

    We added two new intrinsics in: topi/arm_cpu/tensor_intrin.py, namely
    - mmla4x4: compute a matrix multiplication between tile A(4,4) and tile
      B(4,4)
    - mmla16x4: compute a matrix multiplication between tile A(rows,4) and tile
      B(4,16)
    Then we used those intrinsics in two separate strategies. We added the
    strategies in topi/arm_cpu/conv2d_int8.py and implemented the schedules
    in topi/arm_cpu/conv2d_gemm.py. In particular:
    - schedule_conv2d_gemm, when accelerated, packs matrix A, compute GEMM,
      and unpack the resulting matrix. This uses the mmla4x4 intrinsic
    - schedule_conv2d_gemm_hybrid doesn't do any packing on A and C which
      are in native form.  This uses the mmla16x4 intrinsic
    
    Please note that for the limitations of `tensorize` we need to pad
    matrix A in both cases (when dimensions are not multiple of the tiling
    shape)
    
    Change-Id: Id0d818d84ffc458c6dad7983fd350a0f3d5db395
    Giuseppe Rossini committed Sep 29, 2020
    Configuration menu
    Copy the full SHA
    30fe89b View commit details
    Browse the repository at this point in the history
  2. Add back nhwc_spatial_pack strategy as default

    Change-Id: I8b1826a7ae1d742956296e8d157da19955a4942c
    Giuseppe Rossini committed Sep 29, 2020
    Configuration menu
    Copy the full SHA
    8b69ffd View commit details
    Browse the repository at this point in the history
  3. Fix linting through Black

    Change-Id: Ic74ef5461a90bca9f4d4980a214137e384d5f923
    Giuseppe Rossini committed Sep 29, 2020
    Configuration menu
    Copy the full SHA
    16292e9 View commit details
    Browse the repository at this point in the history
  4. Fix python linting

    Change-Id: I5fb8a2ae4467a87bd3470f6b3753c074f9b7cc78
    Giuseppe Rossini committed Sep 29, 2020
    Configuration menu
    Copy the full SHA
    7c8c867 View commit details
    Browse the repository at this point in the history
  5. Addressing review comments

    Change-Id: I284b1f2c121051e672f548d6c6ee2a3267854e31
    Giuseppe Rossini committed Sep 29, 2020
    Configuration menu
    Copy the full SHA
    8168589 View commit details
    Browse the repository at this point in the history
  6. Fix black linting issues

    Change-Id: I1813b0226b536aedee0dce9eeeba27aa2d95518b
    Giuseppe Rossini committed Sep 29, 2020
    Configuration menu
    Copy the full SHA
    01d827a View commit details
    Browse the repository at this point in the history
  7. Fixing failing test and adding tests for dot-product compilation

    Change-Id: Ic040722abd5538fccb85af4de922394c939e7000
    Giuseppe Rossini committed Sep 29, 2020
    Configuration menu
    Copy the full SHA
    82ce647 View commit details
    Browse the repository at this point in the history
  8. Fixing linting and review comments

    Change-Id: If09e3baa514c85dc78d3c27c2ac2fa2e01773d89
    Giuseppe Rossini committed Sep 29, 2020
    Configuration menu
    Copy the full SHA
    16b9c6e View commit details
    Browse the repository at this point in the history
  9. Fixing black linting and address comments

    Change-Id: I857b28b6f9b23307d8c1eebc509de6ad2783c756
    Giuseppe Rossini committed Sep 29, 2020
    Configuration menu
    Copy the full SHA
    8fd794a View commit details
    Browse the repository at this point in the history

Commits on Oct 2, 2020

  1. Address review comments

    Change-Id: I63d1a639d4a72abeb33148fd2868cd356ef84122
    Giuseppe Rossini committed Oct 2, 2020
    Configuration menu
    Copy the full SHA
    0f8116a View commit details
    Browse the repository at this point in the history