Commit 70172835 authored by Rob Earhart's avatar Rob Earhart Committed by Scott Cyphers

Add any/all PlaidML support (#2345)

parent 8bde7d80
......@@ -15,6 +15,8 @@
//*****************************************************************************
#include "ngraph/coordinate_transform.hpp"
#include "ngraph/op/all.hpp"
#include "ngraph/op/any.hpp"
#include "ngraph/op/max.hpp"
#include "ngraph/op/min.hpp"
#include "ngraph/op/product.hpp"
......@@ -84,6 +86,8 @@ namespace ngraph
.finalize());
}
NGRAPH_PLAIDML_OP_CLASS(ImplAll, ReductionBase<op::All>);
NGRAPH_PLAIDML_OP_CLASS(ImplAny, ReductionBase<op::Any>);
NGRAPH_PLAIDML_OP_CLASS(ImplMax, ReductionBase<op::Max>);
NGRAPH_PLAIDML_OP_CLASS(ImplMin, ReductionBase<op::Min>);
NGRAPH_PLAIDML_OP_CLASS(ImplProduct, ReductionBase<op::Product>);
......@@ -92,6 +96,18 @@ namespace ngraph
}
}
// All reduces a tensor, taking the boolean minimum along the specified axes.
void ngraph::runtime::plaidml::ImplAll::Apply()
{
build_reduction("<");
}
// Any reduces a tensor, taking the boolean maximum along the specified axes.
void ngraph::runtime::plaidml::ImplAny::Apply()
{
build_reduction(">");
}
// Max reduces a tensor, taking the maximum along the specified axes.
void ngraph::runtime::plaidml::ImplMax::Apply()
{
......
......@@ -98,23 +98,3 @@ sum_stable_acc_double # To debug: precision errors
embedding_lookup_4x5_reverse
embedding_lookup_10x1_arbitrary
embedding_lookup_10x1_arbitrary_index_type_int
any_trivial # Requires boolean reduction in PlaidML
any_2x2_to_scalar_true # Requires boolean reduction in PlaidML
any_2x3_eliminate_row_dim # Requires boolean reduction in PlaidML
any_2x2x3_eliminate_dim_0 # Requires boolean reduction in PlaidML
any_2x2x3_eliminate_dim_1 # Requires boolean reduction in PlaidML
any_2x2x3_eliminate_dim_2 # Requires boolean reduction in PlaidML
any_2x2x3_eliminate_dims_0_1 # Requires boolean reduction in PlaidML
any_2x2x3_eliminate_dims_0_2 # Requires boolean reduction in PlaidML
any_2x2x3_eliminate_dims_1_2 # Requires boolean reduction in PlaidML
any_2x2x3_eliminate_dims_0_1_2 # Requires boolean reduction in PlaidML
all_trivial # Requires boolean reduction in PlaidML
all_2x2_to_scalar_false # Requires boolean reduction in PlaidML
all_2x3_eliminate_col_dim # Requires boolean reduction in PlaidML
all_2x2x3_eliminate_dim_0 # Requires boolean reduction in PlaidML
all_2x2x3_eliminate_dim_1 # Requires boolean reduction in PlaidML
all_2x2x3_eliminate_dim_2 # Requires boolean reduction in PlaidML
all_2x2x3_eliminate_dims_0_1 # Requires boolean reduction in PlaidML
all_2x2x3_eliminate_dims_0_2 # Requires boolean reduction in PlaidML
all_2x2x3_eliminate_dims_1_2 # Requires boolean reduction in PlaidML
all_2x2x3_eliminate_dims_0_1_2 # Requires boolean reduction in PlaidML
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