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

Bump up CUDA version used for tests #5100

Merged
merged 2 commits into from
Nov 6, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
9 changes: 8 additions & 1 deletion dali/python/backend_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -155,11 +155,18 @@ void CheckContiguousTensor(const TStrides &strides, int num_strides,
DALI_ENFORCE(num_strides == num_extents,
"There should be exactly as many strides as there are extents in array shape.");
int64_t stride_from_shape = element_size;
int64_t stride_from_shape_collapsed = 1;
int64_t last_non_one_dim = 1;
for (int i = num_strides - 1; i >= 0; i--) {
DALI_ENFORCE(strides[i] == stride_from_shape,
DALI_ENFORCE(strides[i] == stride_from_shape || strides[i] == stride_from_shape_collapsed,
make_string("Strided data not supported. Dimension ", i, " has stride ", strides[i],
" whereas densely packed data of this shape would have a stride ", stride_from_shape));
stride_from_shape *= shape[i];
// for shapes [1, 1, 5] leading dimensions may not contribute to
stiepan marked this conversation as resolved.
Show resolved Hide resolved
if (shape[i] != 1) {
stride_from_shape_collapsed *= last_non_one_dim;
last_non_one_dim = shape[i];
}
}
}

Expand Down
8 changes: 6 additions & 2 deletions dali/test/python/test_torch_pipeline_rnnt.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,9 @@ def forward(self, inp, seq_len):
# do stft
x = torch.stft(x, n_fft=self.n_fft, hop_length=self.hop_length,
win_length=self.win_length, pad_mode='reflect',
center=True, window=self.window.to(dtype=torch.float).to(x.device))
center=True, window=self.window.to(dtype=torch.float).to(x.device),
return_complex=True)
x = torch.view_as_real(x)
stiepan marked this conversation as resolved.
Show resolved Hide resolved

# get power spectrum
x = x.pow(2).sum(-1)
Expand Down Expand Up @@ -214,7 +216,9 @@ def torch_spectrogram(audio, sample_rate, device='cpu',
window_tensor = window_fn(win_length, periodic=False) if window_fn else None
stft_out = torch.stft(audio, n_fft=n_fft, hop_length=hop_length,
win_length=win_length, pad_mode=pad_mode,
center=center, window=window_tensor.to(dtype=torch.float))
center=center, window=window_tensor.to(dtype=torch.float),
return_complex=True)
stft_out = torch.view_as_real(stft_out)
# get power spectrum
spectrogram = stft_out.pow(2).sum(-1)
spectrogram = spectrogram.cpu().numpy()
Expand Down
1 change: 0 additions & 1 deletion docs/examples/use_cases/paddle/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,5 @@
underline_char="=",
entries=[
"resnet50/paddle-resnet50.rst",
"ssd/paddle-ssd.rst",
"tsm/paddle-tsm.rst",
])
58 changes: 0 additions & 58 deletions docs/examples/use_cases/paddle/ssd/paddle-ssd.rst

This file was deleted.

202 changes: 0 additions & 202 deletions docs/examples/use_cases/paddle/ssd/ssd.py

This file was deleted.

Loading