use furiosa_mapping::*;
use crate::scalar::Scalar;
use crate::tensor::Tensor;
use crate::tensor::memory::{Address, HbmTensor, HostTensor};
use crate::tensor::raw::PhantomRawTensor;
use crate::runtime::backend::Backend;
#[derive(Debug, Clone, Copy)]
pub struct Typecheck;
impl<D: Scalar, Mapping: M> Tensor<D, Mapping, Typecheck> {
pub fn empty() -> Self {
Self::uninit()
}
}
impl Backend for Typecheck {
type RawTensor<D: Scalar> = PhantomRawTensor<D>;
async fn to_hbm<D: Scalar, Element: M, Chip: M, Element2: M>(
_host: &HostTensor<D, Element, Self>,
address: Address,
) -> HbmTensor<D, Chip, Element2, Self> {
HbmTensor::new(Tensor::empty(), address)
}
async fn from_hbm<D: Scalar, Chip: M, Element: M, Element2: M>(
_hbm: &HbmTensor<D, Chip, Element, Self>,
) -> HostTensor<D, Element2, Self> {
Tensor::empty().into()
}
}