Commit e2cf822d authored by Khalique's avatar Khalique
Browse files

added more documentation and minor fixes

parent 469d0092
......@@ -3,7 +3,6 @@
#include <migraphx/instruction.hpp>
#include <migraphx/operators.hpp>
#include <migraphx/iterator_for.hpp>
#include <migraphx/ranges.hpp>
#include <migraphx/stringutils.hpp>
#include <utility>
......
......@@ -11,7 +11,9 @@ inline namespace MIGRAPHX_INLINE_NS {
struct program;
/**
* Remove identity instructions.
* Remove identity instructions. Currently when used as the last pass, it will
* preserve the semantics of previous program state, therefore dead code elimination
* should not be used afterwards.
*/
struct eliminate_identity
{
......
......@@ -59,7 +59,7 @@ TEST_CASE(simple_test_end_dependency)
p.add_instruction(sum_op{}, ans, three);
p.add_instruction(migraphx::op::identity{}, ans);
p.compile(eliminate_identity_target{});
EXPECT(!std::none_of(p.begin(), p.end(), [](const migraphx::instruction& ins) {
EXPECT(std::any_of(p.begin(), p.end(), [](const migraphx::instruction& ins) {
return ins.name() == "identity";
}));
auto result = p.eval({});
......
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