New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expose names of Pipeline outputs in C API #2665
Conversation
Signed-off-by: szalpal <mszolucha@nvidia.com>
!build |
CI MESSAGE: [2058116]: BUILD STARTED |
Signed-off-by: szalpal <mszolucha@nvidia.com>
!build |
CI MESSAGE: [2058174]: BUILD STARTED |
dali/c_api/c_api_test.cc
Outdated
@@ -97,7 +98,7 @@ std::unique_ptr<Pipeline> GetTestPipeline(bool is_file_reader, const std::string | |||
.AddInput(input_name, exec_device) | |||
.AddOutput("outputs", exec_device)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.AddOutput("outputs", exec_device)); | |
.AddOutput(output_name, exec_device)); |
include/dali/c_api.h
Outdated
@@ -335,6 +335,11 @@ DLL_PUBLIC size_t daliMaxDimTensors(daliPipelineHandle *pipe_handle, int n); | |||
*/ | |||
DLL_PUBLIC unsigned daliGetNumOutput(daliPipelineHandle *pipe_handle); | |||
|
|||
/** | |||
* @brief Returns a string indicating name of the output given by id |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it make sense to mention that the returned pointer is valid as long as the pipeline exists?
dali/c_api/c_api_test.cc
Outdated
device_id, false, prefetch_queue_depth, prefetch_queue_depth, | ||
prefetch_queue_depth, false); | ||
|
||
ASSERT_EQ(daliGetNumOutput(&handle), 1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe it would be better to check more than one output in this test.
CI MESSAGE: [2058174]: BUILD PASSED |
!build |
CI MESSAGE: [2062493]: BUILD STARTED |
CI MESSAGE: [2062493]: BUILD PASSED |
Signed-off-by: szalpal mszolucha@nvidia.com
Why we need this PR?
Pick one, remove the rest
dali_backend
What happened in this PR?
Fill relevant points, put NA otherwise. Replace anything inside []
augment C API
C API,
Pipeline
classNA
Yes
Yes
JIRA TASK: [Use DALI-XXXX or NA]