1. 21 Oct, 2022 1 commit
    • Ted Themistokleous's avatar
      Fix parse_if to handle multi output constant branches · 2ae4c715
      Ted Themistokleous authored
      - Initial fix to handle scalars on input for empty constant values
      - Using scalar, multibroadcast, contiguous
      - Fixed appropriate unit tests for simple single output constants
      - Added unit tests for multi if outputs.
      
      - TODO - multibroadcast to handle scalar so we don't use scalar
      2ae4c715
  2. 20 Oct, 2022 1 commit
    • Ted Themistokleous's avatar
      Add tests for valid multi output shapes going into IF operator · a27808b3
      Ted Themistokleous authored
      Adding test to validate what a "valid" multi input should look like and
      that we correctly handle trailing 1s and correctly sized outputs.
      
      Generated and added the two tests from gen_onnx.py with matching test
      in onnx_test.cpp
      
      -if_then_else_multi_output_shapes_test.onnx
      -if_then_else_multi_output_shapes_test2.onnx
      a27808b3
  3. 18 Oct, 2022 3 commits
  4. 17 Oct, 2022 4 commits
  5. 14 Oct, 2022 1 commit
  6. 13 Oct, 2022 3 commits
  7. 08 Oct, 2022 1 commit
    • Ted Themistokleous's avatar
      Got model past if sequence but failing unit tests still · ea2d51bf
      Ted Themistokleous authored
      - Gets past to the split section of the resnext model
      - adding outline seems to solve if issues but verify calls broken
      - Referencing wrong element now instead of output of correct if block?
      - Need to determine proper output through verify tests.
      - Modified protobuf to handle case of extra 1 to "vectorize" scalar
      - Modified verify/tests to get things to "work", may need to be revised further.
      ea2d51bf
  8. 07 Oct, 2022 1 commit
    • Ted Themistokleous's avatar
      Get empty shapes working for parse_IF operator · abd3d63e
      Ted Themistokleous authored
      - Update if_then/else_empty test protobuff and cases
      - Need to update rand() vector used
      - Make y empty instead of x for if_else_empty_test.onnx
      - Regenerate protobufs with updates
      - Add changes to handle empty/scalar input branch size to if operator.
      - Add case where if both branches empty throw an error.
      - Update verify tests with gold vectors and new shapes for empty input vec
        which we handle like a scalar before broadcasting
      abd3d63e
  9. 05 Oct, 2022 1 commit
    • Ted Themistokleous's avatar
      Add test files, protobufs and verification tests that capture errors with IF operator · 7c8c3bee
      Ted Themistokleous authored
      - Verification tests that test each then/else branches for parsed IF operator
      - Testing empty shape tensors for one branch -> output must be the other branch's shape
      - Testing trailing 1 shape for one branch -> output must be union of both inputs
      
      Current issue with IF operator is that we can't handle training vectors that match
      in size correclty while also running into issues with empty inputs for one of the
      branches for size/type checks.
      7c8c3bee
  10. 26 Sep, 2022 1 commit
    • Charlie Lin's avatar
      Rewrite ONNX parse batch norm (#1362) · c00f8202
      Charlie Lin authored
      Rewrites the BatchNormalization ONNX operator into other MIGX operators
      - Added handling of 1D input tensor case (edge case in ONNX spec)
      Removes the spatial and per_activation functionality (not in the ONNX spec)
      - Did not remove the batch_norm_inference related code as the TensorFlow parser still uses it
      - Can remove that code when the TF version is updated
      c00f8202
  11. 08 Sep, 2022 1 commit
  12. 23 Aug, 2022 1 commit
    • Charlie Lin's avatar
      Dynamic ref NMS (#1288) · fa3c21fa
      Charlie Lin authored
      Has NMS op output a dynamic shape (ONNX spec behavior)
      Allows for dynamic input shape to NMS op
      fa3c21fa
  13. 12 Aug, 2022 1 commit
  14. 08 Aug, 2022 1 commit
    • Ted Themistokleous's avatar
      Imply type of literal returned based on input protobuff for zero elem… (#1326) · bb0e04ce
      Ted Themistokleous authored
      * Imply type of literal returned based on input protobuff for zero element constant values.
      
      This saves us the default behavior as the onnx parsing assumes that every zero value is float. This way we're still grabbing relevant type information from the protobuff instead and wont fail our data type checks for if them/else blocks from onnx
      
      * Revert "Imply type of literal returned based on input protobuff for zero element constant values."
      
      This reverts commit 390bb853
      
      .
      
      * Add  test case to parse in empty constant int64 proto buffer
      
      I think the previous test case was aliasing an issue where we default to float but need to actually read in int64 instead of int32
      
      * fixup! Add  test case to parse in empty constant int64 proto buffer
      
      * Add test for non empty int64 scalar
      
      Add one item in the np array to use for the constant we're parsing in.
      
      * Draft partial fix
      
      * Fix test failures from previous change to read in protobuf data types correctly for empty constants.
      
      Instead of assuming things are empty and thus we default to float, reading in the correct types broke some assumptions code was using for an empty literal.
      
      * Fix formatting and naming
      
      * Fix naming with var in constant_one_val_int64_test
      Co-authored-by: default avatarcharlie <charlie.lin@amd.com>
      Co-authored-by: default avatarkahmed10 <15948690+kahmed10@users.noreply.github.com>
      bb0e04ce
  15. 04 Aug, 2022 1 commit
    • Charlie Lin's avatar
      Dynamic ref convolution op (#1224) · 67f77ac1
      Charlie Lin authored
      
      
      * Dynamic shape handling in shape object
      
      * rewrite empty lens multibroadcast test
      
      * Shape class changes to handle dynamic
      * More throw errors for functions that don't make sense for dynamic shape
      * Print output changes
      * Serialization changes
      
      * Fixing serialization errors
      
      * Remove const on dyn_dim copy getters
      
      * Dynamic shape tests
      
      * Fix serialize errors
      
      * Add dyn_data struct to avoid ambiguous constructor
      
      * Tidy fix: emplace_back() over for loop
      
      * Tidy fix: use move
      
      * Use std::initializer_list in constructor
      Reverts the dyn_data struct change
      Should get around the ambiguous braced initialization list error
      
      * avoid typedef
      
      * element_space, min,max,opt _lens change
      
      * formatting
      
      * Comments fix
      
      * dynamic bytes() test
      
      * Seralize and reflect changes
      
      * formatting
      
      * Test the dynamic lens functions
      
      * progress
      
      * Formatting
      
      * Dynamic conv draft progress
      
      * Add operator<< tests for coverage
      
      * Coverage update
      
      * Add to conv dynamic batch test
      
      * Dynamic image size test
      
      * Dynamic weight handling
      
      * Dyn image shape test change, fix dyn weight cond
      
      * Comment update
      
      * Dynamic weights shape test and fix
      
      * Use ternary operator
      
      * Tidy fixes
      
      * Handle dynamic graph input shapes in ONNX parser
      
      * Formatting
      
      * Handle dynamic shape for convolution
      
      * formatting
      
      * cppcheck fixes
      
      * Add onnx test files
      
      * Fix typo
      
      * Disable auto_pad for dynamic input shape
      
      * check_shapes object checks for allowing dynamic shapes
      
      * Fix any_of
      
      * Change to maintain const objectness
      
      * Formatting
      
      * Check shapes allow dynamic
      
      * Refactor compute_shape() call into op.compute()
      Allows for per operator differences with handling dynamic shape
      Fix operation.hpp change to use the generator
      
      * Comment fix
      
      * Refactor normalize_attributes() calls to use max_lens()
      
      * Comment addition
      
      * Update other normalize_attributes() calls
      
      * Change to using constructor and add tests
      
      * Use const member function
      
      * Add more dynamic shape support
      
      * Add tests for error code coverage
      
      * Fix opt shape bug and add shape tests
      
      * capture all by ref
      
      * Fix typo with img shape calculation
      
      * Add more tests
      
      * dynamic auto pad attempt
      Linker error with pad_calc.cpp
      
      * Fix parse dyn auto_pad
      Should only need to use dynamic auto pad when the image shape or kernel
      shape are dynamic. For a dynamic batch size, the auto pad calculation is
      the same.
      
      * Fix linking error
      
      * Fix auto_pad bug
      Fixed input tensor with auto_pad setting on
      
      * auto_pad onnx tests
      
      * Fix auto_pad calculation, evaluate in ref_conv
      add ref_ops tests
      
      * Add shape tests, fix bugs
      
      * Refactor first two output dynamic len calculation
      
      * Conv MLIR test update
      
      * i64 MLIR test fix
      
      * Fix MLIR test typo
      Co-authored-by: default avatarChris Austen <causten@users.noreply.github.com>
      67f77ac1
  16. 27 Jul, 2022 1 commit
  17. 25 Jul, 2022 1 commit
    • Ted Themistokleous's avatar
      Add onnx mod operator (#1302) · 77e80b8e
      Ted Themistokleous authored
      * Add in changes for onnx Mod operator
      
      Initial operator for mod implementation and test cases for integer and floating based types.
      
      Need to use fmod from stdlib for floating point types. half_float::half thankfully is specced to the use the existing std::fmod() call when looking at the half.hpp implementation.
      
      fmod_flag should mirror the onnx fmod attribute. Right now using a floating point type without setting that on the user side to true will result in an exception.
      
      Ref ticket #1283 
      77e80b8e
  18. 19 Jul, 2022 1 commit
  19. 15 Jul, 2022 1 commit
  20. 22 Jun, 2022 1 commit
  21. 26 May, 2022 1 commit
  22. 24 May, 2022 1 commit
    • shivadbhavsar's avatar
      Fix onnx mean parsing for integral inputs (#1209) · d895104a
      shivadbhavsar authored
      As described in #1196, the ONNX mean parser does not work correctly for integral types. This update fixes the issue by handling integral types separately, where summation is performed before division. Additional test cases have also been added for handling integral types.
      d895104a
  23. 29 Apr, 2022 1 commit
  24. 23 Apr, 2022 1 commit
    • Charlie Lin's avatar
      ReverseSequence op (#1177) · 31906785
      Charlie Lin authored
      Implements the ReverseSequence ONNX operator as a parser.
      
      This parser can only handle a constant sequence_lens input. This is the same as what is handled for TensorRT as far as I can tell.
      We could handle a variable sequence_lens input; that would require ref and GPU implementations of the operator.
      The ONNX backend tests are disabled because this does not handle variable sequence_lens.
      31906785
  25. 19 Apr, 2022 1 commit
    • Charlie Lin's avatar
      Refactor Pooling and implement ONNX LpPool and GlobalLpPool (#1152) · 764273e4
      Charlie Lin authored
      Refactored the reference implementation of pooling to something like what was done for roialign. Moved the reference implementation of pooling from targets/ref/lowering.cpp to pooling.hpp.
      Removed cpu_pooling, instead using reference pooling in pooling.hpp
      Added reference implementation of Lp Norm pooling and the global version
      Added tests for the Lp Norm Pooling
      764273e4
  26. 11 Apr, 2022 1 commit
    • bpickrel's avatar
      scatter operator refactoring to include reduction (#1124) · 701c2014
      bpickrel authored
      Change the "scatter" struct and op to a base/child set of three: scatter_none, scatter_add, scatter_mul to mirror Onnx' ScatterElements op. and its three reduction options. (Onnx Scatter op is deprecated and is equivalent to scatter_none.)
      
      Provides both a reference op. and update to Onnx parsing. Tests updated and new test case added.
      701c2014
  27. 21 Mar, 2022 1 commit
  28. 09 Mar, 2022 1 commit
  29. 08 Mar, 2022 1 commit
  30. 07 Mar, 2022 1 commit
  31. 04 Mar, 2022 2 commits
  32. 03 Mar, 2022 1 commit