#[cfg(feature = "std")]
pub(crate) mod api;
#[cfg(feature = "std")]
pub(crate) mod client;
mod ops;
#[cfg(feature = "std")]
pub(crate) mod server;
#[cfg(feature = "std")]
pub use api::*;
pub use ops::*;
pub use burn_std::distributed::*;
pub type DistributedParamId = burn_std::id::ParamId;
use crate::{Backend, TensorMetadata, tensor::FloatTensor};
#[derive(Debug, Clone)]
pub struct DistributedParams {
pub param_id: DistributedParamId,
}
#[derive(new, Clone)]
pub struct CollectiveTensor<B: Backend> {
handle: FloatTensor<B>,
}
impl<B: Backend> CollectiveTensor<B> {
pub fn resolve(self) -> FloatTensor<B> {
B::sync_collective(&self.handle.device());
self.handle
}
pub unsafe fn assume_resolved(self) -> FloatTensor<B> {
self.handle
}
}