te.lang.cce.vsub(lhs, rhs)
Subtracts one tensor from the other tensor by element. The data types of the elements must be the same. The supported types are float16, float32, and int32. The data types int8 and uint8 are converted to float16.
This API is defined in elewise_compute.py.
Parameter Description
- lhs: left tensor, tvm.tensor type
- rhs: right tensor, tvm.tensor type
Return Value
res_tensor: lhs – rhs, tvm.tensor type
Calling Example
shape = (1024,1024) input_dtype = "float16" data1 = tvm.placeholder(shape, name="data1", dtype=input_dtype) data2 = tvm.placeholder(shape, name="data2", dtype=input_dtype) res = te.lang.cce.vsub(data1, data2)
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot