ttnn.alt_complex_rotate90

ttnn.alt_complex_rotate90 = Operation(python_fully_qualified_name='ttnn.alt_complex_rotate90', function=<ttnn._ttnn.operations.unary.alt_complex_rotate90_t object>, preprocess_golden_function_inputs=<function default_preprocess_golden_function_inputs>, golden_function=<function _golden_function_alt_complex_rotate90>, postprocess_golden_function_outputs=<function default_postprocess_golden_function_outputs>, is_cpp_operation=True, is_experimental=False)

Applies alt_complex_rotate90 to input_tensor element-wise.

\[(\mathrm{{output\_tensor}}_{2i}, \mathrm{{output\_tensor}}_{2i+1}) = (-\mathrm{{input\_tensor}}_{2i+1}, \mathrm{{input\_tensor}}_{2i})\]
Parameters:

input_tensor (ttnn.Tensor) – the input tensor. FLOAT32, BFLOAT16, BFLOAT8_B, BFLOAT4_B

Keyword Arguments:
  • memory_config (ttnn.MemoryConfig, optional) – memory configuration for the operation. Defaults to None.

  • output_tensor (ttnn.Tensor, optional) – preallocated output tensor. Defaults to None.

  • queue_id (int, optional) – command queue id. Defaults to 0.

Returns:

ttnn.Tensor – the output tensor.

Note

Supported dtypes, layouts, and ranks:

Dtypes

Layouts

Ranks

The last dimension of the input tensor must be even.

TILE

2, 3, 4

Example

>>> tensor = ttnn.from_torch(torch.rand([2, 2], dtype=torch.bfloat16), layout=ttnn.TILE_LAYOUT, device=device)
>>> output = ttnn.alt_complex_rotate90(tensor)