Commit a4fb3d04 authored by Paul's avatar Paul
Browse files

Formatting

parent cf5baca1
......@@ -73,7 +73,8 @@ struct instruction
{
computed = result;
}
else {
else
{
try
{
computed = compute_shape(op, arguments);
......
......@@ -141,14 +141,17 @@ void program::compile(const target& t)
p.apply(*this);
#ifndef NDEBUG
auto invalid = this->validate();
if(invalid != impl->instructions.end()) {
if(invalid != impl->instructions.end())
{
auto index = std::distance(impl->instructions.begin(), invalid);
MIGRAPH_THROW(p.name() + " pass produces invalid program at instruction " + std::to_string(index));
MIGRAPH_THROW(p.name() + " pass produces invalid program at instruction " +
std::to_string(index));
}
#endif
}
auto invalid = this->validate();
if(invalid != impl->instructions.end()) {
if(invalid != impl->instructions.end())
{
auto index = std::distance(impl->instructions.begin(), invalid);
MIGRAPH_THROW("Invalid program from compilation at instruction " + std::to_string(index));
}
......
......@@ -27,7 +27,8 @@ void out_of_order()
EXPECT(bool{p.validate() == ins});
}
int main() {
int main()
{
simple_test();
out_of_order();
}
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