Mila
Deep Neural Network Library
Loading...
Searching...
No Matches
Mila::Dnn::Serialization::ITensorBlob Struct Referenceabstractexport

Type-erased interface for a serialized tensor blob. More...

Inheritance diagram for Mila::Dnn::Serialization::ITensorBlob:
Mila::Dnn::Serialization::TensorBlob< MR > Mila::Dnn::Serialization::TensorBlobView

Public Member Functions

 ITensorBlob (const ITensorBlob &)=delete
 ITensorBlob (ITensorBlob &&)=default
virtual const void * data () const noexcept=0
virtual const TensorMetadatagetMetadata () const noexcept=0
ITensorBlob & operator= (const ITensorBlob &)=delete
ITensorBlob & operator= (ITensorBlob &&)=default
virtual size_t sizeBytes () const noexcept=0

Detailed Description

Type-erased interface for a serialized tensor blob.

Carries metadata alongside a raw host pointer to the underlying bytes. Concrete TensorBlob<MR> implementations own the memory via TensorBuffer. When MR is CudaPinnedMemoryResource, data() returns a pinned host pointer enabling direct DMA in the CUDA copyFromBlob path without driver staging.

This interface is the virtual boundary for loadParameter_ overrides – component implementations receive an ITensorBlob regardless of the originating memory resource.


The documentation for this struct was generated from the following file: