allocation is separated between CPU and GPU
Former-commit-id: aa527bee03ca2095e6e47706e276b9950a31671f