Closed yyy03 closed 6 years ago
Sorry for the delay in answering!
you add the caffe::set function in the common.cpp to make caffe availabed for multithread, so i want to ask does this way make your code go faster? i mean the multithread caffe is better than the normal caffe?
This is to make caffe better for multi-threaded inference only, with the given additional requirement that there are way more threads than we want caffe instances to be created, thus a TLS variable is not what we want. Also see this comment: https://github.com/NVIDIA/gpu-rest-engine/blob/20601093a2da17405311d3f99fe6df95262f0350/caffe/classification.cpp#L248-L254
I notice you when i search the problem about the caffe multithread,i have two questions: 1、you add the caffe::set function in the common.cpp to make caffe availabed for multithread, so i want to ask does this way make your code go faster? i mean the multithread caffe is better than the normal caffe? 2、how about change the 'boost::thread_specific_ptr' to 'std::shared_ptr' to make the caffe multithread.
look forward to you answers,thinks a lot!