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

Enum for memory modes #79

Open
timmoon10 opened this issue May 9, 2019 · 1 comment
Open

Enum for memory modes #79

timmoon10 opened this issue May 9, 2019 · 1 comment

Comments

@timmoon10
Copy link
Collaborator

timmoon10 commented May 9, 2019

We currently specify memory modes for the Memory class with an unsigned int:

void SetMode(unsigned int mode);

Things are messy since the same number means different things on different devices (mode 1 means pinned memory on CPU and CUB memory pool on GPU). This was not a good design (mea culpa). Imagine an idyllic future with something like:

Matrix<float,Device::CPU> A;
A.MemoryMode(); // Returns memory_mode_type::default
A.SetMemoryMode(memory_mode_type::pinned_memory);

This would require making simultaneous changes in LBANN.

@ndryden
Copy link
Collaborator

ndryden commented May 9, 2019

I have no substantial comment, other than to say that this should be done. We may want to be even more general, but this seems like a good step.

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

No branches or pull requests

2 participants