Loading...
Searching...
No Matches
opennn::Batch Struct Reference
#include <opennn/dataset/batch.h>
Public Member Functions | |
| Batch (Index, const Dataset *, const EffectiveConfig &, bool prefetch_only=false) | |
| ~Batch () | |
| Batch (const Batch &)=delete | |
| Batch & | operator= (const Batch &)=delete |
| Batch (Batch &&)=delete | |
| Batch & | operator= (Batch &&)=delete |
| void | set (Index, const Dataset *, const EffectiveConfig &, bool prefetch_only=false) |
| void | fill (const vector< Index > &sample_indices, const FeatureSelection &, FillMode mode=FillMode::Training) |
| const vector< TensorView > & | get_inputs () const |
| const TensorView & | get_targets () const |
| bool | uses_cuda () const |
| Index | get_batch_size () const |
| bool | is_empty () const |
| void | upload_to_device_batch_async (Batch &, DeviceStream) |
| void | record_h2d_done (DeviceStream) |
| void | wait_h2d_complete () |
| void | wait_h2d_on_compute_stream () |
Public Attributes | |
| Index | batch_size = 0 |
| const Dataset * | dataset = nullptr |
| BatchSlot | input |
| BatchSlot | decoder |
| BatchSlot | target |
| device::PinnedBuffer | input_host_bf16 |
| Buffer | fp32_staging {Device::CUDA} |
| device::CudaEvent | h2d_done_event |
| bool | h2d_done_recorded = false |
| vector< TensorView > | input_views_host_cache |
| TensorView | target_view_host_cache |
| vector< TensorView > | input_views_cache |
| TensorView | target_view_cache |
| optional< DeviceGather > | device_gather |
| device::PinnedBuffer | gather_indices_host |
| Buffer | gather_indices_device {Device::CUDA} |
Constructor & Destructor Documentation
◆ Batch() [1/3]
| opennn::Batch::Batch | ( | Index | , |
| const Dataset * | , | ||
| const EffectiveConfig & | , | ||
| bool | prefetch_only = false ) |
◆ ~Batch()
| opennn::Batch::~Batch | ( | ) |
◆ Batch() [2/3]
|
delete |
◆ Batch() [3/3]
|
delete |
Member Function Documentation
◆ fill()
| void opennn::Batch::fill | ( | const vector< Index > & | sample_indices, |
| const FeatureSelection & | , | ||
| FillMode | mode = FillMode::Training ) |
◆ get_batch_size()
|
inline |
◆ get_inputs()
|
inline |
◆ get_targets()
|
inline |
◆ is_empty()
|
inline |
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ record_h2d_done()
| void opennn::Batch::record_h2d_done | ( | DeviceStream | ) |
◆ set()
| void opennn::Batch::set | ( | Index | , |
| const Dataset * | , | ||
| const EffectiveConfig & | , | ||
| bool | prefetch_only = false ) |
◆ upload_to_device_batch_async()
| void opennn::Batch::upload_to_device_batch_async | ( | Batch & | , |
| DeviceStream | ) |
◆ uses_cuda()
|
inline |
◆ wait_h2d_complete()
| void opennn::Batch::wait_h2d_complete | ( | ) |
◆ wait_h2d_on_compute_stream()
| void opennn::Batch::wait_h2d_on_compute_stream | ( | ) |
Member Data Documentation
◆ batch_size
| Index opennn::Batch::batch_size = 0 |
◆ dataset
| const Dataset* opennn::Batch::dataset = nullptr |
◆ decoder
| BatchSlot opennn::Batch::decoder |
◆ device_gather
| optional<DeviceGather> opennn::Batch::device_gather |
◆ fp32_staging
| Buffer opennn::Batch::fp32_staging {Device::CUDA} |
◆ gather_indices_device
| Buffer opennn::Batch::gather_indices_device {Device::CUDA} |
◆ gather_indices_host
| device::PinnedBuffer opennn::Batch::gather_indices_host |
◆ h2d_done_event
| device::CudaEvent opennn::Batch::h2d_done_event |
◆ h2d_done_recorded
| bool opennn::Batch::h2d_done_recorded = false |
◆ input
| BatchSlot opennn::Batch::input |
◆ input_host_bf16
| device::PinnedBuffer opennn::Batch::input_host_bf16 |
◆ input_views_cache
| vector<TensorView> opennn::Batch::input_views_cache |
◆ input_views_host_cache
| vector<TensorView> opennn::Batch::input_views_host_cache |
◆ target
| BatchSlot opennn::Batch::target |
◆ target_view_cache
| TensorView opennn::Batch::target_view_cache |
◆ target_view_host_cache
| TensorView opennn::Batch::target_view_host_cache |