Updated on 2022-03-13 GMT+08:00

te.lang.cce.floor(raw_tensor)

Rounds down each element in raw_tensor. The supported type is float16. The data type float32 is converted to float16. The output is int32.

This API is defined in cast_compute.py.

Parameter Description

raw_tensor: input tensor, tvm.tensor type

Return Value

res_tensor: floor(raw_tensor), tvm.tensor type

Calling Example

shape = (1024,1024)
input_dtype = "float16"
data = tvm.placeholder(shape, name="data", dtype=input_dtype)
res = te.lang.cce.floor(data)