Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

syncHostDevice doesn't allocate after a deallocateDevice call #243

Open
l90lpa opened this issue Nov 22, 2024 · 0 comments
Open

syncHostDevice doesn't allocate after a deallocateDevice call #243

l90lpa opened this issue Nov 22, 2024 · 0 comments

Comments

@l90lpa
Copy link
Contributor

l90lpa commented Nov 22, 2024

What happened?

I'm opening this issue to understand if the current interaction between syncHostDevice and deallocateDevice is expected.

Currently syncHostDevice only checks device_updated_ to determine if it should call updateDevice (which will allocate if device memory hasn't already been allocated). However, deallocateDevice only updates device_allocated_ leaving device_updated_ unchanged. This means that in circumstances where deallocateDevice is called with the device_updated_==true and then subsequentially syncHostDevice is called, no device memory allocation is performed.

For example:

    array::ArrayT<int> arr(3);
    arr.syncHostDevice();   // sets device_updated_=true
    arr.deallocateDevice(); // changes device_allocated_ but not device_updated_
    arr.syncHostDevice();   // no device allocation performed because device_updated_==true

I'm wonder if deallocateDevice should also set device_updated_=false?

What are the steps to reproduce the bug?

Build Atlas on develop with ENABLE_CUDA or ENABLE_HIP.

Version

develop

Platform (OS and architecture)

linux

Relevant log output

No response

Accompanying data

No response

Organisation

JCSDA

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant