use crate::{
checkpoint::builder::CheckpointerBuilder,
grads::Gradients,
graph::StepBoxed,
tensor::{AutodiffTensor, NodeRefCount},
};
#[cfg(not(feature = "distributed"))]
use burn_backend::Backend;
#[cfg(feature = "distributed")]
use burn_backend::distributed::DistributedBackend;
pub trait AutodiffClient: Send + Clone {
fn register(&self, node_id: NodeRefCount, step: StepBoxed, actions: CheckpointerBuilder);
#[cfg(not(feature = "distributed"))]
fn backward<B: Backend>(&self, tensor: AutodiffTensor<B>) -> Gradients;
#[cfg(feature = "distributed")]
fn backward<B: DistributedBackend>(&self, tensor: AutodiffTensor<B>) -> Gradients;
}
pub type AutodiffClientImpl = super::graph::GraphMutexClient;