Fixes a bug in memory allocation in which dmabuf export only works on GPU 0 in a multi-GPU environment.