CastLike - version 15#

This page documents version 15 of operator CastLike. See CastLike for the latest version (since version 25).

  • Domain: ai.onnx

  • Since version: 15

The operator casts the elements of a given input tensor (the first input) to the same data type as the elements of the second input tensor. See documentation of the Cast operator for further details.

Inputs

  • input (T1): Input tensor to be cast.

  • target_type (T2): The (first) input tensor will be cast to produce a tensor of the same type as this (second input) tensor.

Outputs

  • output (T2): Output tensor produced by casting the first input tensor to have the same type as the second input tensor.

Type Constraints

  • T1: Constrain input types. Casting from complex is not supported. Allowed types: tensor(bfloat16), tensor(bool), tensor(double), tensor(float), tensor(float16), tensor(int16), tensor(int32), tensor(int64), tensor(int8), tensor(string), tensor(uint16), tensor(uint32), tensor(uint64), tensor(uint8).

  • T2: Constrain output types. Casting to complex is not supported. Allowed types: tensor(bfloat16), tensor(bool), tensor(double), tensor(float), tensor(float16), tensor(int16), tensor(int32), tensor(int64), tensor(int8), tensor(string), tensor(uint16), tensor(uint32), tensor(uint64), tensor(uint8).

Examples#

test_cc_castlike_BFLOAT16_to_BOOL

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=bfloat16
    [-3, 0, 7, 42]
  target_type: shape=(1,), dtype=bool
    [False]

Outputs:
  output: shape=(4,), dtype=bool
    [ True, False,  True,  True]

test_cc_castlike_BFLOAT16_to_DOUBLE

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=bfloat16
    [-3, 0, 7, 42]
  target_type: shape=(1,), dtype=float64
    [0.]

Outputs:
  output: shape=(4,), dtype=float64
    [-3.,  0.,  7., 42.]

test_cc_castlike_BFLOAT16_to_FLOAT

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=bfloat16
    [-3, 0, 7, 42]
  target_type: shape=(1,), dtype=float32
    [0.]

Outputs:
  output: shape=(4,), dtype=float32
    [-3.,  0.,  7., 42.]

test_cc_castlike_BFLOAT16_to_FLOAT16

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=bfloat16
    [-3, 0, 7, 42]
  target_type: shape=(1,), dtype=float16
    [0.]

Outputs:
  output: shape=(4,), dtype=float16
    [-3.,  0.,  7., 42.]

test_cc_castlike_BFLOAT16_to_INT16

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=bfloat16
    [-3, 0, 7, 42]
  target_type: shape=(1,), dtype=int16
    [0]

Outputs:
  output: shape=(4,), dtype=int16
    [-3,  0,  7, 42]

test_cc_castlike_BFLOAT16_to_INT32

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=bfloat16
    [-3, 0, 7, 42]
  target_type: shape=(1,), dtype=int32
    [0]

Outputs:
  output: shape=(4,), dtype=int32
    [-3,  0,  7, 42]

test_cc_castlike_BFLOAT16_to_INT64

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=bfloat16
    [-3, 0, 7, 42]
  target_type: shape=(1,), dtype=int64
    [0]

Outputs:
  output: shape=(4,), dtype=int64
    [-3,  0,  7, 42]

test_cc_castlike_BFLOAT16_to_INT8

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=bfloat16
    [-3, 0, 7, 42]
  target_type: shape=(1,), dtype=int8
    [0]

Outputs:
  output: shape=(4,), dtype=int8
    [-3,  0,  7, 42]

test_cc_castlike_BFLOAT16_to_STRING

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=bfloat16
    [-3, 0, 7, 42]
  target_type: shape=(1,), dtype=object
    ['']

Outputs:
  output: shape=(4,), dtype=object
    ['-3', '0', '7', '42']

test_cc_castlike_BFLOAT16_to_UINT16

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=bfloat16
    [-3, 0, 7, 42]
  target_type: shape=(1,), dtype=uint16
    [0]

Outputs:
  output: shape=(4,), dtype=uint16
    [65533,     0,     7,    42]

test_cc_castlike_BFLOAT16_to_UINT8

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=bfloat16
    [-3, 0, 7, 42]
  target_type: shape=(1,), dtype=uint8
    [0]

Outputs:
  output: shape=(4,), dtype=uint8
    [253,   0,   7,  42]

test_cc_castlike_BOOL_to_BFLOAT16

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=bool
    [False,  True,  True, False]
  target_type: shape=(1,), dtype=bfloat16
    [0]

Outputs:
  output: shape=(4,), dtype=bfloat16
    [0, 1, 1, 0]

test_cc_castlike_BOOL_to_DOUBLE

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=bool
    [False,  True,  True, False]
  target_type: shape=(1,), dtype=float64
    [0.]

