asc.experimental.asctile.full_like
- asc.experimental.asctile.full_like(input: LocalTensor, value: PlainValue | int | float) LocalTensor
Create a tensor filled with a scalar value, with the same shape and dtype as the input tensor.
The supported data types are:
int8,int16,int32,int64,float16,bfloat16,float32.- Parameters:
input – The input tensor to match shape and dtype.
value – The scalar value to fill the tensor with.
- Returns:
A new tensor filled with the specified value
- Return type:
- Raises:
TypeError – If input is not a LocalTensor
Examples
Create a tensor filled with a value, matching another tensor’s shape and dtype:
src = asctile.copy_in(x_gm, [0], [128]) result = asctile.full_like(src, 255)