1. 26 May, 2023 1 commit
    • Ted Themistokleous's avatar
      Fix Nonzero to track data value with sentinel value based on elements · c930d79a
      Ted Themistokleous authored
      
      
      We can't change the behaviour of the nonzero op and we currently pad the output
      with zeros. This unfortunately obfuscates the following cases:
      
      1. When the only nonzero element is the first index - the whole tensor is padded
      with zeros its not obvious if the first value is valid index or padded
      
      2. When the nonzero elements vector is used for indicies. The resulting vector
         with the padded value of 0 is still a valid index thus gather/gatherND and other ops
         will assume the 0 index is valid and operate accordingly.
      
      In this case, by adding a sentinel value of the number of static elements used
      by the desired shape, the resulting nonzero output can now track how many elements
      are valid by determining the value in the correct range.
      
      Originally I intended to use -1 but not all datatypes use this if say, we're dealing with
      unsigned values in our vectors or booleans.
      Signed-off-by: default avatarTed Themistokleous <ted.themistokleous@amd.com>
      c930d79a
  2. 22 Jun, 2022 1 commit
  3. 02 Mar, 2022 1 commit
  4. 08 Oct, 2021 1 commit