Outputs:
  output: shape=(4,), dtype=float64
    [0., 1., 1., 0.]

test_cc_castlike_BOOL_to_FLOAT

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=bool
    [False,  True,  True, False]
  target_type: shape=(1,), dtype=float32
    [0.]

Outputs:
  output: shape=(4,), dtype=float32
    [0., 1., 1., 0.]

test_cc_castlike_BOOL_to_FLOAT16

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=bool
    [False,  True,  True, False]
  target_type: shape=(1,), dtype=float16
    [0.]

Outputs:
  output: shape=(4,), dtype=float16
    [0., 1., 1., 0.]

test_cc_castlike_BOOL_to_INT16

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=bool
    [False,  True,  True, False]
  target_type: shape=(1,), dtype=int16
    [0]

Outputs:
  output: shape=(4,), dtype=int16
    [0, 1, 1, 0]

test_cc_castlike_BOOL_to_INT32

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=bool
    [False,  True,  True, False]
  target_type: shape=(1,), dtype=int32
    [0]

Outputs:
  output: shape=(4,), dtype=int32
    [0, 1, 1, 0]

test_cc_castlike_BOOL_to_INT64

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=bool
    [False,  True,  True, False]
  target_type: shape=(1,), dtype=int64
    [0]

Outputs:
  output: shape=(4,), dtype=int64
    [0, 1, 1, 0]

test_cc_castlike_BOOL_to_INT8

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=bool
    [False,  True,  True, False]
  target_type: shape=(1,), dtype=int8
    [0]

Outputs:
  output: shape=(4,), dtype=int8
    [0, 1, 1, 0]

test_cc_castlike_BOOL_to_STRING

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=bool
    [False,  True,  True, False]
  target_type: shape=(1,), dtype=object
    ['']

Outputs:
  output: shape=(4,), dtype=object
    ['0', '1', '1', '0']

test_cc_castlike_BOOL_to_UINT16

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=bool
    [False,  True,  True, False]
  target_type: shape=(1,), dtype=uint16
    [0]

Outputs:
  output: shape=(4,), dtype=uint16
    [0, 1, 1, 0]

test_cc_castlike_BOOL_to_UINT8

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=bool
    [False,  True,  True, False]
  target_type: shape=(1,), dtype=uint8
    [0]

Outputs:
  output: shape=(4,), dtype=uint8
    [0, 1, 1, 0]

test_cc_castlike_DOUBLE_to_BFLOAT16

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=float64
    [-1.5 ,  0.  ,  2.75,  4.  ]
  target_type: shape=(1,), dtype=bfloat16
    [0]

Outputs:
  output: shape=(4,), dtype=bfloat16
    [-1.5, 0, 2.75, 4]

test_cc_castlike_DOUBLE_to_BOOL

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=float64
    [-1.5 ,  0.  ,  2.75,  4.  ]
  target_type: shape=(1,), dtype=bool
    [False]

Outputs:
  output: shape=(4,), dtype=bool
    [ True, False,  True,  True]

test_cc_castlike_DOUBLE_to_FLOAT

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=float64
    [-1.5 ,  0.  ,  2.75,  4.  ]
  target_type: shape=(1,), dtype=float32
    [0.]

Outputs:
  output: shape=(4,), dtype=float32
    [-1.5 ,  0.  ,  2.75,  4.  ]

test_cc_castlike_DOUBLE_to_FLOAT16

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=float64
    [-1.5 ,  0.  ,  2.75,  4.  ]
  target_type: shape=(1,), dtype=float16
    [0.]

Outputs:
  output: shape=(4,), dtype=float16
    [-1.5 ,  0.  ,  2.75,  4.  ]

test_cc_castlike_DOUBLE_to_INT16

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=float64
    [-1.5 ,  0.  ,  2.75,  4.  ]
  target_type: shape=(1,), dtype=int16
    [0]

Outputs:
  output: shape=(4,), dtype=int16
    [-1,  0,  2,  4]

test_cc_castlike_DOUBLE_to_INT32

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=float64
    [-1.5 ,  0.  ,  2.75,  4.  ]
  target_type: shape=(1,), dtype=int32
    [0]

Outputs:
  output: shape=(4,), dtype=int32
    [-1,  0,  2,  4]

test_cc_castlike_DOUBLE_to_INT64

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=float64
    [-1.5 ,  0.  ,  2.75,  4.  ]
  target_type: shape=(1,), dtype=int64
    [0]

Outputs:
  output: shape=(4,), dtype=int64
    [-1,  0,  2,  4]

test_cc_castlike_DOUBLE_to_INT8

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=float64
    [-1.5 ,  0.  ,  2.75,  4.  ]
  target_type: shape=(1,), dtype=int8
    [0]

Outputs:
  output: shape=(4,), dtype=int8
    [-1,  0,  2,  4]

test_cc_castlike_DOUBLE_to_STRING

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=float64
    [-1.5 ,  0.  ,  2.75,  4.  ]
  target_type: shape=(1,), dtype=object
    ['']

Outputs:
  output: shape=(4,), dtype=object
    ['-1.5', '0', '2.75', '4']

test_cc_castlike_DOUBLE_to_UINT16

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=float64
    [-1.5 ,  0.  ,  2.75,  4.  ]
  target_type: shape=(1,), dtype=uint16
    [0]

Outputs:
  output: shape=(4,), dtype=uint16
    [65535,     0,     2,     4]

test_cc_castlike_DOUBLE_to_UINT8

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=float64
    [-1.5 ,  0.  ,  2.75,  4.  ]
  target_type: shape=(1,), dtype=uint8
    [0]

Outputs:
  output: shape=(4,), dtype=uint8
    [255,   0,   2,   4]

test_cc_castlike_FLOAT16_to_BFLOAT16

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=float16
    [-1.5 ,  0.  ,  2.75,  4.  ]
  target_type: shape=(1,), dtype=bfloat16
    [0]

Outputs:
  output: shape=(4,), dtype=bfloat16
    [-1.5, 0, 2.75, 4]

test_cc_castlike_FLOAT16_to_BOOL

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=float16
    [-1.5 ,  0.  ,  2.75,  4.  ]
  target_type: shape=(1,), dtype=bool
    [False]

Outputs:
  output: shape=(4,), dtype=bool
    [ True, False,  True,  True]

test_cc_castlike_FLOAT16_to_DOUBLE

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=float16
    [-1.5 ,  0.  ,  2.75,  4.  ]
  target_type: shape=(1,), dtype=float64
    [0.]

Outputs:
  output: shape=(4,), dtype=float64
    [-1.5 ,  0.  ,  2.75,  4.  ]

test_cc_castlike_FLOAT16_to_FLOAT

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=float16
    [-1.5 ,  0.  ,  2.75,  4.  ]
  target_type: shape=(1,), dtype=float32
    [0.]

Outputs:
  output: shape=(4,), dtype=float32
    [-1.5 ,  0.  ,  2.75,  4.  ]

test_cc_castlike_FLOAT16_to_INT16

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=float16
    [-1.5 ,  0.  ,  2.75,  4.  ]
  target_type: shape=(1,), dtype=int16
    [0]

Outputs:
  output: shape=(4,), dtype=int16
    [-1,  0,  2,  4]

test_cc_castlike_FLOAT16_to_INT32

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=float16
    [-1.5 ,  0.  ,  2.75,  4.  ]
  target_type: shape=(1,), dtype=int32
    [0]

Outputs:
  output: shape=(4,), dtype=int32
    [-1,  0,  2,  4]

test_cc_castlike_FLOAT16_to_INT64

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=float16
    [-1.5 ,  0.  ,  2.75,  4.  ]
  target_type: shape=(1,), dtype=int64
    [0]

Outputs:
  output: shape=(4,), dtype=int64
    [-1,  0,  2,  4]

test_cc_castlike_FLOAT16_to_INT8

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=float16
    [-1.5 ,  0.  ,  2.75,  4.  ]
  target_type: shape=(1,), dtype=int8
    [0]

Outputs:
  output: shape=(4,), dtype=int8
    [-1,  0,  2,  4]

test_cc_castlike_FLOAT16_to_STRING

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=float16
    [-1.5 ,  0.  ,  2.75,  4.  ]
  target_type: shape=(1,), dtype=object
    ['']

Outputs:
  output: shape=(4,), dtype=object
    ['-1.5', '0', '2.75', '4']

test_cc_castlike_FLOAT16_to_UINT16

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=float16
    [-1.5 ,  0.  ,  2.75,  4.  ]
  target_type: shape=(1,), dtype=uint16
    [0]

Outputs:
  output: shape=(4,), dtype=uint16
    [65535,     0,     2,     4]

test_cc_castlike_FLOAT16_to_UINT8

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=float16
    [-1.5 ,  0.  ,  2.75,  4.  ]
  target_type: shape=(1,), dtype=uint8
    [0]

Outputs:
  output: shape=(4,), dtype=uint8
    [255,   0,   2,   4]

test_cc_castlike_FLOAT_to_BFLOAT16

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=float32
    [-1.5 ,  0.  ,  2.75,  4.  ]
  target_type: shape=(1,), dtype=bfloat16
    [0]

Outputs:
  output: shape=(4,), dtype=bfloat16
    [-1.5, 0, 2.75, 4]

test_cc_castlike_FLOAT_to_BOOL

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=float32
    [-1.5 ,  0.  ,  2.75,  4.  ]
  target_type: shape=(1,), dtype=bool
    [False]

Outputs:
  output: shape=(4,), dtype=bool
    [ True, False,  True,  True]

test_cc_castlike_FLOAT_to_DOUBLE

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=float32
    [-1.5 ,  0.  ,  2.75,  4.  ]
  target_type: shape=(1,), dtype=float64
    [0.]

Outputs:
  output: shape=(4,), dtype=float64
    [-1.5 ,  0.  ,  2.75,  4.  ]

test_cc_castlike_FLOAT_to_FLOAT16

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=float32
    [-1.5 ,  0.  ,  2.75,  4.  ]
  target_type: shape=(1,), dtype=float16
    [0.]

Outputs:
  output: shape=(4,), dtype=float16
    [-1.5 ,  0.  ,  2.75,  4.  ]

test_cc_castlike_FLOAT_to_INT16

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=float32
    [-1.5 ,  0.  ,  2.75,  4.  ]
  target_type: shape=(1,), dtype=int16
    [0]

Outputs:
  output: shape=(4,), dtype=int16
    [-1,  0,  2,  4]

test_cc_castlike_FLOAT_to_INT32

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=float32
    [-1.5 ,  0.  ,  2.75,  4.  ]
  target_type: shape=(1,), dtype=int32
    [0]

Outputs:
  output: shape=(4,), dtype=int32
    [-1,  0,  2,  4]

test_cc_castlike_FLOAT_to_INT64

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=float32
    [-1.5 ,  0.  ,  2.75,  4.  ]
  target_type: shape=(1,), dtype=int64
    [0]

Outputs:
  output: shape=(4,), dtype=int64
    [-1,  0,  2,  4]

test_cc_castlike_FLOAT_to_INT8

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=float32
    [-1.5 ,  0.  ,  2.75,  4.  ]
  target_type: shape=(1,), dtype=int8
    [0]

Outputs:
  output: shape=(4,), dtype=int8
    [-1,  0,  2,  4]

test_cc_castlike_FLOAT_to_STRING

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=float32
    [-1.5 ,  0.  ,  2.75,  4.  ]
  target_type: shape=(1,), dtype=object
    ['']

Outputs:
  output: shape=(4,), dtype=object
    ['-1.5', '0', '2.75', '4']

test_cc_castlike_FLOAT_to_UINT16

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=float32
    [-1.5 ,  0.  ,  2.75,  4.  ]
  target_type: shape=(1,), dtype=uint16
    [0]

Outputs:
  output: shape=(4,), dtype=uint16
    [65535,     0,     2,     4]

test_cc_castlike_FLOAT_to_UINT8

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=float32
    [-1.5 ,  0.  ,  2.75,  4.  ]
  target_type: shape=(1,), dtype=uint8
    [0]

Outputs:
  output: shape=(4,), dtype=uint8
    [255,   0,   2,   4]

test_cc_castlike_INT16_to_BFLOAT16

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=int16
    [-3,  0,  7, 42]
  target_type: shape=(1,), dtype=bfloat16
    [0]

Outputs:
  output: shape=(4,), dtype=bfloat16
    [-3, 0, 7, 42]

test_cc_castlike_INT16_to_BOOL

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=int16
    [-3,  0,  7, 42]
  target_type: shape=(1,), dtype=bool
    [False]

Outputs:
  output: shape=(4,), dtype=bool
    [ True, False,  True,  True]

test_cc_castlike_INT16_to_DOUBLE

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=int16
    [-3,  0,  7, 42]
  target_type: shape=(1,), dtype=float64
    [0.]

Outputs:
  output: shape=(4,), dtype=float64
    [-3.,  0.,  7., 42.]

test_cc_castlike_INT16_to_FLOAT

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=int16
    [-3,  0,  7, 42]
  target_type: shape=(1,), dtype=float32
    [0.]

Outputs:
  output: shape=(4,), dtype=float32
    [-3.,  0.,  7., 42.]

test_cc_castlike_INT16_to_FLOAT16

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=int16
    [-3,  0,  7, 42]
  target_type: shape=(1,), dtype=float16
    [0.]

Outputs:
  output: shape=(4,), dtype=float16
    [-3.,  0.,  7., 42.]

test_cc_castlike_INT16_to_INT32

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=int16
    [-3,  0,  7, 42]
  target_type: shape=(1,), dtype=int32
    [0]

Outputs:
  output: shape=(4,), dtype=int32
    [-3,  0,  7, 42]

