ncnn icon indicating copy to clipboard operation
ncnn copied to clipboard

Compiler flag changes and other minor things

Open Artoria2e5 opened this issue 5 years ago • 13 comments

  • CMakeList:
    • Use fast fp on MSVC, just like we do for GNU.
    • Since fast fp does not interfere with debug, enable it always.
    • Set RPI3 flags correctly (not native, but the actual model)
    • Uncomment the enable IPO thing as we can now test for support.
    • Prepare for #pragma omp simd. Our current compiler options does enable auto-vectorization on release, however.
  • mat.h, hedley.h:
    • Mechanism for labelling alignment. We already have MALLOC_ALIGN, but the compiler needs to know for better vectorization.
    • Turns out we cannot label alignment, becuase the rows can break them. Uh-oh.

Artoria2e5 avatar Aug 27 '20 18:08 Artoria2e5

CLA assistant check
All committers have signed the CLA.

tencent-adm avatar Aug 27 '20 18:08 tencent-adm

This pull request fixes 62 alerts when merging 319d6c5d8a8ac09e006363ac282cb1c6dddc590d into a2f7f710810e4c6aa7aea1432acd6107017a394e - view on LGTM.com

fixed alerts:

  • 31 for Multiplication result converted to larger type
  • 10 for Missing header guard
  • 10 for Empty branch of conditional
  • 8 for FIXME comment
  • 2 for Declaration hides parameter
  • 1 for Comparison result is always the same

lgtm-com[bot] avatar Aug 27 '20 18:08 lgtm-com[bot]

This pull request fixes 62 alerts when merging 443ad26815d1667c1646d758a2f31f2f07937fe3 into a2f7f710810e4c6aa7aea1432acd6107017a394e - view on LGTM.com

fixed alerts:

  • 31 for Multiplication result converted to larger type
  • 10 for Missing header guard
  • 10 for Empty branch of conditional
  • 8 for FIXME comment
  • 2 for Declaration hides parameter
  • 1 for Comparison result is always the same

lgtm-com[bot] avatar Aug 27 '20 19:08 lgtm-com[bot]

This pull request fixes 28 alerts when merging 04bf56e180bcebf1bc3e09cf390794d9343eb875 into a2f7f710810e4c6aa7aea1432acd6107017a394e - view on LGTM.com

fixed alerts:

  • 10 for Missing header guard
  • 10 for Multiplication result converted to larger type
  • 7 for FIXME comment
  • 1 for Comparison result is always the same

lgtm-com[bot] avatar Aug 27 '20 22:08 lgtm-com[bot]

This pull request fixes 28 alerts when merging 775a2141a443e1b730ec7098a3e301eb608b0d4c into a2f7f710810e4c6aa7aea1432acd6107017a394e - view on LGTM.com

fixed alerts:

  • 10 for Missing header guard
  • 10 for Multiplication result converted to larger type
  • 7 for FIXME comment
  • 1 for Comparison result is always the same

lgtm-com[bot] avatar Aug 27 '20 22:08 lgtm-com[bot]

This pull request fixes 26 alerts when merging 1ebd46055a44ace43c208db4b2dbf361bd74b398 into a2f7f710810e4c6aa7aea1432acd6107017a394e - view on LGTM.com

fixed alerts:

  • 10 for Missing header guard
  • 10 for Multiplication result converted to larger type
  • 5 for FIXME comment
  • 1 for Comparison result is always the same

lgtm-com[bot] avatar Aug 28 '20 01:08 lgtm-com[bot]

please fix the ci errors

nihui avatar Sep 03 '20 13:09 nihui

Codecov Report

Merging #2048 into master will decrease coverage by 0.35%. The diff coverage is 57.14%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2048      +/-   ##
==========================================
- Coverage   86.17%   85.82%   -0.36%     
==========================================
  Files         508      468      -40     
  Lines       81805    80449    -1356     
==========================================
- Hits        70498    69045    -1453     
- Misses      11307    11404      +97     
Impacted Files Coverage Δ
src/cpu.cpp 24.86% <0.00%> (-1.40%) :arrow_down:
src/mat.h 84.58% <75.00%> (-0.19%) :arrow_down:
src/allocator.h 76.47% <100.00%> (ø)
src/layer/arm/convolution_1x1.h 68.79% <0.00%> (-6.06%) :arrow_down:
src/layer/arm/convolution_3x3.h 56.57% <0.00%> (-4.10%) :arrow_down:
src/layer/arm/convolution_1x1_bf16s.h 96.70% <0.00%> (-2.81%) :arrow_down:
src/layer/arm/eltwise_arm.cpp 91.84% <0.00%> (-2.23%) :arrow_down:
src/layer/arm/requantize_arm.cpp 37.64% <0.00%> (-1.92%) :arrow_down:
src/layer/arm/convolution_1x1_pack4to1_bf16s.h 93.83% <0.00%> (-1.60%) :arrow_down:
src/layer/arm/batchnorm_arm.cpp 98.48% <0.00%> (-1.52%) :arrow_down:
... and 191 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update ea17a46...2afd74a. Read the comment docs.

codecov-commenter avatar Sep 04 '20 01:09 codecov-commenter

This pull request fixes 47 alerts when merging 6ecbf1328611127cd56f95ba4401b1c4eca299cb into 266382a832ffaa9faea3a64f4452920700dd069c - view on LGTM.com

fixed alerts:

  • 29 for Multiplication result converted to larger type
  • 10 for Missing header guard
  • 7 for FIXME comment
  • 1 for Comparison result is always the same

lgtm-com[bot] avatar Sep 04 '20 02:09 lgtm-com[bot]

This pull request introduces 1 alert when merging 432d10c928f70f0239343f341cb1492f23cdf8f4 into 266382a832ffaa9faea3a64f4452920700dd069c - view on LGTM.com

new alerts:

  • 1 for FIXME comment

lgtm-com[bot] avatar Sep 04 '20 03:09 lgtm-com[bot]

This pull request introduces 1 alert when merging aece98aa63e77b4e8c181b918fd1ab69a59d766f into 266382a832ffaa9faea3a64f4452920700dd069c - view on LGTM.com

new alerts:

  • 1 for FIXME comment

lgtm-com[bot] avatar Sep 04 '20 05:09 lgtm-com[bot]

This pull request introduces 1 alert when merging 5eaf0d37ceb77ada1f1562f16b99632c4a564f33 into 266382a832ffaa9faea3a64f4452920700dd069c - view on LGTM.com

new alerts:

  • 1 for FIXME comment

lgtm-com[bot] avatar Sep 04 '20 08:09 lgtm-com[bot]

This pull request introduces 1 alert when merging 2afd74af230ee2504060090615ec47687b0b3081 into 266382a832ffaa9faea3a64f4452920700dd069c - view on LGTM.com

new alerts:

  • 1 for FIXME comment

lgtm-com[bot] avatar Sep 04 '20 11:09 lgtm-com[bot]