IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /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. /get-started.md).

Mojo module

smem_types

Shared memory type aliases for GPU kernels.

This module defines the core SMEM type aliases used across SM90, SM100, and other GPU kernel implementations. They depend only on layout and stdlib, making them safe to import without pulling in higher-level kernel packages.

Types:

  • SMemBarrier: Pointer to shared memory barrier
  • SMemArray: Generic shared memory array
  • SMemPtr: Typed pointer into shared memory
  • eval: Compile-time expression evaluator

Shared-memory and register tiles are TileTensors; see structured_kernels.tile_types for the tile and tile-array helpers.

comptime values​

eval​

comptime eval[T: AnyType, //, val: T] = val

Helper alias to force evaluation of expressions at compile time.

Parameters​

SMemBarrier​

comptime SMemBarrier = Pointer[SharedMemBarrier, origin, address_space=AddressSpace.SHARED]

Type alias for shared memory barrier pointer.

SMemPtr​

comptime SMemPtr = Pointer[T, MutUntrackedOrigin, address_space=AddressSpace.SHARED]

Structs​

Was this page helpful?