For any of TensorWrapper's ctors which take a Buffer, the ctor should make sure that non-empty Buffers are consistent with the shape and allocators provided. This means the Buffer should be reshaped and/or reallocated as needed. If the Buffer is empty, then we assume that shape and allocator are being used as hints for how to eventually fill the Buffer (and nothing needs to be done until the buffer is filled).
For any of TensorWrapper's ctors which take a Buffer, the ctor should make sure that non-empty Buffers are consistent with the shape and allocators provided. This means the Buffer should be reshaped and/or reallocated as needed. If the Buffer is empty, then we assume that shape and allocator are being used as hints for how to eventually fill the Buffer (and nothing needs to be done until the buffer is filled).