• mozga-intel's avatar
    [ NonZero ] operator with constant folding and onnx_importer support (#4431) · 37d37314
    mozga-intel authored
    * There is the files "non_zero.cpp & non_zero.hpp" for which operator non_zero is defined"
    The two files were added: non_zero.cpp & non_zero.hpp
    
    * The pull request present a study of extension of the NonZero operatos used for ML models:
    1) The various type of files was modified: cpp & hpp, onnx files & ng files
    2) Non_zero operator supports the onnx standard (there are added the files in which the operator is enabled: non_zero.cpp & non_zero.hpp)
    i
    
    * Operator description: refactor
    
    * GPU emitter - is not implemented
    
    * GPU emitter: v0 version
    
    * NoN zero: the input and output is adjusted to output shape & input_shape
    
    * Move the NonZero op to v3 namespace
    
    * Move NonZero to opset3
    
    * Correct shape inference for NonZero
    
    * NonZero op constant folding for 0D and 1D inputs
    
    * Constant folding for NonZero op
    
    * Correct output shape for NonZero & scalars
    
    * Helper function to test NonZero
    
    * NonZero constant folding UT for floats
    
    * Enable more data types in NonZero CF
    
    * NonZero type prop tests
    
    * NonZero constant folding tests (directly)
    
    * Use is_constant instead of casting in UT
    
    * NonZero op doxygen docs
    
    * onnx_importer docs adjustment
    
    * Correct version of the NonZero core op
    
    * Disable NonZero in GPU backend
    
    * Short circuit if all elems in data are identical
    
    * find_indices() optimization
    
    * Assert on the input shape in NonZeroElements
    
    * CF of NonZero with all non-zero values
    
    * NonZero CF test for scalars
    
    * bool support in NonZero
    
    * Missing include in NonZero CF
    
    * Dont throw if NonZero CF fails
    
    * Update src/ngraph/pass/constant_folding_non_zero.cpp
    Co-Authored-By: 's avatarRobert Kimball <robert.kimball@intel.com>
    
    * Removing warning
    Co-authored-by: 's avatartomdol <tomasz.dolbniak@intel.com>
    Co-authored-by: 's avatarScott Cyphers <diyessi@users.noreply.github.com>
    Co-authored-by: 's avatarRobert Kimball <robert.kimball@intel.com>
    37d37314
