forked from pytorch/pytorch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ConvPrepack.h
41 lines (31 loc) · 1.03 KB
/
ConvPrepack.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
#pragma once
#include <ATen/Tensor.h>
#include <ATen/native/mkldnn/Common.h>
#include <ATen/native/mkldnn/OpContext.h>
#if AT_MKLDNN_ENABLED()
namespace at::native::mkldnn::internal::convolution {
c10::intrusive_ptr<mkldnn::ConvOpContext> createConvPrePackOpContext(
Tensor weight,
std::optional<Tensor> bias,
std::vector<int64_t> stride,
std::vector<int64_t> padding,
std::vector<int64_t> dilation,
int64_t groups,
std::vector<int64_t> input_size,
std::string attr);
Tensor conv_run(
const Tensor& input,
const c10::intrusive_ptr<mkldnn::ConvOpContext>& op_context);
ContextConv create(
const Tensor& weight,
const std::optional<Tensor>& bias,
const IntArrayRef padding,
const IntArrayRef stride,
const IntArrayRef dilation,
const int64_t groups,
const IntArrayRef input_size,
const ideep::attr_t& attr);
Tensor run(ContextConv& context, const Tensor& input);
void run(ContextConv& context, const Tensor& input, void* output);
} // namespace at
#endif // AT_MKLDNN_ENABLED()