I agree with Conrado that should read the manual. My manual specifically says I am free to mix the size of DIMMs in a single channel set.
However my processor states that this is not allowed because it does not support Intel® Flex Memory Access.
Intel® Flex Memory Access facilitates easier upgrades by allowing different memory sizes to be populated and remain in dual-channel mode.
I should note that the Intel page also correctly states that my processor supports 4 memory channels while also saying:
Intel® processors come in four different types: Single Channel, Dual Channel, Triple Channel, and Flex Mode. Maximum supported memory speed may be lower when populating multiple DIMMs per channel on products that support multiple memory channels.
This is confusing because in my case I have four channels, where one DIMM is 32 GiB and the rest are 16 GiB.
The manual for my servers goes on to state that this is allowed with RDIMMs sized up to 32 GiB, but would cause the bus speed to step down one level if that 32 GiB DIMM were any larger. There is additional language about behavior on two populated CPU socket systems like mine.
I think the important thing is to check real world behavior. You should be able to look up the theoretical maximum memory bandwidth, and if not you can calculate this by doing some simple math based on how the CPU talks to memory in your particular system.
You can then run a memory bandwidth test to see if the number is close to the theoretical value.
If this is on a Hypervisor you may want to repeat the experiment in VMs, to see how they are behaving. Obviously the Hypervisor has complex settings, so if you have NUMA node spanning enabled you should make sure the VM is allotted to one node.
Here is an illustration of why reading the manual is so important.

With all this complexity and contradiction, I suggest simply testing real world bandwidth to the advertised max. I suspect you want the test to be simple to get close to the theoretical max; read only or write only, but complex use of the memory would also be interesting to see.
I don't know the best software option, but here is the Ubuntu manage for mbw - Memory BandWidth benchmark (Note the TODO says its only single threaded).
You may want to run the test with multiple thread support. Here is an OSS example: https://github.com/gabaker/TARUC_Bench