pub struct ResidentTensor(/* private fields */);Expand description
デバイスに常駐する入力テンソルの不透明ハンドル(イシュー #3250 P1。公開形の決定は
docs/compat-resident-train-step-decision.md §4)。
Tape::upload_resident が計測窓の外で 1 回だけ upload して作り、
compat::Sequential::predict_resident_input(推論)と Tape::matmul_resident(行列積)が
入力の H2D なしで受け取る。中身(バッファ)は公開しない。推論では作成時の
DeviceParamStore に束縛され、別 store・別デバイス・古い世代のハンドルは型付きエラーに
なる。!Send(Send を足さない。イシュー #3254 で次の compile_fail により公開形として固定)。
ⓘ
fn assert_send<T: Send>() {}
assert_send::<fandhe_ai::ResidentTensor>();Implementations§
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for ResidentTensor
impl !Send for ResidentTensor
impl !Sync for ResidentTensor
impl !UnwindSafe for ResidentTensor
impl Freeze for ResidentTensor
impl Unpin for ResidentTensor
impl UnsafeUnpin for ResidentTensor
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more