Caffe2 - C++ API
A deep learning, cross platform ML framework
Public Member Functions | Friends
c10::OpKernel Class Referencefinal

This class represents an operator kernel, i.e. More...

#include <Dispatcher.h>

Public Member Functions

 OpKernel (OpKernel &&)=default
OpKerneloperator= (OpKernel &&)=default
 OpKernel (const OpKernel &)=delete
OpKerneloperator= (const OpKernel &)=delete
void call (Stack *stack) const
 Call the operator kernel with the given arguments.


class Dispatcher

Detailed Description

This class represents an operator kernel, i.e.

an operator after it was dispatched to a certain device. You can use it to call the kernel.

You can keep this OpKernel instance around to avoid future dispatch when you know it'd dispatch to the same kernel anyhow.

Also, keeping around the OpKernel instance will keep around a local cache that is used by some kernels to get better performance when they're called multiple times (mostly Caffe2 kernels do that).

OpKernel is only threadsafe if the kernel is threadsafe. There are no mutexes protecting the kernel cache, so if the kernel uses the cache and doesn't have mutexes for it, it will likely not be threadsafe.

Definition at line 27 of file Dispatcher.h.

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