# GPU - Unified Memory error with NDTensors.cu()

**URL:** <https://itensor.discourse.group/t/gpu-unified-memory-error-with-ndtensors-cu/1802>\
**Category:** ITensor Julia Questions\
**Created:** [June 12, 2024, 10:32pm UTC](https://itensor.discourse.group/t/gpu-unified-memory-error-with-ndtensors-cu/1802 "2024-06-12T22:32:32Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![mtfishman](https://yyz2.discourse-cdn.com/free1/user_avatar/itensor.discourse.group/mtfishman/32/11_2.png) [@mtfishman](https://itensor.discourse.group/u/mtfishman)\
**Post date:** [June 12, 2024, 10:53pm UTC](https://itensor.discourse.group/t/gpu-unified-memory-error-with-ndtensors-cu/1802/3 "2024-06-12T22:53:44Z")

</div>

In the meantime, you could try using `adapt(CuArray{Float64,<:Any,UnifiedMemory}, x)` where `x` is your MPS. `adapt` is defined in the package `Adapt.jl` so you’ll have to install and load that package.

Also note that the latest syntax is `random_mps`, not `randomMPS`, we’ll be deprecating `randomMPS`.

---

_[View the full topic](https://itensor.discourse.group/t/gpu-unified-memory-error-with-ndtensors-cu/1802)._
