ARM-software / astc-encoder

The Arm ASTC Encoder, a compressor for the Adaptive Scalable Texture Compression data format.
https://developer.arm.com/graphics
Apache License 2.0
1.08k stars 241 forks source link

bad performance on mac mini apple m2 #501

Closed miyu-xu closed 2 months ago

miyu-xu commented 2 months ago

git tag: 3.7 machine: Mac mini Apple M2 The C compiler identification is AppleClang 13.1.6.13160021 The CXX compiler identification is AppleClang 13.1.6.13160021

desc: From my test results, the performance is very poor. I don't know if it is my configuration error or that's the way it is. Please kindly help to take a look!

$ cmake -B build -DISA_NATIVE=ON

-- AVX2 backend - OFF -- SSE4.1 backend - OFF -- SSE2 backend - OFF -- NEON backend - OFF -- NONE backend - OFF -- NATIVE backend - ON -- Universal bin - OFF -- Decompressor - OFF -- No invariance - OFF -- Diagnostics - OFF -- ASAN - OFF -- Unit tests - OFF

$ python3 ./Test/astc_test_image.py --encoder native --repeats 5 Test Set: Small / Encoder: astcenc-native-main -thorough

[ 1] 4x4 hdr-rgb-00.hdr | 34.379 dB ( 0.000 dB) | 4.306 s (0.03x) | 4.082 s (0.01x) | 0.016 MT/s | PASS [ 2] 4x4 ldr-rgb-00.png | 39.102 dB ( 0.000 dB) | 4.581 s (0.01x) | 4.554 s (0.01x) | 0.014 MT/s | PASS

$ cmake -B build -DISA_NEON=ON

-- AVX2 backend - OFF -- SSE4.1 backend - OFF -- SSE2 backend - OFF -- NEON backend - ON -- NONE backend - OFF -- NATIVE backend - OFF -- Universal bin - OFF -- Decompressor - OFF -- No invariance - OFF -- Diagnostics - OFF -- ASAN - OFF -- Unit tests - OFF

$ python3 ./Test/astc_test_image.py --encoder neon --repeats 5 Test Set: Small / Encoder: astcenc-neon-main -thorough

[ 1] 4x4 hdr-rgb-00.hdr | 34.379 dB ( 0.000 dB) | 4.296 s (0.03x) | 4.071 s (0.01x) | 0.016 MT/s | PASS [ 2] 4x4 ldr-rgb-00.png | 39.102 dB ( 0.000 dB) | 4.592 s (0.01x) | 4.565 s (0.01x) | 0.014 MT/s | PASS

$ cmake -B build -DISA_NONE=ON

-- AVX2 backend - OFF -- SSE4.1 backend - OFF -- SSE2 backend - OFF -- NEON backend - OFF -- NONE backend - ON -- NATIVE backend - OFF -- Universal bin - OFF -- Decompressor - OFF -- No invariance - OFF -- Diagnostics - OFF -- ASAN - OFF -- Unit tests - OFF

$ python3 ./Test/astc_test_image.py --encoder none --repeats 5 Test Set: Small / Encoder: astcenc-none-main -thorough

[ 1] 4x4 hdr-rgb-00.hdr | 34.379 dB ( 0.000 dB) | 4.522 s (0.03x) | 4.285 s (0.01x) | 0.015 MT/s | PASS [ 2] 4x4 ldr-rgb-00.png | 39.102 dB ( 0.000 dB) | 4.833 s (0.01x) | 4.806 s (0.01x) | 0.014 MT/s | PASS

$ cmake -B build -DISA_SSE2=ON

-- AVX2 backend - OFF -- SSE4.1 backend - OFF -- SSE2 backend - ON -- NEON backend - OFF -- NONE backend - OFF -- NATIVE backend - OFF -- Universal bin - OFF -- Decompressor - OFF -- No invariance - OFF -- Diagnostics - OFF -- ASAN - OFF -- Unit tests - OFF

$ python3 ./Test/astc_test_image.py --encoder sse2 --repeats 5 Test Set: Small / Encoder: astcenc-sse2-main -thorough

[ 1] 4x4 hdr-rgb-00.hdr | 34.379 dB ( 0.000 dB) | 4.597 s (0.03x) | 4.295 s (0.01x) | 0.015 MT/s | PASS [ 2] 4x4 ldr-rgb-00.png | 39.102 dB ( 0.000 dB) | 4.837 s (0.01x) | 4.803 s (0.01x) | 0.014 MT/s | PASS

solidpixel commented 2 months ago

git tag: 3.7

Is there a reason you're using 3.7? It's a couple of years old now, and we've fixed a few bugs and made performance and quality improvements since then? I'd suggest switching to the latest 4.7 series release.

At a guess, based on the performance scores, you've ended up with a debug build not a release build. The build type should be printed at the end of the build log.

miyu-xu commented 2 months ago

Thank you for your reply. I was wrong and will close this issue.