Choosing a Backend

elsa’s ml module uses highly optimized Deep Learning libaries under the hood. Currently two backends are available:

  1. oneDNN, which is highly optimized for CPU workloads.

  2. cuDNN which is highly optimized for workloads on Nvidia GPUs.

During the construction of a Model a backend can be chosen by specifying a template parameter:

// Construct a model using CuDNN
auto model = ml::Model<real_t, MlBackend::Cudnn>(...);

// Construct a model using oneDNN
auto model = ml::Model<real_t, MlBackend::Dnnl>(...);

The default template parameter of the Model class is MlBackend::Dnnl.