title: Allocating GPU memory for cupy arrays
body: <p>I have a tensorflow session running in parallel to this cupy code. I have allocated 8 Gb out of 16 Gb of my total gpu memory to the tensorflow session. What I want now is to allocate 2 Gb from the rest of 7 Gb for executing this cupy code. The actual code is more involved than the example code I provided. In my actual code, cp_arr is a result of a series of array operations. But I want cp_array to be allocated in the specified 2 Gb space of my gpu memory. Remember, freeing the gpu resources by closing out tensorflow session is not an option.</p>
  
  <p>This is the code I am using.</p>
  
  <pre><code>memory = cp.cuda.Memory(2048000000)
  ptr = cp.cuda.MemoryPointer(memory,0)
  cp_arr = cp.ndarray(shape=(30,1080,1920,3),memptr=ptr)
  cp_arr = ** Array operations **
  </code></pre>
  
  <p>In this case, an additional memory of 1.7 GB was allocated when 'cp_arr = ** Array operations **' is being executed. What I want is to make use of the allocated space of 2 GB to hold my cupy array, cp_arr. Thanks in advance.</p>