forked from pytorch/pytorch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Common.h
46 lines (37 loc) · 1000 Bytes
/
Common.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#pragma once
#include <ATen/ATen.h>
#include <ATen/Config.h>
#if AT_MKLDNN_ENABLED()
#include <ideep/tensor.hpp>
namespace at {
namespace native {
namespace mkldnn {
struct ContextConv final {
ideep::tensor weight_packed_;
std::optional<at::Tensor> at_bias_;
std::vector<int64_t> padding_;
std::vector<int64_t> stride_;
std::vector<int64_t> dilation_;
int64_t groups_;
ideep::attr_t attr_;
ContextConv() = delete;
ContextConv(
ideep::tensor&& weight_packed,
std::optional<at::Tensor> at_bias,
std::vector<int64_t> padding,
std::vector<int64_t> stride,
std::vector<int64_t> dilation,
int64_t groups,
ideep::attr_t attr)
: weight_packed_(std::move(weight_packed)),
at_bias_(std::move(at_bias)),
padding_(padding),
stride_(stride),
dilation_(dilation),
groups_(groups),
attr_(attr) {}
};
} // namespace mkldnn
} // namespace native
} // namespace at
#endif // AT_MKLDNN_ENABLED()