* Remove unnecessary code from the reshape operator shape deduction
* Add new tests to cover cornercases after documentation update
* Fix typo in test name
* Fix codestyle issues
* Fix tests naming
* ROIPooling: Specification and op class alignment
* ROIPooling: Add check to input tensor type to be aligned with spec
* ROIPooling: Corrected spec description for input tensor shape and box coordinates
* ROIPooling: Changed attributes pooled_h and pooled_w from Shape to plain int
* Revert "ROIPooling: Changed attributes pooled_h and pooled_w from Shape to plain int"
This reverts commit d49cfa8e53.
* ROIPooling: Further specification changes
* ROIPooling: Rename enum class ROIPoolingMethod methods
* Fix style
* ROIPooling: Draft reference implementation
* ROIPooling: Adjust feature map element type to float for attribute unit test
* ROIPooling: Add single layer test class
* ROIPooling: Corrected output index to iterate through output tensor elements
* ROIPooling: Added validation checks for input types in op constructor
* ROIPooling: Add unit tests
* ROIPooling: Attributes unit test changed to align with spec
* ROIPooling: Add check for batch id in reference implementation and unit test
* ROIPooling: Refactor single layer test class
* ROIPooling: Add test for invalid pooling method
* ROIPooling: Clean up unnecessary function declaration
* ROIPooling: Remove duplicated default ROIPooling method in op constructors
* ROIPooling: Add Infer method to generate suitable ROI data
* ROIPooling: CPU single layer test instantiation for max method
* ROIPooling: Remove enum class ROIPoolingMethod
* Revert "ROIPooling: Clean up unnecessary function declaration"
This reverts commit 074b540dea.
* ROIPooling: Refactor single layer tests after removing enum class ROIPoolingMethod
* ROIPooling: Add attribute checks in op constructor to align with spec and unit tests
* Resolve CI failure: clang could not resolve static conversion from uint64_t to size_t
* ROIPooling: Fix for output index calculation to loop through all ROIs
* ROIPooling: Add unit test for bilinear interpolation method
* ROIPooling: Add CPU single layer test instantiation for bilinear method
* ROIPooling: Clean up unnecessary enum class for pooling method
* ROIPooling: Add myriad single layer test instantiation
* ROIPooling: Add F16 precision single layer tests for CPU plugin
* ROIPooling: Add node validation check for string method attribute in constructor and unit tests
* ROIPooling: Spec changes to improve understanding of the operation
* ROIPooling: Fix for bilinear method when pooled size is 1x1
* ROIPooling: Add unit test for bilinear method and pooled size 1x1
* ROIPooling: Fix to broken format of specifications
* ROIPooling: Disable Myriad single layer tests
* ROIPooling: Handle dynamic dims and ranks for input tensors and unit tests
* ROIPooling: Code clean up
* ROIPooling: Address review comments
* ROIPooling: Changed location for makeROIPooling helper method
Co-authored-by: Kirill Molchanov <kirill.molchanov@intel.com>
* [CPU BF16] Greedy mode was added
* [IE TESTS][BF16] Added support for operations with bf16 precision in the single layer tests.
* Added cpu specific bfloat16 single layer tests for the jit_eltwise primitive.
* [CPU TESTS] Activation and logical single layer tests fixes.
* [IE TESTS] Fix activation single layer tests run.
* [IE TESTS][CPU] CPUTestBase further refactoring.
* [CPU BF16] Support for Bfloat16 type was added to the MVN layer. (#3)
* [CPU BF16] MVN layer bfloat16 compatibility.
* [CPU BF16] MVN bfloat16 minor fixes.
* [CPU BF16] MVN node exception about BF16 support replaced with precision redefinition.
* [CPU BF16] MVN layer bloat16 support fixed for quantization operations and blocking layout.
* [CPU] Input and output precision checks were added to MVN layer.
* [IE TESTS][CPU BF16] Most of the bloat16 tests have been fixed.
* Bf16 crop layer (#4)
* [IE TESTS][CPU] Cpu specific test for the Crop layer has been created.
* [IE TESTS][CPU] Deprecated Crop single layer test removed.
* [CPU BF16] Bfloat16 precision was added to the Crop layer.
* [CPU BF16] Crop layer minor code improvements.
* [IE TESTS][CPU] Crop layer test added 2D tensor tests.
* [IE TESTS][CPU] Crop layer test, obsolete comment removed.
* [IE TESTS][CPU] Fixed CropIE include path.
* Crop test fix for older gcc compiler.
* [CPU BF16] Reduce layer extended with bfloat16 support.
* [IE TESTS][CPU] CPU specific single layer test for Reduce operation.
* BF16 optimized layers
* [CPU BF16] Bfloat16 custom type added to the MKLDNN plugin.
* [CPU BF16] Mem alignment to 16 bytes added to bfloat16 class union.
* [IE TESTS][CPU] Permute cpu specific single layer test and minor cpu tests fixes
* MVN cpu single layer tests extended with nhwc ndhwc layouts.
* Mod mode removed from Eltwise cpu single layer test.
* Permute cpu specific single layer test.
* Smoke keyword was added to the CPU single layer tests.
* Normalize node was modified for BF16 support
* [CPU BF16] The RegionYolo layer has been extended with the bfloat16 type support.
* Resample node was extended with BF16
* Select layer was enabled with BF16
* psroi supports bf16 (#7)
* reorders replaces converts (#9)
* BF16 planar pooling was enabled
* [CPU BF16] Cpu_convert added to the RegionYOLO node.
* [IE TESTS][CPU] Crop single layer test has been rewritten using the StridedSlice operation.
* [IE TESTS][CPU] Covert layer test extended with bf16 precision.
* [CPU BF16] The bfloat16 class was renamed bfloat16_t and some refactoring has been done.
* [CPU BF16] RegionYOLO and Softmax were aligned with the review.
* [IE TESTS CPU] CPU single layer tests refactored according to the review suggestions.
* [IE TESTS CPU] The Reduce CPU single layer test was extended with different mem orders.
* [IE TESTS CPU] Minor fixes after the review.
* [IE TESTS CPU] Common plugin configuration has been moved to PreparePluginConfiguration function.
* Minor changes after review
* StridedSlice, Select, ScaleShift notes were resolved
* Fixes to the Reduce operation cpu test and minor fixes related to the review.
* GPU eltwise tests fix.
* psroi unrolled to the primary state; code clean (#12)
* PSROIPooling layer with C++ optimizations
* Minor fix for compatibility with CPUTestsBase for fuse_permute_reorder test.
* Code clean & psroi rollbacked
Co-authored-by: Maksim Kutakov <maksim.kutakov@intel.com>
Co-authored-by: Maksim Kutakov <maxim.kutakov@gmail.com>
Co-authored-by: Yury Gaydaychuk <yury.gaydaychuk@intel.com>
* Align MaxPool op attribute 'rounding_type' to spec.
Attribute name should be in lower case.
* Remove obsolete "cacheable" attribute from Parameter.
* Translate ReLU & SoftMax ops type names from ngraph to IR convention.
* Remove <data> node when op has no attributes.
* Translate all operation attributes values to lower case.
* Revert "Align MaxPool op attribute 'rounding_type' to spec."
This reverts commit 243eeccff3.
* Revert "Translate all operation attributes values to lower case."
This reverts commit d4c24175b3.
* Align MaxPool op attribute 'rounding_type' to spec.
Attribute name should be in lower case.
* Align auto_pad & auto_broadcast operation attributes to spec.
They should be written in lowercase.
* Rename op:PadType 'none' to 'explicit'.
* Fix: ITT_INCLUDE_DIR was not correctly detected
* Added NGRAPH_STATIC_LIBRARY CMake flag to optionnaly compile ngraph and link it as a static library instead of a dynamic one
- Definition of NGRAPH_STATIC_LIBRARY macro in callee and caller code to avoid dllexport/dllimport decoration
- Adding missing definitions of the explicit instantiation of FactoryRegistry<>::get
- Removed message about a non existent variable: NGRAPH_IE_STATIC_LIB_ENABLE
- Removed install export directive for ngraph in case of static library
* * Code style fix
* Added NGRAPH_STATIC_LIBRARY CMake flag to optionnaly compile ngraph and link it as a static library instead of a dynamic one
- Definition of NGRAPH_STATIC_LIBRARY macro in callee and caller code to avoid dllexport/dllimport decoration
- Adding missing definitions of the explicit instantiation of FactoryRegistry<>::get
- Removed message about a non existent variable: NGRAPH_IE_STATIC_LIB_ENABLE
- Removed install export directive for ngraph in case of static library
* - Removed redundant symbol definition
- Indented properly some comments
* - Making sure onnx is always compiled as a static library no matter what is the value of BUILD_SHARED_LIBS
* - Making sure onnx is always compiled as a static library no matter what is the value of BUILD_SHARED_LIBS
* Fixed incorrect suppression of directive
* Using BUILD_SHARED_LIBS (defaulted to ON) instead of a custom CMake option NGRAPH_STATIC_LIBRARY
* Removed useless comma
* Forcing pugixml to be static event when BUILD_SHARED_LIBS=ON globally.
* Forcing gtest for ie tests to be compiled as a static library.
* Made protobuf and gtest from ngraph always static.
Factorized all the force static logic for ngraph's externals in ngraph's CMakeLists.txt instead of external_*.cmake
* gflags is always static
* Solving cross compilation from Debian 9
* using the same pattern for other ngraph externals
Co-authored-by: emmanuelattia-philips <66060489+emmanuelattia-philips@users.noreply.github.com>
Co-authored-by: Emmanuel Attia <emmanuel.attia@philips.com>
* update HardSigmoid spec
* create HardSigmoid ref impl
* add HardSigmoid to int_executable
* create unit-tests for HardSigmoid
* create onnx_model_hard_sigmoid test
* create onnx prototxt model for hard sigmoid
* add backend/hard_sigmoid to CMakeLists
* Change hard sigmoid prototxt to use attributes
* Change hard_sigmoid onnx model test to have 1 input
* style apply
* Change alpha and beta parameters to be pass by value
* interpolate improvement
* JITTED cubic mode
* fix 'code is too big' when JIT
* extend test to cover tail code path
* transformation of interpolate1 to interpolate4
* add low precision transformation for interpolate4
* sequences to ti transformations, support for seq_lengths input, update reference implemetations, add new tests
* fix python api, update sequences to ti transformation
* fix sequences to ti transformation
* Update sequences to TI transformation: fix reverse sequence support
* update single layer tests, fix TI reference impl, fix Sequences to TI transformations
* ngraph code style
* fix build
* fix ngraph python api
* resolver review comments, refactoring
* Resolve review remarks
* delete xfail
* Fix ElementwiseInputReshape transformation
Reshape node always needs to be inserted
in order to preserve ShapeOf nodes (reshapability of a model) that can potentially be above
elementwise node.
Refactor EltwiseInputReshape_test and EltwiseInputNormalization_test since the logic of maintaining reshape for eltwise has been changed.
Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>
* Merge EltwiseInputNormalization and EltwiseInputReshape transformations
Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>
* Remove Unsqueeze from Fused_op
Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>
* Fix code after code review #1
Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>
* Fix code after review #2
Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>
* Fix code review #4
Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>
* Perform full normalization based on shapes of all inputs to eltwise
Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>
* Refactor much to avoid old API and edges with unsqueeze_dims attribute
Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>
* Fix code after review
Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>
* nGraph: Fix TopK output shape inference
* nGraph: Correct TopK output shape inference
TopK lower bound of output shape at the axis was mistakenly calculated
basing on max_lenght instead of min_lenght.
* nGraph: Correct TopK output shape inference
* nGraph: Correct TopK type prop test
The topk_negative_axis_support type properties test was comparing
incompatible variables carrying the same value. So it was passing ok.
* nGraph: Add TopK type prop test
* nGraph: Fix code style
* nGraph: Follow review guidelines
Improve variables meaning.
Enforce rigid test pass condition.
* nGraph: Remove magic numbers
To follow MatMul spec update for 1D tensors this PR removes FusedOp decomposition for MatMul without changing current MatMul output shape inference logic (numpy/onnx aligned).
Based on previous PR #2212 that follows rather current spec logic.
* [VPU][NGraph] Support ShapeOf and Gather in TopK K propagation
* [VPU] Save calculated K value
* [VPU][Tests] Introduces tests
* [Tests] Review fixes
* ITT performance counters for first inference
ITT counters for nGraph passes
* RTTI for trnasformation passes
* The MKLDNN plugin first inference counters improvements
* Redundant op::Max CF removal
* Redundant op::Min CF removal
* Redundant op::Sum & op::Product CF removal
* CF Min and Max using evaluate()
* Arithmetic reduction CF pass removal
* Quantize op CF pass removal
* Convert op CF pass removal
* Logical reduction CF pass removal
* Select op CF pass removal
* OneHot CF pass removal
* Code formatting
* ScatterElements CF pass removal
* Gather CF pass removal
* Disable a Quantize op test that fails in CI
* CF pass cleanup
* Convert op cleanup and test adaptation to spec
* Possible fix for failing VPU tests
* Limit the types used in OneHot::evaluate
* Quantize op evaluator removal
* Refactor of Gather evaluator
* Loop op ngraph implementation, update IE IR Reader and ngraph to cnn converter
* refactoring SubGraphOp class
* type prop unit tests
* ngraph code style
* update comment
* single layer tests for Loop operation
* fix file name
* Add SpecialBodyPorts attribute in Loop op, update single layer tests
* first debug version
* more tests
* missing test file
* removed not needed shapes from test data
* move test data to new folder
* shape infer tests
* Added execution tests
* add several new tests cases, strict checks in Loop impl, temporary disable single layer tests
* ngraph codestyle, refactoring, clone_new_args test
* resolve review remarks
* fix build
* fix tests
* more execution tests
* add a new constructor of Loop op, resolve review remarks
* execution tests
* synchro with current version
* handle scalars and more tests
* scalar test enabled
* loop reference impl
* bug fixes in tests, onnx importer part and in the ref implementation of the Loop op
* applied remarks
* handle unsupported cases
* rewrite unit tests
* update INTERPRETER manifest
* is_termination_condition_always_true simplification
* [TEST] update python models tests
* review remarks
* added xfail to tiny_yolov3
* missing model test
* revert test data
* fixed numbers of failing tests
* fixed failed test description
* fix test message
* fix xfail test
* reference implementation for ngraph::function
* update loop reference implementation
* Refactor loop reference implementation
* ngraph codestyle
* Refactoring
* Submodule update
* Skip check for Reduce ops in mkl for scalar cases, support for yolov3
* fix ngraph reader tests
* revert ceiling op, renaming
* Add allias(Ceiling) for Ceil op in mkl
* delete xfails
* fix build
* single layer tests for tensor iterarator
* Refactor TensorIterator and Loop ref impls
* revert dynamic tensor creation, disable some dynamic test cases
* fix warning
* Resolve review remarks
* revert Predefined values in Loop tests
Co-authored-by: Mateusz Bencer <mateusz.bencer@intel.com>
* change tile reference implementation
* remove tile tests from interpreter manifest
* add repeats parameter to tile
* improve tile reference implementation
* add repeats parameter to tile reference call in tile evaluate method
* style apply
* include <numeric>
* add unnamed namespace to helper functions. Change stdio.h to cstdio. Change input_rank to be constant int
* add const reference to parameter repeats in tile reference function
* change createPitches function to use partial_sum instead of accumulate
* change a little bit createPitches function
* style-apply
* fix function naming
* style-apply
* fix calling functions name bug
* Add description of create_pitches function
* first version with debug logs
* reduce footprint
* single layer tests
* added more tests
* fixed handling bool type
* styles applied
* fix tile
* [ONLY DEBUG] print error scenario message
* fixed problem with e2e tests
* fixed casting of start_axis for numpy mode
Co-authored-by: pszmel <piotr.szmelczynski@intel.com>
* Some code style fixes.
* Started to write the method v5::NonMaxSuppression::evaluate().
* Started to write nGraph reference implementation of NMS-5.
* Some additions.
* Written preprocessing of boxes data.
* Started to write the function non_max_suppression() that calculates NonMaxSuppression-5 operation.
* Written postprocessing of the evaluate().
* Small fixes.
* Small fix.
* Added include for ngraph/shape.hpp.
* Written the function intersectionOverUnion.
* Some additions.
* Small fix.
* Continued to write the function non_max_suppression().
* Small fixes.
* Small fixes.
* Some changes.
* Some additions.
* Some replacements size_t by int64_t.
* Added casts to float in the construction of selected_score variable.
* Code style fixes.
* Written draft of NMS-5 nGraph reference implementation.
* Code style fixes.
* Started to write tests for void op::v5::NonMaxSuppression::validate_and_infer_types().
* Added tests for scalars/nonscalars.
* Fixes in the test type_prop.nms_v5_output_shape.
* Fixes in tests nms_v5_output_shape_2 and nms_v5_output_shape.
* Written tests for validate_and_infer_types() of NMS-5.
* Code style fixes.
* Now NMS-5 evaluate() can have outputs with calculated shapes.
* Small fixes.
* Corrected tests for NMS-5 validate_and_infer_type().
* Code style fixes.
* Started to write inner version of NMS-5 with static output shapes.
* Written draft of the inner operation NonMaxSuppressionIE3.
* Started to write conversion of op::v5::NonMaxSuppression into NonMaxSuppressionIE3.
* Small changes.
* Some additions.
* Small fixes.
* Fixed typo.
* Fixed typos.
* Written draft of the transformation ConvertNMS5ToLegacyMatcher that converts ngraph::opset5::NonMaxSuppression into op::NonMaxSuppressionIE3.
* Written header file for the transformations from NMS-1, NMS-3, NMS-4 to NMS-5.
* Started to write conversion of NMS-4 to NMS-5.
* Added include for ngraph/opsets/opset4.hpp.
* Started to write conversion of NMS-3 to NMS-5.
* Small fixes.
* Written draft of the conversion of NMS-3 into NMS-5.
* Fixed typo.
* Started to write conversion of NMS-1 to NMS-5.
* Written draft of the conversion NMS-1 to NMS-5.
* Started to write tests for the conversion nGraph NMS-5 to inner NMS.
* Started to write the test ConvertNMS5ToNMSIEStatic.
* Written tests for conversion of nGraph NMS-5 to inner NMSIE3.
* Started to write tests for conversion of previous NMS to nGraph NMS-5.
* Written tests for conversion of old nGraph NMS to NMS-5.
* Started to write tests for opset5::NonMaxSuppression::evaluate().
* Some additions.
* Small fix.
* Written tests for op::v5::NonMaxSuppression::evaluate().
* Used NGRAPH_RTTI_DECLARATION for NonMaxSuppressionIE3.
* Used NGRAPH_RTTI_DECLARATION for NMS-5.
* All static local constants and functions for NMS-5 were moved into non-named namespace.
* Some code style fixes.
* Moved some file.
* Small fix.
* Code style fix.
* Now NMS-5 supports all floating types in inputs 0 and 1.
* Moved some files.
* Fixed include directive in the file convert_nms_5_to_legacy.cpp with transformations NMS-1, 3, 4 -> NMS-5.
* Small changes.
* Deleted conversion NMS-3 -> legacy.
* Small changes.
* Fix in op::v5::NonMaxSuppression::evaluate: output shape [1] instead of [] in the output port 2.
* Code style fixes.
* Deleted conversion of NMS-4 into legacy NMS.
* Deleted redundant ifs.
* Added NMS-5 to Python API.
* Code style fix.
* Small change.
* Fixed element type for constants in the conversion of NMS-5 to NMSIE3.
* Deleted support of f64 in NMS-5.
* Added checks for input element types for inputs #0, #1, #3, #4, #5.
* Small change.
* Now get_floats throws an exception for unsupported types.
* Now nGraph NMS-5 supports 0D and 1D tensors in inputs #2, #3, #4, #5.
* Small fix in test_non_max_suppression.
* Deleted using namespace std
* Fixes in test_non_max_suppression().
* Small fixes.
* Added 'import PartialShape' in test_reduction.py.
* Deleted creating fake inputs in the ctor of op::v5::NonMaxSuppression.
* Deleted creating fake inputs in op::v5::NonMaxSuppression::clone_with_new_inputs.
* Corrections in int64_t op::v5::NonMaxSuppression::max_boxes_output_from_input() const.
* Corrected functions float op::v5::NonMaxSuppression::soft_nms_sigma_from_input() const, float op::v5::NonMaxSuppression::score_threshold_from_input() const, float op::v5::NonMaxSuppression::iou_threshold_from_input() const.
* Small fixes.
* Deleted commented code.
* Fixes in nms_v5_scalar_inputs_check.
* Some changes.
* Small fixes.
* Code style fixes.
* Small changes.
* Small changes.
* Small fix.
* Deleted commented code.
* Some refactoring in ConvertNMS4ToNMS5 ctor.
* Small fix.
* Common part of conversions NMS-1 -> NMS-5, NMS-3 -> NMS-5, NMS-4 -> NMS-5 was moved into the separate function.
* Now conversions NMS-1 -> NMS-5, NMS-3 -> NMS-5, NMS-4 -> NMS-5 support both 2 inputs, and 5 inputs.
* Now transformations NMS-1 -> NMS-5, NMS-3 -> NMS-5, NMS-4 -> NMS-5 are called from 'umbrella' transformation.
* Now the transformation ConvertNMS5ToLegacyMatcher supports NMS-5 with 2, 3, 4, 5, or 6 inputs.
* The transformation ConvertNMS5ToLegacyMatcher was rewritten using Reshape instead of Unsqueeze.
* Started to rewrite tests for the transformation ConvertNMS5ToLegacyMatcher.
* Some fixes.
* Small fixes.
* Corrected tests for the transformation NMS-5 -> NMSIE3.
* Small formatting fix.
* Now methods max_boxes_output_from_input(), iou_threshold_from_input(), score_threshold_from_input(), soft_nms_sigma_from_input() of op::v5::NunMaxSuppression are public.
* Started to move op::v5::NonMaxSuppression::evaluate() into ngraph/test/runtime/interpreter.
* Added NMS-5 to ngraph/test/runtime/interpreter/int_executable.
* Small fixes.
* Code style fixes.
* Written draft test nonmaxsuppression_center_point_box_format_backend in ngraph/test/backend.
* Small fix.
* Written draft tests of NonMaxSuppression in ngraph/test/runtime.
* Some changes.
* Small changes.
* Disabled IE_CPU tests for NMS-5.
* Deleted op_eval tests for NMS-5.
* Deleted evaluate() method of NMS-5.
* Now all nGraph functions in tests of the transformation NMS-5 -> NMSIE3 have one output.
* Now preprocessing and postprocessing of the calculation of NMS-5 in reference implementation.
* Code style fixes.
* Some fixes in tests for the transformation NMS-5 -> NMSIE3.
* Replaced precision i64 -> i32 for some constants in tests for the transformation NMS-5 -> NMSIE3.
* Written creating CNNLayer for NMS-5.
* Added creating CNNLayer for NonMaxSuppressionIE3.
* some changes.
* Now conversions NMS-1, NMS-3, NMS-4 -> NMS-5 and NMS-5 -> NMSIE3 generate NMS nodes with 5 inputs.
* Fixed ctor in MKLDNN NonMaxSuppressionImpl: validation of number of output edges.
* Added conversion of output_type for NMS-5.
* Fixes in the transformation NMS5 -> NMSIE3.
* Fixes in the conversion of NMS-5 to NMSIE3.
* Fixes in MKLDNN NMS ctor.
* Small fix.
* Fixed tests for the transformation NMS5 -> NMSIE3.
* Fixed tests for conversions NMS-1, NMS-3, NMS-4 -> NMS-5.
* Small fixes in MKLDNN NMS ctor.
* Rewritten create_layer() functions for NMS-5 and NMSIE3 as addSpecificCreator() functions.
* Disabled tests for IE IR reader for NMS-4.
* Deleted debug code.
* Added comment about disabling tests IE_CPU.nonmaxsuppression.
* Written IE IR Reader test for NMS-4.
* Deleted function float_from_constant_node.
* Small fixes.
* Deleted functions function_from_model and construct_weights.
* Small fix.
* Replaced push_back with emplace_back in the conversion of NMS-5 to legacy.
* Small changes.
* Some fixes.
* Refactored reference implementation of NMS-5.
* Moved structure NMSAttributes to unnamed namespace.
* Code style fixes.
* Small fix.
* Remove deprecated v0::TopK
* Remove using SortType and using Mode from TopK
* apply code format
* Revert "Remove using SortType and using Mode from TopK"
This reverts commit ee2f99ea89.