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

Add CNMeM support using global MemoryHandler #12

Merged
merged 3 commits into from
Jul 24, 2015

Conversation

slayton58
Copy link

This is a different approach to adding a memory pool than my last PR -- this moves the pool management to a global singleton, independent of Caffe's singleton, to avoid any unintended side-effects of the thread-local storage used in the multi-gpu code.

Destruction of the memory pool's resources is now handled safely using an activator object (MemoryHandlerActivator) that initializes the pool on construction and finalizes it safely on destruction.

@lukeyeager
Copy link
Member

This doesn't update the CMake build. Do we want to abandon that on our fork? I'd rather not.

Plus, I think we could pull in CNMeM from GitHub through CMake automatically. That would be neat.

@lukeyeager lukeyeager merged commit 38d6baf into NVIDIA:caffe-0.13 Jul 24, 2015
@lukeyeager
Copy link
Member

FYI, I typically use CMake to build Caffe with CNMeM support:

mkdir build && cd build
cmake -DUSE_CNMEM=True -DCNMEM_INCLUDE=/path/to/cnmem/include -DCNMEM_LIBRARY=/path/to/cnmem/build/libcnmem.so ..
make -j4

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

Successfully merging this pull request may close these issues.

3 participants