test_cc_castlike_INT16_to_INT64

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=int16
    [-3,  0,  7, 42]
  target_type: shape=(1,), dtype=int64
    [0]

Outputs:
  output: shape=(4,), dtype=int64
    [-3,  0,  7, 42]

test_cc_castlike_INT16_to_INT8

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=int16
    [-3,  0,  7, 42]
  target_type: shape=(1,), dtype=int8
    [0]

Outputs:
  output: shape=(4,), dtype=int8
    [-3,  0,  7, 42]

test_cc_castlike_INT16_to_STRING

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=int16
    [-3,  0,  7, 42]
  target_type: shape=(1,), dtype=object
    ['']

Outputs:
  output: shape=(4,), dtype=object
    ['-3', '0', '7', '42']

test_cc_castlike_INT16_to_UINT16

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=int16
    [-3,  0,  7, 42]
  target_type: shape=(1,), dtype=uint16
    [0]

Outputs:
  output: shape=(4,), dtype=uint16
    [65533,     0,     7,    42]

test_cc_castlike_INT16_to_UINT8

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=int16
    [-3,  0,  7, 42]
  target_type: shape=(1,), dtype=uint8
    [0]

Outputs:
  output: shape=(4,), dtype=uint8
    [253,   0,   7,  42]

test_cc_castlike_INT32_to_BFLOAT16

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=int32
    [-3,  0,  7, 42]
  target_type: shape=(1,), dtype=bfloat16
    [0]

Outputs:
  output: shape=(4,), dtype=bfloat16
    [-3, 0, 7, 42]

test_cc_castlike_INT32_to_BOOL

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=int32
    [-3,  0,  7, 42]
  target_type: shape=(1,), dtype=bool
    [False]

Outputs:
  output: shape=(4,), dtype=bool
    [ True, False,  True,  True]

test_cc_castlike_INT32_to_DOUBLE

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=int32
    [-3,  0,  7, 42]
  target_type: shape=(1,), dtype=float64
    [0.]

Outputs:
  output: shape=(4,), dtype=float64
    [-3.,  0.,  7., 42.]

test_cc_castlike_INT32_to_FLOAT

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=int32
    [-3,  0,  7, 42]
  target_type: shape=(1,), dtype=float32
    [0.]

Outputs:
  output: shape=(4,), dtype=float32
    [-3.,  0.,  7., 42.]

test_cc_castlike_INT32_to_FLOAT16

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=int32
    [-3,  0,  7, 42]
  target_type: shape=(1,), dtype=float16
    [0.]

Outputs:
  output: shape=(4,), dtype=float16
    [-3.,  0.,  7., 42.]

test_cc_castlike_INT32_to_INT16

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=int32
    [-3,  0,  7, 42]
  target_type: shape=(1,), dtype=int16
    [0]

Outputs:
  output: shape=(4,), dtype=int16
    [-3,  0,  7, 42]

test_cc_castlike_INT32_to_INT64

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=int32
    [-3,  0,  7, 42]
  target_type: shape=(1,), dtype=int64
    [0]

Outputs:
  output: shape=(4,), dtype=int64
    [-3,  0,  7, 42]

test_cc_castlike_INT32_to_INT8

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=int32
    [-3,  0,  7, 42]
  target_type: shape=(1,), dtype=int8
    [0]

Outputs:
  output: shape=(4,), dtype=int8
    [-3,  0,  7, 42]

test_cc_castlike_INT32_to_STRING

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=int32
    [-3,  0,  7, 42]
  target_type: shape=(1,), dtype=object
    ['']

Outputs:
  output: shape=(4,), dtype=object
    ['-3', '0', '7', '42']

test_cc_castlike_INT32_to_UINT16

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=int32
    [-3,  0,  7, 42]
  target_type: shape=(1,), dtype=uint16
    [0]

Outputs:
  output: shape=(4,), dtype=uint16
    [65533,     0,     7,    42]

test_cc_castlike_INT32_to_UINT8

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=int32
    [-3,  0,  7, 42]
  target_type: shape=(1,), dtype=uint8
    [0]

Outputs:
  output: shape=(4,), dtype=uint8
    [253,   0,   7,  42]

test_cc_castlike_INT64_to_BFLOAT16

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=int64
    [-3,  0,  7, 42]
  target_type: shape=(1,), dtype=bfloat16
    [0]

Outputs:
  output: shape=(4,), dtype=bfloat16
    [-3, 0, 7, 42]

test_cc_castlike_INT64_to_BOOL

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=int64
    [-3,  0,  7, 42]
  target_type: shape=(1,), dtype=bool
    [False]

Outputs:
  output: shape=(4,), dtype=bool
    [ True, False,  True,  True]

test_cc_castlike_INT64_to_DOUBLE

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=int64
    [-3,  0,  7, 42]
  target_type: shape=(1,), dtype=float64
    [0.]

Outputs:
  output: shape=(4,), dtype=float64
    [-3.,  0.,  7., 42.]

test_cc_castlike_INT64_to_FLOAT

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=int64
    [-3,  0,  7, 42]
  target_type: shape=(1,), dtype=float32
    [0.]

Outputs:
  output: shape=(4,), dtype=float32
    [-3.,  0.,  7., 42.]

test_cc_castlike_INT64_to_FLOAT16

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=int64
    [-3,  0,  7, 42]
  target_type: shape=(1,), dtype=float16
    [0.]

Outputs:
  output: shape=(4,), dtype=float16
    [-3.,  0.,  7., 42.]

test_cc_castlike_INT64_to_INT16

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=int64
    [-3,  0,  7, 42]
  target_type: shape=(1,), dtype=int16
    [0]

Outputs:
  output: shape=(4,), dtype=int16
    [-3,  0,  7, 42]

test_cc_castlike_INT64_to_INT32

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=int64
    [-3,  0,  7, 42]
  target_type: shape=(1,), dtype=int32
    [0]

Outputs:
  output: shape=(4,), dtype=int32
    [-3,  0,  7, 42]

test_cc_castlike_INT64_to_INT8

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=int64
    [-3,  0,  7, 42]
  target_type: shape=(1,), dtype=int8
    [0]

Outputs:
  output: shape=(4,), dtype=int8
    [-3,  0,  7, 42]

test_cc_castlike_INT64_to_STRING

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=int64
    [-3,  0,  7, 42]
  target_type: shape=(1,), dtype=object
    ['']

Outputs:
  output: shape=(4,), dtype=object
    ['-3', '0', '7', '42']

test_cc_castlike_INT64_to_UINT16

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=int64
    [-3,  0,  7, 42]
  target_type: shape=(1,), dtype=uint16
    [0]

Outputs:
  output: shape=(4,), dtype=uint16
    [65533,     0,     7,    42]

test_cc_castlike_INT64_to_UINT8

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=int64
    [-3,  0,  7, 42]
  target_type: shape=(1,), dtype=uint8
    [0]

Outputs:
  output: shape=(4,), dtype=uint8
    [253,   0,   7,  42]

test_cc_castlike_INT8_to_BFLOAT16

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=int8
    [-3,  0,  7, 42]
  target_type: shape=(1,), dtype=bfloat16
    [0]

Outputs:
  output: shape=(4,), dtype=bfloat16
    [-3, 0, 7, 42]

test_cc_castlike_INT8_to_BOOL

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=int8
    [-3,  0,  7, 42]
  target_type: shape=(1,), dtype=bool
    [False]

Outputs:
  output: shape=(4,), dtype=bool
    [ True, False,  True,  True]

test_cc_castlike_INT8_to_DOUBLE

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=int8
    [-3,  0,  7, 42]
  target_type: shape=(1,), dtype=float64
    [0.]

Outputs:
  output: shape=(4,), dtype=float64
    [-3.,  0.,  7., 42.]

test_cc_castlike_INT8_to_FLOAT

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=int8
    [-3,  0,  7, 42]
  target_type: shape=(1,), dtype=float32
    [0.]

Outputs:
  output: shape=(4,), dtype=float32
    [-3.,  0.,  7., 42.]

test_cc_castlike_INT8_to_FLOAT16

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=int8
    [-3,  0,  7, 42]
  target_type: shape=(1,), dtype=float16
    [0.]

Outputs:
  output: shape=(4,), dtype=float16
    [-3.,  0.,  7., 42.]

test_cc_castlike_INT8_to_INT16

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=int8
    [-3,  0,  7, 42]
  target_type: shape=(1,), dtype=int16
    [0]

Outputs:
  output: shape=(4,), dtype=int16
    [-3,  0,  7, 42]

test_cc_castlike_INT8_to_INT32

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=int8
    [-3,  0,  7, 42]
  target_type: shape=(1,), dtype=int32
    [0]

Outputs:
  output: shape=(4,), dtype=int32
    [-3,  0,  7, 42]

test_cc_castlike_INT8_to_INT64

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=int8
    [-3,  0,  7, 42]
  target_type: shape=(1,), dtype=int64
    [0]

Outputs:
  output: shape=(4,), dtype=int64
    [-3,  0,  7, 42]

test_cc_castlike_INT8_to_STRING

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=int8
    [-3,  0,  7, 42]
  target_type: shape=(1,), dtype=object
    ['']

Outputs:
  output: shape=(4,), dtype=object
    ['-3', '0', '7', '42']

