Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Select #8

Merged
merged 3 commits into from
Sep 16, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,14 @@ namespace ngraph
const T* arg1,
const T* arg2,
T* out,
size_t count) // TODO: using char for bool, is this right?
size_t arg0_count,
size_t arg1_count,
size_t arg2_count,
size_t arg3_count) // TODO: using char for bool, is this right?
{
for (size_t i = 0; i < count; i++)
for (size_t i = 0; i < arg3_count; i++)
{
out[i] = arg0[i] ? arg1[i] : arg2[i];
out[i] = arg0[i % arg0_count] ? arg1[i % arg1_count] : arg2[i % arg2_count];
}
}

Expand Down
3 changes: 3 additions & 0 deletions ngraph/core/src/pass/constant_folding_select.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ shared_ptr<op::Constant> fold_constant_select(const shared_ptr<op::Constant>& se
t->get_data_ptr<T>(),
f->get_data_ptr<T>(),
data_ptr,
shape_size(selection->get_shape()),
shape_size(t->get_shape()),
shape_size(f->get_shape()),
shape_size(out_shape));
}
else if (auto select_v1 = as_type_ptr<op::v1::Select>(select))
Expand Down
Loading