batchnorm.hpp 1.16 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#ifndef MIGRAPH_GUARD_RTGLIB_BATCHNORM_HPP
#define MIGRAPH_GUARD_RTGLIB_BATCHNORM_HPP

#include <migraph/gpu/lowering.hpp>
#include <migraph/manage_ptr.hpp>
#include <migraph/instruction.hpp>
#include <migraph/operators.hpp>
#include <migraph/generate.hpp>
#include <migraph/shape_for_each.hpp>
#include <migraph/gpu/miopen.hpp>
#include <migraph/gpu/hip.hpp>
#include <migraph/dfor.hpp>
#include <migraph/gpu/device/contiguous.hpp>
#include <migraph/gpu/device/add.hpp>
#include <migraph/iterator_for.hpp>
#include <migraph/gpu/rocblas.hpp>
#include <migraph/gpu/context.hpp>
18
#include <migraph/config.hpp>
19
20
#include <utility>

21
22
namespace migraph {
inline namespace MIGRAPH_INLINE_NS {
23
24
25
26
namespace gpu {

struct miopen_batch_norm_inference
{
wsttiger's avatar
wsttiger committed
27
    op::batch_norm_inference op;
28
29
30
31
    std::string name() const { return "gpu::batch_norm_inference"; }
    shape compute_shape(const std::vector<shape>& inputs) const;
    argument
    compute(context& ctx, const shape& output_shape, const std::vector<argument>& args) const;
Paul's avatar
Paul committed
32
    int output_alias(const std::vector<shape>& shapes) const { return shapes.size() - 1; }
33
34
35
};

} // namespace gpu
36
} // namespace MIGRAPH_INLINE_NS
37
38
39
} // namespace migraph

#endif