"src/include/vscode:/vscode.git/clone" did not exist on "7db934b06831c0698f9ea80914dbbd028e9bce42"
Commit d99f4860 authored by Paul's avatar Paul
Browse files

Add test case

parent 4ec19433
......@@ -398,6 +398,8 @@ struct mlir_program
auto fbody = insert(mbody, m, ins_map);
for(auto ins : iterator_for(m))
{
if (ins->name() == "@param")
continue;
auto name = "migraphx." + ins->name();
auto ops = create_operation_state(name);
ops.add_attribute_value(ins->get_operator().to_value());
......
#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;
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}});
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); }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment