Commit 3d8eb6b7 authored by Nagy Mostafa's avatar Nagy Mostafa Committed by Scott Cyphers

Fix crash when checking bool types and bprop tests (#3459)

parent 8e991436
......@@ -279,9 +279,12 @@ bool MLIRSubgraphExtractionPass::is_supported_mlir_op(std::shared_ptr<Node> node
// Otherwise, we would generate code like this:
// %0 = icmp %a, %b : i1
// store %0, %c[%arg1] : i8 // Type error: trying to store an i1 into an i8.
if (((element::Type_t)node->get_element_type()) == element::Type_t::boolean)
for (auto& output : node->get_outputs())
{
return false;
if (output.get_element_type() == element::boolean)
{
return false;
}
}
if (TI(Parameter) == TI(*node) || TI(Result) == TI(*node))
......
......@@ -90,7 +90,7 @@ namespace ngraph
auto c_vec = read_vector<T>(c_arg);
fill(c_vec.begin(), c_vec.end(), static_cast<T>(0));
auto df_handle = backend->compile(df);
auto df_handle = backend->compile(clone_function(*df));
// for each element of the adjoint
// same as saying for each element of y
......
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