- 13 Nov, 2022 1 commit
-
-
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
-
- 10 Nov, 2022 2 commits
-
-
Ted Themistokleous authored
fix comment for sub graph throw Co-authored-by:kahmed10 <15948690+kahmed10@users.noreply.github.com>
-
Ted Themistokleous authored
Just grab the last output from the non empty branch and use the identity operator to get the proper shape for the output branch. In the case of an empty branch (empty tensor, of some type) this tends to mean "Do nothing" so we're folding the output of the other flow branch here, and thus if somehow, we do reach this at eval, should throw an error signalling either one of two things 1. Onnx model is invalid 2. The model has run into an error condition with its control flow. Since IF is an odd operator that can adjust axes, and other operators in a data driven fashion, this would serve as a check at compile and or/runtime.
-
- 04 Nov, 2022 2 commits
-
-
Ted Themistokleous authored
-
Ted Themistokleous authored
Change things in the test cases so that we're not just replicating what the code does but use add_instruction to dictate what we should expect for the output of fixing empty const cases. Had to also switch an insert to add of a literal in the empty case to achieve this in parse_if as well. Moved the return instructions to the end of each subgraph to also fix readability of each test.
-
- 02 Nov, 2022 1 commit
-
-
Ted Themistokleous authored
Default to smaller dimension with trailing 1 case instead of unsqueezing to the larger dimension. More analysis on other networks concludes that when putting in two operands to and IF block, the output should take the smaller of the shapes instead of the larger Modified tests in onnx_test.cpp to parse to the correct output as well.
-
- 01 Nov, 2022 1 commit
-
-
Ted Themistokleous authored
Newer split moves the split attribute to an input. In this case we check the number of input args then.
-
- 28 Oct, 2022 2 commits
-
-
Ted Themistokleous authored
-
Ted Themistokleous authored
-
- 27 Oct, 2022 1 commit
-
-
Chris Austen authored
Upgraded Dockerfiles and fixed tidy issues to make Ubuntu 20.04 and ROCm 5.3.0 the default
-
- 26 Oct, 2022 1 commit
-
-
Ted Themistokleous authored
Newer split moves the split attribute to an input. In this case we check the number of input args then. This changes allows us to move the accumulte check to outside each conditional branch Added more debug on this as well to show more details on this failure mode. Adds an additional test case using a generated split-13 operator styled test.
-
- 21 Oct, 2022 1 commit
-
-
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
-
- 18 Oct, 2022 2 commits
-
-
Ted Themistokleous authored
outline seems to be bugged, and going to be depreciated, thus switching to creating a new literal with the proper shape for the empty output branch.
-
Ted Themistokleous authored
-make all_but_last_dims_equal func instead of lambda -rename dim_delta -> rank_delta -make unsqueeze_last_op func instead of lambda -Handle multi output cases of changing output instructions -capture shape at each output shape at start of loop via .at() operator -replace instances of && with and
-
- 17 Oct, 2022 1 commit
-
-
Ted Themistokleous authored
- Handle checks for each IF output - add const to inputs of all_but_last_dims_equal - add std::equal instead of using equal - Use .back() for vectors in getting last value - Use input().front() instead of prev(prev()) when replacing the last value.
-
- 15 Oct, 2022 1 commit
-
-
Ted Themistokleous authored
-
- 14 Oct, 2022 5 commits
-
-
Ted Themistokleous authored
-
Ted Themistokleous authored
Check which shape is larger and adjust the check using equals so we never have the option of going out of range with different sizes outside of the smaller vector.
-
Ted Themistokleous authored
- rename then/else_shapes -> then/else_lens - change assert for shape size to reusing throw() - return lengths in handle_empty_branch - use handle_empty_branch return value for lens update - use std::prev() instead of predecriment operator for modifying nodes
-
Charlie Lin authored
Allows for rank 2 tensors into batchnorm. Specifically when spatial dimensions are all 1 and removed
-
Ted Themistokleous authored
Outline of an empty branch is correct typically seen if we parse in an empty constant for the other side of the if then/else onnx logic. Need to do this to match shape even though the other branch is just empty.
-
- 13 Oct, 2022 4 commits
-
-
Ted Themistokleous authored
Just clean up the logic on this so we're not 5 levels deep on ifs.
-
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.
-
Ted Themistokleous authored
- use empty() instead of size() == 0 for checking each condition - Make each branch a lambda instead of repeating code.
-
Ted Themistokleous authored
Fixes cases for trailing one testcases
-
- 12 Oct, 2022 2 commits
-
-
Ted Themistokleous authored
This makes sure we're getting the correct output value of the branch if an empty shape is given as a parameter to the IF operand.
-
Ted Themistokleous authored
-
- 08 Oct, 2022 1 commit
-
-
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.
-
- 07 Oct, 2022 1 commit
-
-
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
-
- 04 Oct, 2022 10 commits
-
-
Ted Themistokleous authored
Still busted work in prgoress. Keep running into terminate called after throwing an instance of 'migraphx::version_1::exception' what(): /code/AMDMIGraphX/src/normalize_attributes.cpp:91: tune_attribute: TUNE_VECTOR: value out of range! Aborted (core dumped)
-
Ted Themistokleous authored
-
Ted Themistokleous authored
-
Ted Themistokleous authored
Comming back to this once I've fixed parse_constant, looks like unallocated empty literals break this right now.
-
Ted Themistokleous authored
Need to have this to force the output to be a compatible to both the else/then cases Still a work in progress
-
Ted Themistokleous authored
Need to handle static shapes explicitly since onnx says we should be able to just output a compatible output type.
-
Ted Themistokleous authored
-
Ted Themistokleous authored
-
Ted Themistokleous authored
-
Ted Themistokleous authored
The onnx spec mentions that the output shape of the resulting then/else branches must share the same type, but not the same shape. The only requirement is that the first dimension is compatible should one of the inputs have rank of one. Without this we prematurely assert when an if is requred on the following case int64, {1234, 1} (this is a 1 rank tensor) int64, {1234} (this result is scalar)
-
- 26 Sep, 2022 1 commit
-
-
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
-