"docs/vscode:/vscode.git/clone" did not exist on "dda6a126463b3d560f2525e8daea2f0c7be9f56f"
Commit 86b6fd69 authored by Paul's avatar Paul
Browse files

Add missing load_literal operator

parent 3924f7ee
......@@ -185,6 +185,7 @@ void memory_coloring_impl::build()
void memory_coloring_impl::register_operand_alias()
{
operand_alias["hip::allocate"] = -1;
operand_alias["hip::load_literal"] = -1;
operand_alias["@outline"] = -1;
operand_alias["check_context"] = -1;
operand_alias["@literal"] = -1;
......
#include <migraph/memory_coloring.hpp>
#include <migraph/operators.hpp>
#include <migraph/generate.hpp>
#include <basic_ops.hpp>
#include <test.hpp>
......@@ -112,10 +113,22 @@ void test4()
EXPECT(p.get_parameter_shape("scratch").bytes() == 672);
}
void literal_test()
{
migraph::program p;
auto lit = generate_literal(migraph::shape{migraph::shape::float_type, {4, 3, 3, 3}});
p.add_literal(lit);
p.compile(memory_coloring_target{});
auto result = p.eval({});
EXPECT(lit == result);
}
int main()
{
test1();
test2();
test3();
test4();
literal_test();
}
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