quant_conv_padding_stride.cpp 765 Bytes
Newer Older
1
2
3
4

#include "verify_program.hpp"
#include <migraphx/program.hpp>
#include <migraphx/generate.hpp>
5
#include <migraphx/make_op.hpp>
6
7
8
9
10
11

struct quant_conv_padding_stride : verify_program<quant_conv_padding_stride>
{
    migraphx::program create_program() const
    {
        migraphx::program p;
12
        auto* mm = p.get_main_module();
13
        migraphx::shape a_shape{migraphx::shape::int8_type, {2, 3, 4, 4}};
14
        auto pa = mm->add_parameter("a", a_shape);
15
        migraphx::shape c_shape{migraphx::shape::int8_type, {2, 3, 3, 3}};
16
        auto pc = mm->add_parameter("c", c_shape);
17
18
19
20
        mm->add_instruction(
            migraphx::make_op("quant_convolution", {{"padding", {1, 1}}, {"stride", {2, 2}}}),
            pa,
            pc);
21
22
23
24

        return p;
    }
};