Merge "Fix the bug for AllocationRead() that cannot handle 3d Allocation correctly. Add the following functions to make it symmetric for read and write."