1+ // //////////////////////////////////////////////////////////////////////////////
2+ // Copyright (c) 2014-2022, Lawrence Livermore National Security, LLC.
3+ // Produced at the Lawrence Livermore National Laboratory.
4+ // Written by the LBANN Research Team (B. Van Essen, et al.) listed in
5+ // the CONTRIBUTORS file. <[email protected] >6+ //
7+ // LLNL-CODE-697807.
8+ // All rights reserved.
9+ //
10+ // This file is part of LBANN: Livermore Big Artificial Neural Network
11+ // Toolkit. For details, see http://software.llnl.gov/LBANN or
12+ // https://github.com/LLNL/LBANN.
13+ //
14+ // Licensed under the Apache License, Version 2.0 (the "Licensee"); you
15+ // may not use this file except in compliance with the License. You may
16+ // obtain a copy of the License at:
17+ //
18+ // http://www.apache.org/licenses/LICENSE-2.0
19+ //
20+ // Unless required by applicable law or agreed to in writing, software
21+ // distributed under the License is distributed on an "AS IS" BASIS,
22+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
23+ // implied. See the License for the specific language governing
24+ // permissions and limitations under the license.
25+ // //////////////////////////////////////////////////////////////////////////////
26+
27+ #define LBANN_LAYERS_REGULARIZERS_DISTCONV_LAYER_NORM_INSTANTIATE
28+
29+ #include " ../layer_norm_kernel.cuh"
30+ #include " lbann/layers/regularizers/distconv/distonv_layer_norm.hpp"
31+
32+ #ifdef LBANN_HAS_DISTCONV
33+
34+ template <typename Backend, typename DataType>
35+ template <typename Allocator>
36+ void LayerNormalization ::calculate_forward_stats (
37+ const DCTensor<Allocator>& input)
38+ {}
39+
40+ template <typename Backend, typename DataType>
41+ template <typename Allocator>
42+ void LayerNormalization ::apply_normalization (
43+ const DCTensor<Allocator>& input,
44+ const DCTensor<Allocator>& statistics,
45+ DCTensor<Allocator>& output)
46+ {}
47+
48+ template <typename Backend, typename DataType>
49+ template <typename Allocator>
50+ void LayerNormalization ::calculate_backward_stats (
51+ const DCTensor<Allocator>& input,
52+ const DCTensor<Allocator>& output_grad,
53+ const DCTensor<Allocator>& statistics,
54+ DCTensor<Allocator>& statistics_grad)
55+ {}
56+ template <typename Backend, typename DataType>
57+ template <typename Allocator>
58+ void LayerNormalization ::apply_grad (const DCTensor<Allocator>& input,
59+ const DCTensor<Allocator>& output_grad,
60+ const DCTensor<Allocator>& statistics,
61+ const DCTensor<Allocator>& statistics_grad,
62+ DCTensor<Allocator>& input_grad)
63+ {}
64+
65+ #endif // LBANN_HAS_DISTCONV
0 commit comments