MCPcopy Create free account
hub / github.com/NVIDIA/DALI / daliSetExternalInputTensorsAsync

Function daliSetExternalInputTensorsAsync

dali/c_api/c_api.cc:397–414  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

395
396
397void daliSetExternalInputTensorsAsync(daliPipelineHandle_t pipe_handle, const char *name,
398 device_type_t device, const void *const *data_ptr,
399 dali_data_type_t data_type, const int64_t *shapes,
400 int64_t sample_dim, const char *layout_str,
401 cudaStream_t stream, unsigned int flags) {
402 switch (device) {
403 case device_type_t::CPU:
404 SetExternalInputTensors<CPUBackend>(pipe_handle, name, data_ptr, data_type, shapes,
405 sample_dim, layout_str, stream, flags);
406 return;
407 case device_type_t::GPU:
408 SetExternalInputTensors<GPUBackend>(pipe_handle, name, data_ptr, data_type, shapes,
409 sample_dim, layout_str, stream, flags);
410 return;
411 default:
412 DALI_FAIL(dali::make_string("Unknown device: ", device));
413 }
414}
415
416
417int daliGetNumExternalInput(daliPipelineHandle_t pipe_handle) {

Callers 2

TYPED_TESTFunction · 0.85

Calls 1

make_stringFunction · 0.50

Tested by 1

TYPED_TESTFunction · 0.68