IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /max/get-started.md). For the complete documentation index, see llms.txt.
Skip to main content
For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /max/get-started.md).

Mojo module

concat

Implements tensor concatenation along a specified axis for CPU and GPU targets.

comptime values​

elementwise_epilogue_type​

comptime elementwise_epilogue_type = def[c_type: DType, rank: Int, width: SIMDLength = SIMDLength(1), *, alignment: Int = Int(1)](IndexList[rank], SIMD[c_type, width]) capturing thin -> None

Functions​

  • ​concat: Concatenates inputs along axis into output for the given target.
  • ​concat_shape: Compute the output shape of a pad operation, and assert the inputs are compatible.
  • ​fused_concat: Concatenates inputs produced by input_fn along axis into output, applying output_0_fn to each element.
  • ​memcpy_or_fuse: Copies n bytes from src_data into dest_data at out_byte_offset, applying epilogue_fn elementwise when present.
  • ​preferred_simd_width: SIMD scalar count for fused GPU concat vectorization.