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

[WIP] Experiment with mlir return format and pointwise conv #9

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

Joejiong
Copy link
Contributor

@Joejiong Joejiong commented Dec 16, 2021

Experiment with mlir return format and pointwise conv optimization setup

  • pointwise.mlir setup,
  • move assignment constructor,
  • operator<< overloading for printing utility.

problem/issue solved:

  • double free when deal with return format. (solved by adding move assignment ctor).
  • several init problem.
> ./bin/pointwise-conv-2d-nhwc-hwcf-benchmark                           pointwise_benchmark [39d7e0c] modified
2021-12-20T18:42:07+08:00
Running ./bin/pointwise-conv-2d-nhwc-hwcf-benchmark
Run on (52 X 2500 MHz CPU s)
CPU Caches:
  L1 Data 32 KiB (x26)
  L1 Instruction 32 KiB (x26)
  L2 Unified 1024 KiB (x26)
  L3 Unified 36608 KiB (x1)
Load Average: 8.09, 11.43, 12.63
***WARNING*** Library was built as DEBUG. Timings may be affected.
-------------------------------------------------------------------------------------
Benchmark                                           Time             CPU   Iterations
-------------------------------------------------------------------------------------
BM_PointwiseConv2DNhwcHwcf/100                  0.124 ms        0.124 ms         5655
BM_PointwiseConv2DNhwcHwcfReturn/100            0.104 ms        0.104 ms         6728
BM_PointwiseConv2DNhwcHwcfReturnOrigin/100      0.150 ms        0.150 ms         4665
inputMemRef: [ 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 ] of shape: [ 1 4 5 2 ]
filterMemRef: [ 3 3 3 3 3 3 3 3 3 3 3 3 3 3 ] of shape: [ 1 1 2 7 ]
outputMemRef: [ 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 ] of shape: [ 1 4 5 7 ]
inputMemReturn: [ 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 ] of shape: [ 1 4 5 2 ]
filterMemReturn: [ 3 3 3 3 3 3 3 3 3 3 3 3 3 3 ] of shape: [ 1 1 2 7 ]
outputMemReturn: [ 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 ] of shape: [ 1 4 5 7 ]
inputMemReturn: [ 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 ] of shape: [ 1 4 5 2 ]
filterMemReturn: [ 3 3 3 3 3 3 3 3 3 3 3 3 3 3 ] of shape: [ 1 1 2 7 ]
outputMemReturnOrigin: [ 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 ] of shape: [ 1 4 5 7 ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant