pub struct MlxStream(/* private fields */);Expand description
Owned MLX stream handle used to preserve runtime thread affinity.
Implementations§
Source§impl MlxStream
impl MlxStream
Sourcepub fn apply_cuda_kernel(
&self,
kernel: &MlxCudaKernel,
inputs: &MlxArrayVector,
config: &MlxCudaKernelConfig,
) -> Result<MlxArrayVector, MlxCError>
pub fn apply_cuda_kernel( &self, kernel: &MlxCudaKernel, inputs: &MlxArrayVector, config: &MlxCudaKernelConfig, ) -> Result<MlxArrayVector, MlxCError>
Applies the CUDA kernel with an explicit stream argument.
§Errors
Returns the captured MLX-C description when the launch fails.
Source§impl MlxStream
impl MlxStream
pub fn default_cpu() -> Result<Self, MlxCError>
pub fn default_gpu() -> Result<Self, MlxCError>
pub const fn raw(&self) -> mlx_stream
Trait Implementations§
Auto Trait Implementations§
impl !Send for MlxStream
impl !Sync for MlxStream
impl Freeze for MlxStream
impl RefUnwindSafe for MlxStream
impl Unpin for MlxStream
impl UnsafeUnpin for MlxStream
impl UnwindSafe for MlxStream
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more