Name
Last commit
Last update
..
dynamic_shapes Loading commit data...
acosh.prototxt Loading commit data...
add_abc.onnx Loading commit data...
add_abc.prototxt Loading commit data...
add_abc_initializers.prototxt Loading commit data...
add_bcast.prototxt Loading commit data...
addmul_abc.prototxt Loading commit data...
argmax_int32.prototxt Loading commit data...
argmin_int32.prototxt Loading commit data...
argmin_no_keepdims.prototxt Loading commit data...
asinh.prototxt Loading commit data...
atanh.prototxt Loading commit data...
average_pool_2d.prototxt Loading commit data...
average_pool_2d_pads.prototxt Loading commit data...
batchnorm_default.prototxt Loading commit data...
bool_const_op.prototxt Loading commit data...
bool_init_and.prototxt Loading commit data...
bool_init_raw.prototxt Loading commit data...
bool_input_or.prototxt Loading commit data...
concat.prototxt Loading commit data...
concat_negative_axis.prototxt Loading commit data...
conv2d_dilation_assym_pads_strides.prototxt Loading commit data...
conv3d_bias.prototxt Loading commit data...
conv_integer.prototxt Loading commit data...
conv_integer_no_zero_point.prototxt Loading commit data...
conv_integer_pads.prototxt Loading commit data...
conv_transpose_w_groups.prototxt Loading commit data...
conv_with_strides_and_asymmetric_padding.prototxt Loading commit data...
conv_with_strides_no_padding.prototxt Loading commit data...
conv_with_strides_padding.prototxt Loading commit data...
conv_with_strides_padding_bias.prototxt Loading commit data...
convtranspose_groups_pads_bias.prototxt Loading commit data...
convtranspose_groups_w_pads.prototxt Loading commit data...
convtranspose_output_shape.prototxt Loading commit data...
convtranspose_output_shape_auto_pads_same_lower.prototxt Loading commit data...
convtranspose_output_shape_auto_pads_same_upper.prototxt Loading commit data...
cosh.prototxt Loading commit data...
cum_sum_1d.prototxt Loading commit data...
cum_sum_2d_axis_input.prototxt Loading commit data...
cum_sum_2d_dynamic_axis_input.prototxt Loading commit data...
cum_sum_3d_exclusive_reverse.prototxt Loading commit data...
custom_operator.prototxt Loading commit data...
custom_operator_default_domain.prototxt Loading commit data...
depth_to_space.prototxt Loading commit data...
depth_to_space_bad_blocksize.prototxt Loading commit data...
depth_to_space_chw.prototxt Loading commit data...
depth_to_space_no_blocksize.prototxt Loading commit data...
dequant_lin.prototxt Loading commit data...
dequantize_linear_0.prototxt Loading commit data...
dequantize_linear_1.prototxt Loading commit data...
dequantize_linear_2.prototxt Loading commit data...
dequantize_linear_3.prototxt Loading commit data...
dequantize_linear_4.prototxt Loading commit data...
dequantize_linear_5.prototxt Loading commit data...
div.prototxt Loading commit data...
elu.prototxt Loading commit data...
erf.prototxt Loading commit data...
erf_int32.prototxt Loading commit data...
expand_static_shape.prototxt Loading commit data...
eye_like.prototxt Loading commit data...
filename.prototxt Loading commit data...
flatten.prototxt Loading commit data...
gatherND_float.prototxt Loading commit data...
gatherND_int32.prototxt Loading commit data...
gemm_abc.prototxt Loading commit data...
global_lp_pool_p0.prototxt Loading commit data...
global_lp_pool_p1.prototxt Loading commit data...
global_lp_pool_p2.prototxt Loading commit data...
global_lp_pool_p3.prototxt Loading commit data...
hardmax.prototxt Loading commit data...
initializer_wo_input.prototxt Loading commit data...
instance_norm.prototxt Loading commit data...
leaky_relu.prototxt Loading commit data...
lp_norm_default.prototxt Loading commit data...
lp_norm_p1.prototxt Loading commit data...
lp_norm_p2.prototxt Loading commit data...
lstm_bdir_short_input_seq.prototxt Loading commit data...
lstm_fwd_hardsigmoid_activation.prototxt Loading commit data...
lstm_fwd_large_batch_no_clip.prototxt Loading commit data...
lstm_fwd_mixed_seq.prototxt Loading commit data...
lstm_fwd_with_clip.prototxt Loading commit data...
lstm_mixed_seq_reverse.prototxt Loading commit data...
matmul.prototxt Loading commit data...
matmul_float.prototxt Loading commit data...
matmul_integer.prototxt Loading commit data...
matmul_integer_4d.prototxt Loading commit data...
matmul_integer_4d_no_zero_point.prototxt Loading commit data...
matmul_integer_no_zero_point.prototxt Loading commit data...
matmul_integer_scalar.prototxt Loading commit data...
matmul_vec_ten3d.prototxt Loading commit data...
max.prototxt Loading commit data...
max_opset1.prototxt Loading commit data...
max_pool_2d_pads.prototxt Loading commit data...
mean.prototxt Loading commit data...
mean_opset1.prototxt Loading commit data...
min_two_inputs.prototxt Loading commit data...
min_two_inputs_opset1.prototxt Loading commit data...
missing_input.prototxt Loading commit data...
missing_op_domain.prototxt Loading commit data...
mod_sign.prototxt Loading commit data...
non_zero_1d.prototxt Loading commit data...
non_zero_1d_float.prototxt Loading commit data...
non_zero_2d_bool.prototxt Loading commit data...
non_zero_3d.prototxt Loading commit data...
non_zero_scalar.prototxt Loading commit data...
one_hot_axis.prototxt Loading commit data...
one_hot_no_axis.prototxt Loading commit data...
onnx_prototxt_converter.py Loading commit data...
onnx_prototxt_converter_requirements.txt Loading commit data...
override_op.prototxt Loading commit data...
pad_constant.prototxt Loading commit data...
prelu.prototxt Loading commit data...
provenance_downgrade_topk.prototxt Loading commit data...
provenance_input_tags.prototxt Loading commit data...
provenance_multiple_outputs_op.prototxt Loading commit data...
provenance_node_name_and_outputs.prototxt Loading commit data...
provenance_only_outputs.prototxt Loading commit data...
provenance_tag_add.prototxt Loading commit data...
qlinear_conv_2d.prototxt Loading commit data...
qlinear_conv_3d.prototxt Loading commit data...
qlinear_matmul.prototxt Loading commit data...
qlinear_matmul_3d.prototxt Loading commit data...
quant_conv_lin.prototxt Loading commit data...
quantize_linear.prototxt Loading commit data...
quantize_linear_axis_negative.prototxt Loading commit data...
quantize_linear_axis_zero.prototxt Loading commit data...
quantize_linear_zero_point.prototxt Loading commit data...
reciprocal.prototxt Loading commit data...
reduce_l1.prototxt Loading commit data...
reduce_l2.prototxt Loading commit data...
reduce_log_sum.prototxt Loading commit data...
reduce_log_sum_exp.prototxt Loading commit data...
reduce_max.prototxt Loading commit data...
reduce_mean.prototxt Loading commit data...
reduce_min.prototxt Loading commit data...
reduce_prod.prototxt Loading commit data...
reduce_sum.prototxt Loading commit data...
reduce_sum_square.prototxt Loading commit data...
relu.prototxt Loading commit data...
reshape_extended_dims.prototxt Loading commit data...
reshape_negative_dim.prototxt Loading commit data...
reshape_negative_with_zero_dims.prototxt Loading commit data...
reshape_output_shape_as_input.prototxt Loading commit data...
reshape_reduced_dims.prototxt Loading commit data...
reshape_reordered_dims.prototxt Loading commit data...
reshape_single_dim.prototxt Loading commit data...
reverse_sequence_incorrect_batch_axis.prototxt Loading commit data...
reverse_sequence_incorrect_time_axis.prototxt Loading commit data...
reverse_sequence_time_0_batch_1.prototxt Loading commit data...
reverse_sequence_time_1_batch_0.prototxt Loading commit data...
reverse_sequence_time_and_batch_axis_equal.prototxt Loading commit data...
round.prototxt Loading commit data...
scatter_nd.prototxt Loading commit data...
selu.prototxt Loading commit data...
shape.prototxt Loading commit data...
shrink_float.prototxt Loading commit data...
shrink_int.prototxt Loading commit data...
sigmoid.prototxt Loading commit data...
sign.prototxt Loading commit data...
sinh.prototxt Loading commit data...
softmax.prototxt Loading commit data...
softplus.prototxt Loading commit data...
space_to_depth.prototxt Loading commit data...
space_to_depth_bad_blocksize.prototxt Loading commit data...
space_to_depth_chw.prototxt Loading commit data...
space_to_depth_no_blocksize.prototxt Loading commit data...
split_equal_parts_2d.prototxt Loading commit data...
split_equal_parts_default.prototxt Loading commit data...
split_variable_parts_2d.prototxt Loading commit data...
squeeze_duplicate_axes.prototxt Loading commit data...
sub.prototxt Loading commit data...
sum.prototxt Loading commit data...
sum_one_input.prototxt Loading commit data...
sum_opset1.prototxt Loading commit data...
sum_opset8.prototxt Loading commit data...
tanh.prototxt Loading commit data...
thresholded_relu.prototxt Loading commit data...
tile.prototxt Loading commit data...
tile_static.prototxt Loading commit data...
top_k.prototxt Loading commit data...
top_k_opset_10.prototxt Loading commit data...
top_k_opset_10_const_k.prototxt Loading commit data...
top_k_opset_11_const_k_smallest.prototxt Loading commit data...
unknown_domain.prototxt Loading commit data...
unknown_domain_add.prototxt Loading commit data...
unsqueeze.prototxt Loading commit data...
unsqueeze_negative_axes.prototxt Loading commit data...
unsupported_op.prototxt Loading commit data...
where.prototxt Loading commit data...