1. 15 Jun, 2023 1 commit
    • Brian Pickrell's avatar
      fix parse_instancenorm to create broadcast and multibroadcast instruc… (#1715) · 41ba30d5
      Brian Pickrell authored
      * fix parse_instancenorm to create broadcast and multibroadcast instructions with two dynamic shape arguments instead of 1.  Their make_op() functions don't support dynamic shapes when called with one input.  This caused an error when parsing an ONNX 3duunet model
      
      * Use add_common_op() to create multibroadcast op.
      
      * add verification and parsing test for instance_norm with dynamic input.  Parse test doesn't pass.
      
      * fix for test; still doesn't pass
      
      * another fix for test; still doesn't pass
      
      * work in progress, instance_norm_dyn_batch_test works but instance_norm_test doesn't
      
      * fix onnx instancenorm tests to match parser changes.  Passes all check tests
      
      * Updated comments explaining usage of add_common_op()
      
      * hand-merged conflicts with develop
      
      * fix instance_norm_half_test after merge
      
      * add Onnx test instance_norm_dyn_batch_half_test
      
      * add shape test cases broadcast_1in_dyn_error and multibroadcast_1in_dyn_error_0
      41ba30d5
  2. 01 Jun, 2023 1 commit
  3. 17 Apr, 2023 1 commit
  4. 04 Apr, 2023 1 commit
    • Charlie Lin's avatar
      Refactor dynamic_dimension to have multiple optimals (#1625) · e7ec374f
      Charlie Lin authored
      Makes the optimals into a std::set<std::size_t>
      Changes shape object functions to handle the opts change
      Changes to convolution, flatten, pooling, and convolution in that they no longer calculate the output optimal dimensions. Instead returns empty opts. Will need to change this in the future if we want to support dynamic shapes fully.
      Many changes to tests and shape calls with respect to the new optimals
      e7ec374f
  5. 03 Apr, 2023 1 commit
  6. 15 Feb, 2023 1 commit
    • Brian Pickrell's avatar
      Dyn slice (#1503) · 102c6bdb
      Brian Pickrell authored
      Add dynamic shape support to slice operator.
      
      First draft of this feature doesn't support ops slicing non-fixed, dynamic axes. Resulting shape in such cases is not guaranteed.* Also, onnx parsing doesn't support any arguments other than "axes".
      102c6bdb
  7. 11 Feb, 2023 1 commit
  8. 10 Feb, 2023 1 commit
  9. 03 Feb, 2023 1 commit
  10. 02 Feb, 2023 1 commit
  11. 01 Feb, 2023 1 commit
    • Ted Themistokleous's avatar
      Parse if inline constant args (#1533) · ca15cd37
      Ted Themistokleous authored
      Allows migraphx to inline the IF operator when we run into an IF that can be evaluated at compile time, thus avoiding us injecting IF and just inserting the instructions directly.
      ca15cd37
  12. 30 Jan, 2023 1 commit
  13. 24 Jan, 2023 1 commit
  14. 21 Jan, 2023 1 commit
  15. 17 Jan, 2023 2 commits
    • Charlie Lin's avatar
      Dynamic ONNX Gemm (#1459) · 8b651eee
      Charlie Lin authored
      Extends ONNX Gemm parser to handle dynamic input shapes
      Limits ONNX Gemm parsing to 2D input tensors for A and B inputs
      As per the ONNX specifications
      Changed Gemm ONNX tests to 2D input versions
      Add onnx_verify tests for Gemm
      Parsing ONNX Gemm links to more than one operator, checking that it produces the correct result
      8b651eee
    • Charlie Lin's avatar
      Dynamic ref pad (#1487) · 8202e411
      Charlie Lin authored
      Extends pad operator to handle dynamic input shapes
      Only handles computing the shape for adding constant padding to a dynamic shape
      - adds the padding to the min, max, and opt values (unless opt is 0, where it keeps it 0)
      - does not handle reflect padding with dynamic shapes
      8202e411
  16. 13 Jan, 2023 1 commit
    • Charlie Lin's avatar
      Dynamic ONNX Matmul (#1466) · 1eb5a1d4
      Charlie Lin authored
      Extends parse_matmul.hpp to handle dynamic input shapes
      Does not support broadcasting of the outer dimensions for dynamic shapes at this time
      1eb5a1d4
  17. 11 Jan, 2023 1 commit
  18. 04 Jan, 2023 1 commit
  19. 13 Dec, 2022 1 commit
  20. 08 Dec, 2022 2 commits
  21. 07 Dec, 2022 1 commit
  22. 06 Dec, 2022 1 commit
  23. 02 Dec, 2022 1 commit
    • Charlie Lin's avatar
      Dynamic ref pooling (#1449) · 0e40ebaa
      Charlie Lin authored
      Extends the pooling operators for dynamic shape inputs
      
      AveragePooling
      GlobalAveragePooling
      MaxPooling
      GlobalMaxPooling
      LpNormPooling
      GlobalLpNormPooling
      y.github.com>
      0e40ebaa
  24. 28 Nov, 2022 1 commit
  25. 13 Nov, 2022 1 commit
    • Charlie Lin's avatar
      Dyn ref multibroadcast; dyn binary (#1423) · d73c6d7c
      Charlie Lin authored
      Updated Multibroadcast op to have a two input version for dynamic shapes
      Current dynamic shape broadcasting logic
      dynamic_dimensions must be the same or one of them is {1, 1, 0} or {1, 1, 1}
      Works for dyn-dyn, dyn-static, and static-static shape combinations
      Changed common.cpp for multibroadcasting for binary ops with dynamic shapes
      Extended binary.hpp for dynamic shapes to test the new common.cpp stuff
      d73c6d7c
  26. 01 Nov, 2022 1 commit
  27. 27 Oct, 2022 1 commit
  28. 19 Oct, 2022 1 commit
    • Charlie Lin's avatar
      Refactor dynamic compute; Dynamic ref unary functions (#1407) · 693cb5d8
      Charlie Lin authored
      Refactor dynamic compute
      - add a compute_output_shape object that implicitly converts to a new dyn_output or shape object
      - dyn_output object can handle computing the static output shape of an operator given the input arguments shapes
        change an operator's compute function to argument compute(const dyn_output& dyn_out, std::vector<argument> args) to 
        use dyn_output object
      
      Dynamic ref unary functions
      -  Included these changes to have an example of the refactored dynamic compute being used
      -  Changes to unary base class to handle dynamic shapes
      -  Changed elu and leaky_relu to use unary base class and pointwise JIT
      693cb5d8
  29. 14 Oct, 2022 1 commit
  30. 13 Oct, 2022 1 commit
    • Charlie Lin's avatar
      Refactor dynamic padding mode (#1387) · 32f6388c
      Charlie Lin authored
      Removes use_dynamic_same_auto_pad
      Change padding_mode to be used for dynamic padding
      Move compute_padded_shape to pad_calc.cpp as it will be used in other dynamic padding cases
      Fix same_lower compute_padded_shape bug and add a test.
      32f6388c
  31. 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
  32. 08 Sep, 2022 1 commit
  33. 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
  34. 12 Aug, 2022 1 commit
  35. 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
  36. 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
  37. 27 Jul, 2022 1 commit
  38. 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