Calculate the allocated size based on the width, height and depth. [ROCm/hip commit: 8d92d1ebd7]
8d92d1ebd7