Allocation Vars + ociobakelut + PyOpenColorIO.Baker() wonderings

Hello,
I’m reading up on allocation variables from Authoring Configurations and Baking LUT’s, and I have a few questions (I am baking LUTs from ocio-v1 and ocio-v2.0 configs with both ociobakelut and the python library).

The paged linked second mentions that “If your allocation variables are setup correctly, you can omit the --shaperspace argument, and a prelut will be automatically created based on the allocation vars”. Does this mean that if a shaperspace is defined, the allocation variables will be ignored, or will the allocation variables still have an effect that can interfere with the result? I essentially am trying to bake LUTs with full control.

The first page mentions that the allocation variables are only used for GPU processes, and in the PyOpenColorIO.Baker() and ociobakelut, I don’t see any flags/methods to set GPU vs. CPU. Which processor do they use? I want to know if allocation variables will impact what I am doing, but don’t know if the tools that I am using are even looking at them.

If it is the case that allocation variables are affecting the LUTs that I am baking with the python baker and ociobakelut (using both ocio-v1 and ocio-v2.0 configs), I also want to be able to configure them correctly. Based on reading the first link, I think I understand how to read the allocation variables, for example from the ACES 1.2 config from colour-science allocation: lg2 allocationvars: [-8, 5, 0.00390625] set for the ACEScg colorspace from my understanding means that the range of values that will be “looked at” range from 0 to 2^5 - 0.003...

I do want to know how this is applied, though – say in an example where you are baking with the inputspace set to a colorspace with the allocation variables allocation: uniform allocationvars: [0, 1] (say, sRGB) and the targetspace set to a colorspace with the allocation variables set to allocation: lg2 allocationvars: [-8, 5, 0.00390625] (like ACEScg), how is the prelut defined? I’d imagine it only looks at the allocation for the input space (so in this case I believe the prelut would clamp the values to the 0-1 range without changing any values already in that range because of the uniform sampling?), but is that correct?

Also, from what I have read it seems as though LUTs are used internally for conversions for ocio-v1 profiles, so the allocation variables are very important for them, but from my understanding they are still used for ocio-v2 profiles when baking LUTs. However, the cg aces-v1.3 ocio-v2 configs from Releases · AcademySoftwareFoundation/OpenColorIO-Config-ACES · GitHub have allocation: uniform for ALL spaces defined, and no allocation variables, even for spaces like ACEScg which in the 1.2 config have the lg2 allocation setup. Does this mean using ociobakelut with these configs will produce incorrect results?

Finally, Liam Collod pointed me to his notes from a discussion about this with Troy Sobotka, where the notes say
"It should be noted that allocation variables are the compression range for shaders. We went through a bunch of errors and poor assumptions way back when only to learn that the assumption of the values is often wrong. The proper approach is to calculate your linear tristimulus limits, and then log2 them : So for example, 10 base two units down is 2^-10 But we also scale by the “middle grey” value, so it is 2^-10 * 0.18 Wrapping it all together it is log2(2^-10 * 0.18) "
Is this “middle gray” scaling relevant, and is it something implemented already under the hood or is it something that needs to be accounted for when setting the allocation variables for a colorspace?

Looking forward to learning from the responses, thanks!