Closed Bug 1600911 Opened 4 years ago Closed 4 years ago

Implement AVX variation of ICCv2 transforms

Categories

(Core :: Graphics: Color Management, enhancement, P3)

Desktop
All
enhancement

Tracking

()

RESOLVED FIXED
mozilla73
Tracking Status
firefox73 --- fixed

People

(Reporter: aosmond, Assigned: aosmond)

Details

Attachments

(1 file)

AVX allows us to do 2 pixels per pass in a 256-bit register, possibly allowing for a speed up. Preliminary results with llvm-mca suggests we need ~1000 cycles per pixel with SSE2, and ~1330 cycles per 2 pixels with AVX, or an average of 665 cycles per pixel.

Priority: -- → P3
Pushed by aosmond@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/5483da347be3
Implement AVX variant of QCMS ICCv2 algorithm. r=jrmuizel

Backed out for bustage on transform-avx.cpp

backout: https://hg.mozilla.org/integration/autoland/rev/c6c16035390700cb2604e259a4445a1ca4788daa

push: https://treeherder.mozilla.org/#/jobs?repo=autoland&group_state=expanded&revision=5483da347be3ded6cfa55fedf8800d25faf38550

failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=281109725&repo=autoland&lineNumber=30147

[task 2019-12-13T19:36:26.486Z] 19:36:26 INFO - make[4]: Entering directory '/builds/worker/workspace/build/src/obj-firefox/gfx/qcms'
[task 2019-12-13T19:36:26.487Z] 19:36:26 INFO - /builds/worker/fetches/sccache/sccache /builds/worker/fetches/gcc/bin/g++ -std=gnu++17 -o transform-avx.o -c -I/builds/worker/workspace/build/src/obj-firefox/dist/stl_wrappers -I/builds/worker/workspace/build/src/obj-firefox/dist/system_wrappers -include /builds/worker/workspace/build/src/config/gcc_hidden.h -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-strong -DDEBUG=1 -DSTATIC_EXPORTABLE_JS_API -DMOZ_HAS_MOZGLUE -DMOZILLA_INTERNAL_API -DIMPL_LIBXUL -I/builds/worker/workspace/build/src/gfx/qcms -I/builds/worker/workspace/build/src/obj-firefox/gfx/qcms -I/builds/worker/workspace/build/src/obj-firefox/dist/include -I/builds/worker/workspace/build/src/obj-firefox/dist/include/nspr -I/builds/worker/workspace/build/src/obj-firefox/dist/include/nss -fPIC -DMOZILLA_CLIENT -include /builds/worker/workspace/build/src/obj-firefox/mozilla-config.h -Wall -Wempty-body -Wignored-qualifiers -Woverloaded-virtual -Wpointer-arith -Wsign-compare -Wtype-limits -Wunreachable-code -Wwrite-strings -Wno-invalid-offsetof -Wduplicated-cond -Wimplicit-fallthrough -Wno-error=maybe-uninitialized -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-error=coverage-mismatch -Wno-error=free-nonheap-object -Wformat -Wformat-overflow=2 -D_GLIBCXX_USE_CXX11_ABI=0 -fno-sized-deallocation -fno-aligned-new -fno-exceptions -fno-strict-aliasing -fno-rtti -ffunction-sections -fdata-sections -fno-exceptions -fno-math-errno -pthread -pipe -g -freorder-blocks -Os -fno-omit-frame-pointer -funwind-tables -Werror -MD -MP -MF .deps/transform-avx.o.pp -mavx /builds/worker/workspace/build/src/gfx/qcms/transform-avx.cpp
[task 2019-12-13T19:36:26.487Z] 19:36:26 INFO - /builds/worker/workspace/build/src/gfx/qcms/transform-avx.cpp: In function 'void qcms_transform_data_template_lut_avx(const qcms_transform*, const unsigned char*, unsigned char*, size_t)':
[task 2019-12-13T19:36:26.487Z] 19:36:26 ERROR - /builds/worker/workspace/build/src/gfx/qcms/transform-avx.cpp:62:17: error: there are no arguments to '_mm256_set_m128' that depend on a template parameter, so a declaration of '_mm256_set_m128' must be available [-fpermissive]
[task 2019-12-13T19:36:26.487Z] 19:36:26 INFO - vec_r = _mm256_set_m128(vec_r1, vec_r0);
[task 2019-12-13T19:36:26.488Z] 19:36:26 INFO - ^~~~~~~~~~~~~~~
[task 2019-12-13T19:36:26.488Z] 19:36:26 INFO - /builds/worker/workspace/build/src/gfx/qcms/transform-avx.cpp:62:17: note: (if you use '-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated)
[task 2019-12-13T19:36:26.488Z] 19:36:26 ERROR - /builds/worker/workspace/build/src/gfx/qcms/transform-avx.cpp:63:17: error: there are no arguments to '_mm256_set_m128' that depend on a template parameter, so a declaration of '_mm256_set_m128' must be available [-fpermissive]
[task 2019-12-13T19:36:26.488Z] 19:36:26 INFO - vec_g = _mm256_set_m128(vec_g1, vec_g0);
[task 2019-12-13T19:36:26.488Z] 19:36:26 INFO - ^~~~~~~~~~~~~~~
[task 2019-12-13T19:36:26.488Z] 19:36:26 ERROR - /builds/worker/workspace/build/src/gfx/qcms/transform-avx.cpp:64:17: error: there are no arguments to '_mm256_set_m128' that depend on a template parameter, so a declaration of '_mm256_set_m128' must be available [-fpermissive]
[task 2019-12-13T19:36:26.488Z] 19:36:26 INFO - vec_b = _mm256_set_m128(vec_b1, vec_b0);
[task 2019-12-13T19:36:26.488Z] 19:36:26 INFO - ^~~~~~~~~~~~~~~
[task 2019-12-13T19:36:26.488Z] 19:36:26 ERROR - /builds/worker/workspace/build/src/gfx/qcms/transform-avx.cpp:107:17: error: there are no arguments to '_mm256_set_m128' that depend on a template parameter, so a declaration of '_mm256_set_m128' must be available [-fpermissive]
[task 2019-12-13T19:36:26.489Z] 19:36:26 INFO - vec_r = _mm256_set_m128(vec_r1, vec_r0);
[task 2019-12-13T19:36:26.489Z] 19:36:26 INFO - ^~~~~~~~~~~~~~~
[task 2019-12-13T19:36:26.489Z] 19:36:26 ERROR - /builds/worker/workspace/build/src/gfx/qcms/transform-avx.cpp:108:17: error: there are no arguments to '_mm256_set_m128' that depend on a template parameter, so a declaration of '_mm256_set_m128' must be available [-fpermissive]
[task 2019-12-13T19:36:26.490Z] 19:36:26 INFO - vec_g = _mm256_set_m128(vec_g1, vec_g0);
[task 2019-12-13T19:36:26.490Z] 19:36:26 INFO - ^~~~~~~~~~~~~~~

Flags: needinfo?(aosmond)
Flags: needinfo?(aosmond)
Pushed by aosmond@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/1f80ac05004e
Implement AVX variant of QCMS ICCv2 algorithm. r=jrmuizel
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla73
You need to log in before you can comment on or make changes to this bug.