"example/01_gemm/common.hpp" did not exist on "2327f1a640c267743f119e59d759bc62a7887eae"
mlir.cpp 665 Bytes
Newer Older
Paul's avatar
Paul committed
1
2
3
4
5
6
7
8
9
#include <migraphx/mlir.hpp>
#include <migraphx/module.hpp>
#include <migraphx/make_op.hpp>
#include <migraphx/ranges.hpp>
#include <test.hpp>

TEST_CASE(conv)
{
    migraphx::module m;
Paul's avatar
Paul committed
10
11
    auto x = m.add_parameter("x", {migraphx::shape::float_type, {1, 8, 4, 4}});
    auto w = m.add_parameter("w", {migraphx::shape::float_type, {2, 8, 3, 3}});
Paul's avatar
Paul committed
12
13
14
15
16
17
18
19
    m.add_instruction(migraphx::make_op("convolution"), x, w);
    auto s = migraphx::dump_mlir(m);
    std::cout << s << std::endl;
    EXPECT(migraphx::contains(s, "migraphx.convolution"));
    EXPECT(not migraphx::contains(s, "migraphx.@param"));
}

int main(int argc, const char* argv[]) { test::run(argc, argv); }