ttnn.sub_bw
- ttnn.sub_bw = FastOperation(python_fully_qualified_name='ttnn.sub_bw', function=<ttnn._ttnn.operations.binary_backward.sub_bw_t object>, preprocess_golden_function_inputs=<function default_preprocess_golden_function_inputs>, golden_function=<function _golden_function_bw>, postprocess_golden_function_outputs=<function default_postprocess_golden_function_outputs>, is_cpp_operation=True, is_experimental=False)
Performs backward operations for subtract of
input_tensor_aandinput_tensor_borscalarwith givengrad_tensor. Supports broadcasting.- Parameters:
grad_tensor (ComplexTensor or ttnn.Tensor) – the input gradient tensor.
input_tensor_a (ComplexTensor or ttnn.Tensor) – the input tensor.
input_tensor_b (ComplexTensor or ttnn.Tensor or Number) – the input tensor.
- Keyword Arguments:
are_required_outputs (List[bool], optional) – List of required outputs. Defaults to [True, True].
memory_config (ttnn.MemoryConfig, optional) – Memory configuration for the operation. Defaults to None.
input_grad (ttnn.Tensor, optional) – Preallocated output tensor for gradient of input_tensor_a. Defaults to None.
other_grad (ttnn.Tensor, optional) – Preallocated output tensor for gradient of input_tensor_b. Defaults to None.
Note
Supported dtypes and layouts:
Dtypes
Layouts
BFLOAT16, BFLOAT8_B
TILE, ROW_MAJOR
bfloat8_b/bfloat4_b is only supported on TILE_LAYOUT