Skip to main content

Mojo function

is_gpu

is_gpu[: Bool, : Origin[$0], //, target: StringSlice[$1]]() -> Bool

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

Parameters:

Returns:

Bool: True if the target is a GPU, False otherwise.

is_gpu(target: StringSlice[origin]) -> Bool

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

Args:

Returns:

Bool: True if the target is a GPU, False otherwise.

Was this page helpful?