LBANN  0.103.0
LivermoreBigArtificialNeuralNetworkToolkit
layer.hpp File Reference
#include "lbann/base.hpp"
#include "lbann/utils/exception.hpp"
#include "lbann/utils/typename.hpp"
#include <string>
#include <vector>
Include dependency graph for layer.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  lbann::kfac_block_fc_conv< Device >
 
class  lbann::kfac_block_channelwise_fc< Device >
 
class  lbann::kfac_block_bn< Device >
 
class  lbann::kfac_block_gru< Device >
 
struct  lbann::ParallelStrategy
 
class  lbann::Layer
 Neural network tensor operation. More...
 

Namespaces

 lbann_data
 
 lbann
 
 lbann::callback
 

Macros

#define LBANN_DEFINE_LAYER_BUILDER(LAYER_NAME)
 A utility macro for easily defining default-constructed sub-class builders. More...
 
#define LBANN_LAYER_DEFAULT_BUILDER(LAYER_NAME)
 A utility macro for easily defining "default" builders. More...
 
#define LBANN_LAYER_BUILDER_ETI(LAYER_NAME, T, Device)
 A utility macro for easily adding ETI for layer builders. More...
 

Typedefs

using lbann::ViewingWeightsPtr = std::weak_ptr< weights >
 Smart pointer to reference a weights object. More...
 
using lbann::OwningLayerPtr = std::shared_ptr< Layer >
 Smart pointer to manage ownership of a layer object. More...
 
using lbann::ViewingLayerPtr = std::weak_ptr< Layer >
 Smart pointer to reference a layer object. More...
 

Enumerations

enum  lbann::SubGraphCommunication { lbann::PT2PT = 0, lbann::COLL = 10, lbann::COLL_OPT = 2 }
 

Functions

std::ostream & lbann::operator<< (std::ostream &os, const ParallelStrategy &ps)
 
std::ostream & lbann::print_parallel_strategy_header (std::ostream &os)
 

Macro Definition Documentation

◆ LBANN_DEFINE_LAYER_BUILDER

#define LBANN_DEFINE_LAYER_BUILDER (   LAYER_NAME)
Value:
template <typename TensorDataType, data_layout Layout, El::Device Device> \
std::unique_ptr<Layer> build_##LAYER_NAME##_layer_from_pbuf( \
lbann_comm*, \
lbann_data::Layer const&)

A utility macro for easily defining default-constructed sub-class builders.

Definition at line 41 of file layer.hpp.

◆ LBANN_LAYER_BUILDER_ETI

#define LBANN_LAYER_BUILDER_ETI (   LAYER_NAME,
  T,
  Device 
)
Value:
template std::unique_ptr<Layer> \
build_##LAYER_NAME##_layer_from_pbuf<T, \
::lbann::data_layout::DATA_PARALLEL, \
Device>(lbann_comm*, \
lbann_data::Layer const&); \
template std::unique_ptr<Layer> \
build_##LAYER_NAME##_layer_from_pbuf<T, \
::lbann::data_layout::MODEL_PARALLEL, \
Device>(lbann_comm*, \
lbann_data::Layer const&)

A utility macro for easily adding ETI for layer builders.

Note
Must be called inside lbann namespace.

Definition at line 63 of file layer.hpp.

◆ LBANN_LAYER_DEFAULT_BUILDER

#define LBANN_LAYER_DEFAULT_BUILDER (   LAYER_NAME)
Value:
template <typename TensorDataType, data_layout Layout, El::Device Device> \
std::unique_ptr<Layer> build_##LAYER_NAME##_layer_from_pbuf( \
lbann_comm* comm, \
lbann_data::Layer const&) \
{ \
using LayerType = LAYER_NAME##_layer<TensorDataType, Layout, Device>; \
return std::make_unique<LayerType>(comm); \
}

A utility macro for easily defining "default" builders.

Note
Must be called inside lbann namespace.

Definition at line 50 of file layer.hpp.