Repository navigation
Replies: 14 comments 10 replies
|
ansel-test-20261001-094742.tar.gz |
|
ansel-test-20260930-201302.tar.gz |
|
ansel-test-20261001-073948.tar.gz |
|
Test very quickly. |
|
Here's the new results. Took around a minute, the first one was very quick which made me a bit suspicious. |
|
ansel-test-20261001-152131.tar.gz |
|
ansel-test-20261001-193416.tar.gz |
|
ansel-test-20261002-110301.tar.gz On my Linux Mint located on an external drive (USB-c, SATA adaptor), ThinkPad Xtrem1 gen2, 32 Go ram, nvidia 1650-GTX MaxQ I had Waterfox opened in parallel, so that I could read the user manual. Enjoy! |
|
Here is my file (run with testers-linux.zip found in comments). |
|
result with my pc ,thank you. |
|
Ma contribution |
|
Thank you to everyone who ran the test. In short: on eight machines with a dedicated card, seven NVIDIA and one AMD, the branch breaks nothing. All kernels are accepted, the graphics card's results match the processor's, the pipeline runs on the GPU wherever the card has the memory for it, and the export is 1.4 to 3.7 times faster than on the processor alone. On a seventh machine, with an integrated AMD chip, the kernels work as well, but OpenCL brings no speed there, and the test uncovered a crash that has since been fixed. Why this test was neededThe branch reworks the seventeen OpenCL kernels of the "harmonic transposition" mode of highlight reconstruction, so that they no longer require double precision from drivers that lack it. On macOS that was the whole point. On GNU/Linux the question was the opposite: do the changes harm machines that already worked? Two things could go wrong:
What was testedEach machine exported the same photo five times with The photo is a 24-megapixel Sony raw, exported at 2048 px, with highlight reconstruction in "harmonic transposition" mode, profiled denoise, lens correction, two instances of diffuse or sharpen, and the contrast equalizer. Testers used an AppImage built from the branch. I used a native build on my own laptop, then the same AppImage. The machines
The last one is my own machine. On all nine: no kernel refused, no program failing to compile, no failed memory allocation, and every export produced its image. How to read the numbersThe figures below are written in scientific notation: 3.1e-12 is 3.1 × 10⁻¹², i.e. 0.0000000000031. The more negative the exponent, the smaller the difference. Some landmarks, all on the 0-to-1 scale Ansel uses for a pixel:
Two different kinds of numbers appear, and they do not measure the same thing. The built-in checks ("Do the GPU results match the processor's?") do not look at the photo. Ansel builds a small synthetic problem, solves it once on the graphics card and once on the processor, and reports the largest difference between the two answers. For the sparse solver that difference is relative (|GPU − CPU| / |CPU|, no unit): 3.1e-12 means the two agree to about eleven significant digits. For the three image stages it is an absolute difference between two 509 × 371 synthetic images whose values lie between 0 and 1: 2.4e-07 is the grain of the 32-bit float the pixels are stored in, so the two cannot agree any better. Nothing here depends on an output encoding: everything is compared as floating-point values, before any conversion to 8 or 16 bits. The export comparisons ("Are two identical exports identical?") compare two exports of the real photo, pixel by pixel. The exports are PFM files, 32-bit floating point without loss, so no 8- or 16-bit rounding hides a difference. "max |d| 2e-4" means the most different pixel differs by 0.0002 on the 0-to-1 scale, about a twentieth of an 8-bit step: measurable, not visible. The percentage next to it counts pixels that are not strictly identical, however small the difference; most of them differ by far less than the maximum. Do the GPU results match the processor's?Yes, on both paths.
The seven NVIDIA cards return the same figures, to the last digit. The AMD card, with its own driver, lands in the same range. For scale, one step of an 8-bit image is 3.9e-03, and one step of a 16-bit image is 1.5e-05. These differences are far below anything an export can show. The first line is the solver that needs double precision. True double precision is about a hundred times closer to the processor than the emulation, as expected, and the emulation itself still agrees to about ten significant digits. The three other lines go through the kernels that were rewritten for every machine, and they land in the same range everywhere. Speed with a dedicated cardTime for the whole pipeline, same export, same machine:
"Processor time" is the total work done by all cores. On the six cards with 6 GB or more, the whole pipeline ran on the graphics card, without tiling, using 3.9 GB of graphics memory at its peak. Highlight reconstruction itself takes about 1 second on the three faster cards, against 2.3 seconds on the processor. The two 4 GB cards show what happens when a module does not fit. Profiled denoise asks for 3.5 GB and 3.2 GB were free on both. On the GTX 1650, Ansel sent that one module to the processor and kept the rest on the card, which is why its processor time stays high; on the T600 it ran the module on the card in two tiles instead. I do not know what decided between the two, and the export is correct either way. Both are still faster than without OpenCL, by 1.4x and 2.6x. The RTX 3060 laptop ran on battery, so its timings are lower than they would be on mains power. It is also the only machine where highlight reconstruction alone was slightly slower on the graphics card (4.1 s against 3.7 s). The integrated AMD chip: correct, but no fasterMy own laptop tells a different story, and it explains why I asked for dedicated cards. The driver under-reports its memory. The Radeon 780M has no memory of its own and shares the machine's RAM, but Mesa 25.2 tells OpenCL that it is a dedicated card with only the amount reserved in the BIOS ("UMA frame buffer size"), 1 GB here. Ansel therefore gives it a budget of about 0.8 GB, and highlight reconstruction, demosaicing, profiled denoise and lens correction all go back to the processor. Mesa fixed this in version 26.1. With more memory it is slower, not faster. Raising the BIOS setting to 4 GB or 8 GB puts the whole pipeline on the integrated GPU, and the export then takes about 13 seconds instead of 4. Highlight reconstruction alone goes from 2 seconds on the processor to 10 on the GPU.
The rewritten kernels are not the cause: they account for 0.03 seconds. Most of the time goes to one iterative kernel that the branch does not touch, and to the processor waiting for the GPU between steps. That same kernel takes 2.5 seconds on the Radeon 780M and 0.03 to 0.06 seconds on the NVIDIA cards. So the slowness belongs to that integrated chip and its driver, not to the module. If you have a similar laptop: leave the BIOS setting alone. OpenCL on such a chip frees the processor but does not shorten the export. A crash found and fixedOn the Radeon 780M, the export that runs the built-in checks aborted every time, with the driver message "amdgpu: the context is lost". The cause was an older defect in the dome stage: when a certain setting is zero, one kernel was handed an empty buffer and read from it anyway. What happens then depends on the driver. Apple's returns zero, which happens to be the right value; Mesa's loses the graphics context. The defect predates the branch, but the branch made it reachable on drivers without double precision, where that stage used to be skipped. It is fixed in the branch, and the AppImage the testers used includes the fix. Are two identical exports identical?Not on the NVIDIA machines. On each of the seven, the four OpenCL exports produced four different files. On the AMD RX 6600, two of the three plain OpenCL exports were identical and the third differed. The Radeon 780M behaves the same way. It is not random noise: two of those files turn up, bit for bit, on two different machines (the RTX 3070 and the GTX 1660 Ti), and one of them came back on the GTX 1660 Ti three days later, in a second run of the test. The exports land on one of a small set of results. The test only records a fingerprint of each image, so I cannot say from these logs how far apart the results are. On the one machine where I measured it, an Apple M1, the differences were a few millionths, far below visibility. I also do not know whether Limits of this test
A note on the AppImageThe AppImage cannot start Thanks again to the testers. |
|
Thank you for this exhaustive work. I’m not entirely clear on whether all of this will benefit only the AppImage or also the branch that the rest of us compile. In any case, the analysis is greatly appreciated; it will surely help the developers improve a great program. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hi all,
This discussion is related to this other about looking for MacOS users.
I am working on a branch of Ansel that reworks part of its OpenCL (GPU) code, and I need people running GNU/Linux with a dedicated graphics card (NVIDIA, AMD or Intel Arc) to check how it behaves on their hardware. The test is one script to run in a terminal. It takes a few minutes once Ansel is built.
An AppImage of the branch is provided, so there is nothing to build or install. If you prefer to build from source, the commands are given below as well.
Why this test
The highlight reconstruction module has a mode called "harmonic transposition". Seventeen of its GPU functions (OpenCL kernels) computed in double precision. Some OpenCL drivers do not support double precision: Apple's, and Mesa's rusticl on at least some AMD chips. On those machines the kernels were refused, and the mode ran on the processor.
The branch changes two things:
So far this has been tested on several machines, and neither has a dedicated graphics card:
That leaves two questions only your hardware can answer.
1. Does anything break where double precision is available? The native double-precision path, the one NVIDIA and most dedicated cards take, has not been run at all since the rewrite.
2. Is OpenCL slower than the processor on a real graphics card too? On the ThinkPad, once the whole pipeline ran on the integrated GPU, the export took about 13 seconds against 4 seconds on the processor alone (16 threads). Highlight reconstruction alone went from 2 seconds to 10. The rewritten kernels are not the cause: they account for 0.03 seconds. The time goes to one iterative kernel (
hl_cfa_jacobi, untouched by the branch) and to the processor waiting for the GPU between steps. I do not know whether that is a weakness of that integrated GPU and its driver, or something a dedicated card shows as well. Your timings will tell.Who I am looking for
clinfolists your card).Several different cards and drivers are more useful than several identical ones, so please answer even if someone with a similar setup already has.
What you would do
Download and unpack the test kit: testers-linux.zip
Download the AppImage of the branch and put it in the kit's folder, next to
test-ansel.sh: Ansel-test.highlights.no-fp64-2-gc042a61535-x86_64.AppImage (252 MB). No GitHub account is needed.Open a terminal in the kit's folder and run:
The first step compiles the OpenCL kernels and can take several minutes. Leave everything alone until "Finished" appears.
Attach the file
ansel-test-<date>.tar.gzthat appears in your home folder to a reply or comment on this discussion.Please plug a laptop into mains power and close heavy applications first. A README in English and in French is included in the kit.
The AppImage uses the OpenCL drivers installed on your system. It was built on Ubuntu 22.04 and needs a distribution at least that recent.
If you would rather build from source
Then, in the kit's folder:
What the test does
It exports the same photo (provided in the kit) five times: three times with OpenCL, once without, and once with built-in checks that compare the graphics card's results against the processor's. For each export it records what Ansel printed, how long each module took, and which modules ran on the graphics card.
clinfo), the name of your user folder, and the largest programs running during the test.What I will look at in your logs
A word of caution
This is a development branch, not a release. Do not open your real library with it; the test itself never does. The AppImage installs nothing, and a source build goes into a folder of its own as shown above.
Thank you in advance. Every report helps, including "it crashed": in that case the text shown in the terminal is what I need, along with the
.tar.gzfile if there is one.All reactions