Skip to main content

Mojo struct

GEMMKind

struct GEMMKind

Struct for GEMM types.

This struct defines the different types of GEMM that is supported by BlackWell Such as BMM, GEMM, GMM, etc.

Implemented traits​

AnyType, Copyable, Equatable, Hashable, ImplicitlyCopyable, ImplicitlyDestructible, Movable, RegisterPassable, TrivialRegisterPassable, Writable

comptime members​

BLOCK_SCALED_1D2D_FP8​

comptime BLOCK_SCALED_1D2D_FP8 = GEMMKind(Int32(3))

BLOCK_SCALED_1D2D_FP8 type.

BMM​

comptime BMM = GEMMKind(Int32(1))

BMM type.

GEMM​

comptime GEMM = GEMMKind(Int32(0))

GEMM type.

GMM​

comptime GMM = GEMMKind(Int32(2))

GMM type.

Methods​

__eq__​

__eq__(self, other: Self) -> Bool

Check if two GEMM kinds are equal.

Args:

  • ​other (Self): The other GEMM kind to compare with.

Returns:

Bool: True if the GEMM kinds are equal, False otherwise.

__ne__​

__ne__(self, other: Self) -> Bool

Check if two GEMM kinds are not equal.

Args:

  • ​other (Self): The other GEMM kind to compare with.

Returns:

Bool: True if the GEMM kinds are not equal, False otherwise.

__int__​

__int__(self) -> Int

Convert GEMM kind to an integer value.

Returns:

Int: The integer value representing the GEMM type.

write_to​

write_to(self, mut writer: T)

Write the GEMM kind to a writer.

Args:

  • ​writer (T): The writer to write the GEMM kind to.

__str__​

__str__(self) -> String

Convert GEMM kind to a string.

Returns:

String