test_cc_castlike_INT8_to_UINT16

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=int8
    [-3,  0,  7, 42]
  target_type: shape=(1,), dtype=uint16
    [0]

Outputs:
  output: shape=(4,), dtype=uint16
    [65533,     0,     7,    42]

test_cc_castlike_INT8_to_UINT8

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=int8
    [-3,  0,  7, 42]
  target_type: shape=(1,), dtype=uint8
    [0]

Outputs:
  output: shape=(4,), dtype=uint8
    [253,   0,   7,  42]

test_cc_castlike_STRING_to_BFLOAT16

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=object
    ['-3', '0', '7', '42']
  target_type: shape=(1,), dtype=bfloat16
    [0]

Outputs:
  output: shape=(4,), dtype=bfloat16
    [-3, 0, 7, 42]

test_cc_castlike_STRING_to_BOOL

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=object
    ['-3', '0', '7', '42']
  target_type: shape=(1,), dtype=bool
    [False]

Outputs:
  output: shape=(4,), dtype=bool
    [ True, False,  True,  True]

test_cc_castlike_STRING_to_DOUBLE

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=object
    ['-3', '0', '7', '42']
  target_type: shape=(1,), dtype=float64
    [0.]

Outputs:
  output: shape=(4,), dtype=float64
    [-3.,  0.,  7., 42.]

test_cc_castlike_STRING_to_FLOAT

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=object
    ['-3', '0', '7', '42']
  target_type: shape=(1,), dtype=float32
    [0.]

Outputs:
  output: shape=(4,), dtype=float32
    [-3.,  0.,  7., 42.]

test_cc_castlike_STRING_to_FLOAT16

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=object
    ['-3', '0', '7', '42']
  target_type: shape=(1,), dtype=float16
    [0.]

Outputs:
  output: shape=(4,), dtype=float16
    [-3.,  0.,  7., 42.]

test_cc_castlike_STRING_to_INT16

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=object
    ['-3', '0', '7', '42']
  target_type: shape=(1,), dtype=int16
    [0]

Outputs:
  output: shape=(4,), dtype=int16
    [-3,  0,  7, 42]

test_cc_castlike_STRING_to_INT32

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=object
    ['-3', '0', '7', '42']
  target_type: shape=(1,), dtype=int32
    [0]

Outputs:
  output: shape=(4,), dtype=int32
    [-3,  0,  7, 42]

test_cc_castlike_STRING_to_INT64

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=object
    ['-3', '0', '7', '42']
  target_type: shape=(1,), dtype=int64
    [0]

Outputs:
  output: shape=(4,), dtype=int64
    [-3,  0,  7, 42]

test_cc_castlike_STRING_to_INT8

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=object
    ['-3', '0', '7', '42']
  target_type: shape=(1,), dtype=int8
    [0]

Outputs:
  output: shape=(4,), dtype=int8
    [-3,  0,  7, 42]

test_cc_castlike_STRING_to_UINT16

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=object
    ['-3', '0', '7', '42']
  target_type: shape=(1,), dtype=uint16
    [0]

Outputs:
  output: shape=(4,), dtype=uint16
    [65533,     0,     7,    42]

test_cc_castlike_STRING_to_UINT8

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=object
    ['-3', '0', '7', '42']
  target_type: shape=(1,), dtype=uint8
    [0]

Outputs:
  output: shape=(4,), dtype=uint8
    [253,   0,   7,  42]

test_cc_castlike_UINT16_to_BFLOAT16

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=uint16
    [ 0,  1,  7, 42]
  target_type: shape=(1,), dtype=bfloat16
    [0]

Outputs:
  output: shape=(4,), dtype=bfloat16
    [0, 1, 7, 42]

test_cc_castlike_UINT16_to_BOOL

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=uint16
    [ 0,  1,  7, 42]
  target_type: shape=(1,), dtype=bool
    [False]

Outputs:
  output: shape=(4,), dtype=bool
    [False,  True,  True,  True]

test_cc_castlike_UINT16_to_DOUBLE

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=uint16
    [ 0,  1,  7, 42]
  target_type: shape=(1,), dtype=float64
    [0.]

Outputs:
  output: shape=(4,), dtype=float64
    [ 0.,  1.,  7., 42.]

test_cc_castlike_UINT16_to_FLOAT

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=uint16
    [ 0,  1,  7, 42]
  target_type: shape=(1,), dtype=float32
    [0.]

Outputs:
  output: shape=(4,), dtype=float32
    [ 0.,  1.,  7., 42.]

test_cc_castlike_UINT16_to_FLOAT16

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=uint16
    [ 0,  1,  7, 42]
  target_type: shape=(1,), dtype=float16
    [0.]

Outputs:
  output: shape=(4,), dtype=float16
    [ 0.,  1.,  7., 42.]

