Skip to main content
Log in

Mojo function

is_gpu

is_gpu[target: StringLiteral]() -> Bool

Checks if the target is a GPU (compile-time version).

Parameters:

  • target (StringLiteral): Target string to check.

Returns:

True if the target is a GPU, False otherwise.

is_gpu(target: String) -> Bool

Checks if the target is a GPU (runtime version).

Args:

  • target (String): Target string to check.

Returns:

True if the target is a GPU, False otherwise.