Mojo trait
DevicePassable
This trait marks types as passable to accelerator devices.
Implemented traits
comptime members
device_type
comptime device_type
Indicate the type being used on accelerator devices.
Required methods
get_type_name
static get_type_name() -> String
Gets the name of the host type (the one implementing this trait). For example, Int would return "Int", DeviceBuffer[DType.float32] would return "DeviceBuffer[DType.float32]". This is used for error messages when passing types to the device. TODO: This method will be retired soon when better kernel call error messages arrive.
Returns:
String: The host type's name.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!