Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Force jit tree eval if OOM #2478

Copy link
Copy link
Open
Open
Copy link
@WilliamTambellini

Description

@WilliamTambellini
Issue body actions

I would try to reproduce via a simple main.cpp with direct AF but these few lines make AFCUDA totally leaking at least with AF 3.6.2 (AF_MEM_DEBUG=1, no garbage collecting):

// left and right are just 3d arrays
const unsigned ns = left.dims(2); // usually 20 slices
for (unsigned z = 0; z < ns; ++z) {
  o += af::matmul(left.slice(z), right.slice(z), transposeLeft ? AF_MAT_TRANS : AF_MAT_NONE, transposeRight ? AF_MAT_TRANS : AF_MAT_NONE);
}

when calling getMemInfo() before and after :
BEFORE : AllocBytes=5083372752 AllocBuffers=1391 LockBytes=5083372752 LockBuffers=1391
...
AFTER : AllocBytes=5104344272 AllocBuffers=1411 LockBytes=5104344272 LockBuffers=1411

AF has clearly created 20 buffers for the 20 slices and these will never been freed leading to OOM.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.