Caffe2 - C++ API
A deep learning, cross platform ML framework
caffe2::ThreadLocalCUDAObjects Class Reference

A struct to host thread-local cuda objects. More...

#include <context_gpu.h>


class CUDAContext

Detailed Description

A struct to host thread-local cuda objects.

In Caffe2, each thread has its own non-default cuda stream as well as related objects such as cublas and curand handles. This is achieved by having the ThreadLocalCUDAObjects wrapper that takes care of allocating and deallocating these objects at the thread scope. This class is solely used inside CUDAContext and should not be used externally.

This class manages the mapping from logical stream ID (int stream_id passed around in Caffe2) and CUDAStream objects. We intend to eventually deprecate the logical stream ID interface, but not for now.

Definition at line 56 of file context_gpu.h.

The documentation for this class was generated from the following file: