Skip to main content
Log in

Mojo function

is_valid_target

is_valid_target[target: StringLiteral]() -> Bool

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

Parameters:

  • target (StringLiteral): Target string to check.

Returns:

True if the target is valid (CPU or GPU), False otherwise.

is_valid_target(target: String) -> Bool

Checks if the target is valid (runtime version).

Args:

  • target (String): Target string to check.

Returns:

True if the target is valid (CPU or GPU), False otherwise.