-
Notifications
You must be signed in to change notification settings - Fork 621
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
NumpyReader to use HostWorkspace #3011
Conversation
Signed-off-by: Joaquin Anton <janton@nvidia.com>
!build |
CI MESSAGE: [2432291]: BUILD STARTED |
int ndim = file_0.image.shape().sample_dim(); | ||
|
||
TensorListShape<> sh(max_batch_size_, ndim); | ||
for (int i = 0; i < max_batch_size_; i++) { |
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 instead of max_batch_size_
it should check size of prefetched_batch_queue_[curr_batch_consumer_]
. Just for the future.
Signed-off-by: Joaquin Anton <janton@nvidia.com>
@@ -118,12 +118,12 @@ bool NumpyReader::SetupImpl(std::vector<OutputDesc> &output_desc, | |||
// If necessary start prefetching thread and wait for a consumable batch | |||
DataReader<CPUBackend, ImageFileWrapper>::SetupImpl(output_desc, ws); | |||
|
|||
int batch_size = prefetched_batch_queue_[curr_batch_consumer_].size(); |
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.
How about making that a function, like GetCurrentBatchSize()
or something?
CI MESSAGE: [2432291]: BUILD FAILED |
!build |
CI MESSAGE: [2440607]: BUILD STARTED |
Signed-off-by: Joaquin Anton <janton@nvidia.com>
842f2d9
to
449d4f1
Compare
!build |
CI MESSAGE: [2441014]: BUILD STARTED |
CI MESSAGE: [2441014]: BUILD FAILED |
CI MESSAGE: [2441014]: BUILD PASSED |
Signed-off-by: Joaquin Anton janton@nvidia.com
Why we need this PR?
Pick one, remove the rest
What happened in this PR?
Fill relevant points, put NA otherwise. Replace anything inside []
Reworked NumpyReader to use HostWorkspace instead of SampleWorkspace, so that we can control the level of parallelism (e.g. intra-sample parallelism)
NumpyReader
NA
Existing tests apply
NA
JIRA TASK: [DALI-2127]