test_cc_castlike_UINT16_to_INT16

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=uint16
    [ 0,  1,  7, 42]
  target_type: shape=(1,), dtype=int16
    [0]

Outputs:
  output: shape=(4,), dtype=int16
    [ 0,  1,  7, 42]

test_cc_castlike_UINT16_to_INT32

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=uint16
    [ 0,  1,  7, 42]
  target_type: shape=(1,), dtype=int32
    [0]

Outputs:
  output: shape=(4,), dtype=int32
    [ 0,  1,  7, 42]

test_cc_castlike_UINT16_to_INT64

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=uint16
    [ 0,  1,  7, 42]
  target_type: shape=(1,), dtype=int64
    [0]

Outputs:
  output: shape=(4,), dtype=int64
    [ 0,  1,  7, 42]

test_cc_castlike_UINT16_to_INT8

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=uint16
    [ 0,  1,  7, 42]
  target_type: shape=(1,), dtype=int8
    [0]

Outputs:
  output: shape=(4,), dtype=int8
    [ 0,  1,  7, 42]

test_cc_castlike_UINT16_to_STRING

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=uint16
    [ 0,  1,  7, 42]
  target_type: shape=(1,), dtype=object
    ['']

Outputs:
  output: shape=(4,), dtype=object
    ['0', '1', '7', '42']

test_cc_castlike_UINT16_to_UINT8

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=uint16
    [ 0,  1,  7, 42]
  target_type: shape=(1,), dtype=uint8
    [0]

Outputs:
  output: shape=(4,), dtype=uint8
    [ 0,  1,  7, 42]

test_cc_castlike_UINT8_to_BFLOAT16

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=uint8
    [ 0,  1,  7, 42]
  target_type: shape=(1,), dtype=bfloat16
    [0]

Outputs:
  output: shape=(4,), dtype=bfloat16
    [0, 1, 7, 42]

test_cc_castlike_UINT8_to_BOOL

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=uint8
    [ 0,  1,  7, 42]
  target_type: shape=(1,), dtype=bool
    [False]

Outputs:
  output: shape=(4,), dtype=bool
    [False,  True,  True,  True]

test_cc_castlike_UINT8_to_DOUBLE

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=uint8
    [ 0,  1,  7, 42]
  target_type: shape=(1,), dtype=float64
    [0.]

Outputs:
  output: shape=(4,), dtype=float64
    [ 0.,  1.,  7., 42.]

test_cc_castlike_UINT8_to_FLOAT

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=uint8
    [ 0,  1,  7, 42]
  target_type: shape=(1,), dtype=float32
    [0.]

Outputs:
  output: shape=(4,), dtype=float32
    [ 0.,  1.,  7., 42.]

test_cc_castlike_UINT8_to_FLOAT16

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=uint8
    [ 0,  1,  7, 42]
  target_type: shape=(1,), dtype=float16
    [0.]

Outputs:
  output: shape=(4,), dtype=float16
    [ 0.,  1.,  7., 42.]

test_cc_castlike_UINT8_to_INT16

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=uint8
    [ 0,  1,  7, 42]
  target_type: shape=(1,), dtype=int16
    [0]

Outputs:
  output: shape=(4,), dtype=int16
    [ 0,  1,  7, 42]

test_cc_castlike_UINT8_to_INT32

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=uint8
    [ 0,  1,  7, 42]
  target_type: shape=(1,), dtype=int32
    [0]

Outputs:
  output: shape=(4,), dtype=int32
    [ 0,  1,  7, 42]

test_cc_castlike_UINT8_to_INT64

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=uint8
    [ 0,  1,  7, 42]
  target_type: shape=(1,), dtype=int64
    [0]

Outputs:
  output: shape=(4,), dtype=int64
    [ 0,  1,  7, 42]

test_cc_castlike_UINT8_to_INT8

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=uint8
    [ 0,  1,  7, 42]
  target_type: shape=(1,), dtype=int8
    [0]

Outputs:
  output: shape=(4,), dtype=int8
    [ 0,  1,  7, 42]

test_cc_castlike_UINT8_to_STRING

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=uint8
    [ 0,  1,  7, 42]
  target_type: shape=(1,), dtype=object
    ['']

Outputs:
  output: shape=(4,), dtype=object
    ['0', '1', '7', '42']

test_cc_castlike_UINT8_to_UINT16

Node:
  CastLike(input, target_type) -> (output)
Inputs:
  input: shape=(4,), dtype=uint8
    [ 0,  1,  7, 42]
  target_type: shape=(1,), dtype=uint16
    [0]

Outputs:
  output: shape=(4,), dtype=uint16
    [ 0,  1,  7, 42]