Skip to content
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

Fix hw_decoder_load=0.0 for ImageDecoder related tests that require deterministic results #2232

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions dali/test/python/test_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -657,7 +657,8 @@ def __init__(self, batch_size, num_threads, device_id, num_gpus):
num_threads,
device_id)
self.input = ops.CaffeReader(path = caffe_db_folder, shard_id = device_id, num_shards = num_gpus)
self.decode = ops.ImageDecoder(device = "mixed", output_type = types.RGB)
# Fixing HW load to 0 to be able to compare with ImageDecoderCrop (which uses CUDA decoder only)
self.decode = ops.ImageDecoder(device = "mixed", output_type = types.RGB, hw_decoder_load = 0.0)
self.pos_rng_x = ops.Uniform(range = (0.0, 1.0), seed=1234)
self.pos_rng_y = ops.Uniform(range = (0.0, 1.0), seed=5678)
self.crop = ops.Crop(device="gpu", crop =(224,224))
Expand Down Expand Up @@ -845,7 +846,8 @@ def __init__(self, batch_size, num_threads, device_id, num_gpus):
self.input_crop_pos = ops.ExternalSource()
self.input_crop_size = ops.ExternalSource()
self.input_crop = ops.ExternalSource()
self.decode = ops.ImageDecoder(device='mixed', output_type=types.RGB)
# Fixing HW load to 0 to be able to compare with ImageDecoderSlice (which uses CUDA decoder only)
self.decode = ops.ImageDecoder(device='mixed', output_type=types.RGB, hw_decoder_load = 0.0)
self.slice = ops.Slice(device = 'gpu')

def define_graph(self):
Expand Down Expand Up @@ -1049,10 +1051,11 @@ def __init__(self, reader_type, batch_size, is_cached=False, is_cached_batch_cop
cache_threshold=0,
cache_type='threshold',
cache_debug=False,
hw_decoder_load = 0.0, # 0.0 for deterministic results
cache_batch_copy=is_cached_batch_copy)
else:
self.decode = ops.ImageDecoder(device = "mixed", output_type = types.RGB)

# hw_decoder_load=0.0 for deterministic results
self.decode = ops.ImageDecoder(device = "mixed", output_type = types.RGB, hw_decoder_load = 0.0)
def define_graph(self):
if self.reader_type == "TFRecordReader":
inputs = self.input()
Expand Down