quant_conv_valid_mode.cpp 770 Bytes
Newer Older
1
2
3
4

#include "verify_program.hpp"
#include <migraphx/program.hpp>
#include <migraphx/generate.hpp>
Paul's avatar
Paul committed
5
#include <migraphx/op/quant_convolution.hpp>
6
7
8
9
10
11

struct quant_conv_valid_mode : verify_program<quant_conv_valid_mode>
{
    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
17
        auto pc = mm->add_parameter("c", c_shape);
        mm->add_instruction(
18
19
20
21
22
23
            migraphx::op::quant_convolution{{{0, 0}}, {{1, 1}}, {{1, 1}}, migraphx::op::valid},
            pa,
            pc);
        return p;
    }
};