Does it have to be 1.4 or 1.5?

Here is an example, not sure if it is in 1.5 or 1.6

  
      github.com
  
  
    pytorch/pytorch/blob/8094228f26cdef24529bffadd6a6e43b56df2d6e/torch/csrc/jit/runtime/register_prim_ops_fulljit.cpp#L674 1

// round((x_e + x_r)/2)*2 = x_e + round(x_r/2)*2, where x_e is an even integer,
// x_r is either 0.5 of 1.5, round(x_r/2)*2 results a 0 or 2, so the final
// result will always be a even number. Due to symmetricity, it also applies to
// negative cases.
double round_to_even(double a) {
  // NOLINTNEXTLINE(cppcoreguidelines-avoid-magic-numbers)
  return a - std::floor(a) == 0.5 ? (std::round(a * 0.5) * 2.0) : std::round(a);
}

RegisterOperators reg2({
    // registered as Any[] so that heterogenous tuples can be called with len()
    Operator(
        "aten::len.any(Any[] a) -> int",
        listLen,
        aliasAnalysisFromSchema()),

// these ops have a specialized implementation for the list element type
#define CREATE_SPECIALIZED_LIST_OPS(decl_type, value_type) \
  Operator(                                                \
      "aten::remove." decl_type "(" decl_type              \
      "[](a!) self,                                                           \



  
  
    
    
  
  



I think it can be heterogenous. Indeed it is not a common use case though, let us know if you hit any rough edges.