Skip to content

Commit

Permalink
Fix CPU build and general cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
fiedorowicz1 committed Jun 24, 2024
1 parent a796768 commit 0548765
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
11 changes: 2 additions & 9 deletions include/lbann/layers/transform/upsample.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
#include "lbann/utils/dnn_lib/upsample.hpp"
#endif // LBANN_HAS_DNN_LIB
#include "lbann/utils/exception.hpp"
#include "lbann/utils/im2col.hpp"

#include <utility>
#include <vector>
Expand Down Expand Up @@ -261,18 +260,12 @@ class upsample_layer : public data_type_layer<TensorDataType>
void bp_compute() override;

private:
/// Pooling forward propagation with DNN library
/// Upsample forward propagation with DNN library
void fp_compute_dnn();

/// Pooling backward propagation with DNN library
/// Upsample backward propagation with DNN library
void bp_compute_dnn();

/// Pooling forward propagation with im2col
void fp_compute_im2col();

/// Pooling forward propagation with im2col
void bp_compute_im2col();

#ifdef LBANN_HAS_DISTCONV
friend class upsample_distconv_adapter<TensorDataType, T_layout, Dev>;

Expand Down
6 changes: 4 additions & 2 deletions src/layers/transform/upsample.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ struct Builder
}
};

#ifdef LBANN_HAS_GPU
template <typename TensorDataType>
struct Builder<TensorDataType, data_layout::DATA_PARALLEL, El::Device::GPU>
{
Expand All @@ -72,6 +73,7 @@ struct Builder<TensorDataType, data_layout::DATA_PARALLEL, El::Device::GPU>
return std::make_unique<LayerType>(std::forward<Args>(args)...);
}
};
#endif // LBANN_HAS_GPU
} // namespace

template <typename TensorDataType, data_layout Layout, El::Device Device>
Expand Down Expand Up @@ -110,7 +112,7 @@ void upsample_layer<TensorDataType, Layout, Device>::bp_compute()
}
}

/// Pooling forward propagation with DNN library
/// Upsample forward propagation with DNN library
template <typename TensorDataType, data_layout Layout, El::Device Device>
void upsample_layer<TensorDataType, Layout, Device>::fp_compute_dnn()
{
Expand All @@ -134,7 +136,7 @@ void upsample_layer<TensorDataType, Layout, Device>::fp_compute_dnn()
#endif // #ifndef LBANN_HAS_DNN_LIB
}

/// Pooling backward propagation with DNN library
/// Upsample backward propagation with DNN library
template <typename TensorDataType, data_layout Layout, El::Device Device>
void upsample_layer<TensorDataType, Layout, Device>::bp_compute_dnn()
{
Expand Down

0 comments on commit 0548765

Please sign in to comment.