add macro VSI_EXPAND_BROADCAST_ENABLE_DIMENSIONS for ovxlib compatibility (#374)
This commit is contained in:
parent
dbb3631d4e
commit
3f2e67b65f
|
|
@ -30,6 +30,8 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define VSI_EXPAND_BROADCAST_ENABLE_DIMENSIONS
|
||||
|
||||
typedef struct _vsi_nn_expand_broadcast_param
|
||||
{
|
||||
uint32_t *shape;
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@ Broadcast::Broadcast(Graph* graph, const std::vector<int32_t>& shape,
|
|||
dimensions_(dimensions) {
|
||||
this->impl()->node()->nn_param.expand_broadcast.dim_num = shape_.size();
|
||||
this->impl()->node()->nn_param.expand_broadcast.shape = (uint32_t*)shape_.data();
|
||||
#ifdef VSI_EXPAND_BROADCAST_ENABLE_DIMENSIONS
|
||||
this->impl()->node()->nn_param.expand_broadcast.dimensions_num = dimensions_.size();
|
||||
if (dimensions.size() > 0)
|
||||
{
|
||||
|
|
@ -44,7 +45,7 @@ Broadcast::Broadcast(Graph* graph, const std::vector<int32_t>& shape,
|
|||
} else {
|
||||
this->impl()->node()->nn_param.expand_broadcast.dimensions = nullptr;
|
||||
}
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
std::shared_ptr<Operation> Broadcast::Clone(
|
||||
|
|
|
|||
Loading…
Reference in New Issue