Out of memory error on 5070ti
I am on Ubuntu with a 5070ti. It works when using a computer generated pdf converted to a jpg but when taking a picture of the same document (same size) i get a out of memory error. The gpu has 16gb vram and 64gb system memory, cant it just allocate this if it actually needs so much?
C++ Traceback (most recent call last):
0 paddle::pybind::eager_api_cast(_object*, _object*, _object*)
1 cast_ad_func(paddle::Tensor const&, phi::DataType, paddle::optionalpaddle::Tensor*)
2 paddle::experimental::cast(paddle::Tensor const&, phi::DataType, paddle::optionalpaddle::Tensor*)
3 void phi::CastCUDAKernelImpl<phi::dtype::bfloat16, float>(phi::GPUContext const&, phi::DenseTensor const&, phi::DataType, phi::DenseTensor*)
4 float* phi::DeviceContext::Alloc(phi::TensorBase*, unsigned long, bool) const
5 phi::DenseTensor::AllocateFrom(phi::Allocator*, phi::DataType, unsigned long, bool)
6 paddle::memory::allocation::Allocator::Allocate(unsigned long)
7 paddle::memory::allocation::StatAllocator::AllocateImpl(unsigned long)
8 paddle::memory::allocation::Allocator::Allocate(unsigned long)
9 paddle::memory::allocation::Allocator::Allocate(unsigned long)
10 std::string phi::enforce::GetCompleteTraceBackString<std::string >(std::string&&, char const*, int)
11 common::enforce::GetCurrentTraceBackStringabi:cxx11
Error Message Summary:
ResourceExhaustedError:
Out of memory error on GPU 0. Cannot allocate 11.809693GB memory on GPU 0, 9.072144GB memory has been allocated and available memory is only 6.388489GB.
Please check whether there is any other process using GPU 0.
- If yes, please stop them, or start PaddlePaddle on another GPU.
- If no, please decrease the batch size of your model.
(at /paddle/paddle/phi/core/memory/allocation/cuda_allocator.cc:71)
Edit:
The size of the image was too big. Making it smaller fixed the issue.