Conversation
Signed-off-by: Marek Dabek <mdabek@nvidia.com>
Signed-off-by: Marek Dabek <mdabek@nvidia.com>
Signed-off-by: Marek Dabek <mdabek@nvidia.com>
Signed-off-by: Marek Dabek <mdabek@nvidia.com> Co-authored-by: Kamil Tokarski <kamiltokarski04@gmail.com>
Signed-off-by: Marek Dabek <mdabek@nvidia.com>
Signed-off-by: Marek Dabek <mdabek@nvidia.com>
Signed-off-by: Marek Dabek <mdabek@nvidia.com>
Signed-off-by: Marek Dabek <mdabek@nvidia.com>
Signed-off-by: Marek Dabek <mdabek@nvidia.com>
Signed-of-by: Marek Dabek <mdabek@nvidia.com>
71f53ca to
0c38e81
Compare
|
@greptileai please review |
|
!build |
|
CI MESSAGE: [46880686]: BUILD STARTED |
Greptile SummaryThis PR adds a torchvision-compatible Confidence Score: 5/5Safe to merge; the only remaining finding is a P2 type-annotation mismatch that does not affect runtime correctness for documented use cases. All prior P0/P1 concerns have been resolved. The single new finding is that ndd.Batch appears in pad()'s type hint but raises TypeError at runtime — this is P2 since no public test or documented workflow passes ndd.Batch directly to the functional API. Core padding logic, axis ordering, and validation are correct and cross-validated against torchvision. dali/python/nvidia/dali/experimental/torchvision/v2/functional/pad.py — minor type-hint cleanup needed. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A["User input\n(PIL.Image | torch.Tensor)"] --> B{pad or Pad?}
B -->|"functional.pad()"| C{Input type}
B -->|"Pad()()"| D["Pad.__init__\n_ValidatePaddingMode\n_ValidateIfNonNegative\nselect PadConstant/Edge/Reflect/Symmetric"]
C -->|PIL.Image| E["axes=[-3,-2] HWC"]
C -->|torch.Tensor| F["axes=[-2,-1] CHW"]
C -->|other| G["raise TypeError"]
E --> H["_ValidatePaddingMode + _ValidateIfNonNegative"]
F --> H
H --> I["_pad() @adjust_input\nndd.slice(anchor=(-top,-left),\nshape=(H+top+bottom,W+left+right),\naxes, out_of_bounds_policy)"]
D --> J["_PadBase._kernel()\nfn.slice(axis_names='WH'\nanchor=(-pad_left,-pad_top)\nshape=(W+l+r, H+t+b))"]
I --> K["Output: ndd.Tensor or ndd.Batch"]
J --> K
Reviews (11): Last reviewed commit: "Review fixes" | Re-trigger Greptile |
|
CI MESSAGE: [46880686]: BUILD PASSED |
0c38e81 to
d6f47fc
Compare
|
@greptileai please re-review |
4c57d97 to
a48d7cc
Compare
Signed-off-by: Marek Dabek <mdabek@nvidia.com>
Signed-off-by: Marek Dabek <mdabek@nvidia.com>
…VIDIA#6262) * Improve call stack depth handling for error tracebacks in dynamic mode * Rework exception_tester to automatically infer expected line and message --------- Signed-off-by: Rostan Tabet <rtabet@nvidia.com>
Add uniform_sample option to VideoReaderDecoder
Adds a `uniform_sample` argument that samples exactly `sequence_length`
frames uniformly across the full video (or ROI) using linspace with
std::round rounding. Each video produces one sample per epoch; `stride`
and `step` are ignored (with a DALI_WARN if `pad_mode` is also set).
`sequence_length` must be >= 1 when `uniform_sample=True`.
To avoid a per-sample heap allocation, VideoSampleDesc::frame_idxs_
changes from std::vector<int> to span<const int>. Owned storage moves
to all_frame_idxs_ (vector<vector<int>>) in the loader, which is
populated once in PrepareMetadataImpl and stable for the loader's
lifetime. The copy in ReadSample becomes a cheap 16-byte span copy.
all_frame_idxs_ is declared before samples_ so its lifetime encloses
the spans, preventing dangling references on destruction.
New tests:
- test_uniform_sample_basic: verifies frame indices match expected linspace
- test_uniform_sample_file_list_roi: ROI with non-zero start_frame via file_list
- test_uniform_sample_sequence_length_zero_raises: sequence_length=0 raises
- test_uniform_sample_stride_step_ignored: stride/step have no effect
Signed-off-by: Joaquin Anton Guirao <janton@nvidia.com>
- cudaDeviceSynchronize returns cudaErrorStreamCaptureUnsupported when any stream on the device is being captured. DLTensorGraveyard now puts pending deletions back in the queue and retries after a short wait instead of propagating the error. Signed-off-by: Janusz Lisiecki <jlisiecki@nvidia.com>
* Torchvision ColorJitter and Grayscale implementations Signed-off-by: Marek Dabek <mdabek@nvidia.com>
Signed-off-by: Marek Dabek <mdabek@nvidia.com>
Signed-off-by: Marek Dabek <mdabek@nvidia.com>
Signed-off-by: Marek Dabek <mdabek@nvidia.com>
Signed-off-by: Marek Dabek <mdabek@nvidia.com>
Signed-off-by: Marek Dabek <mdabek@nvidia.com>
Signed-off-by: Marek Dabek <mdabek@nvidia.com>
Signed-off-by: Marek Dabek <mdabek@nvidia.com>
Signed-off-by: Marek Dabek <mdabek@nvidia.com>
Signed-off-by: Marek Dabek <mdabek@nvidia.com>
Signed-off-by: Marek Dabek <mdabek@nvidia.com>
abf0263 to
22daf70
Compare
Signed-off-by: Marek Dabek <mdabek@nvidia.com>
Signed-off-by: Marek Dabek <mdabek@nvidia.com>
ab37c29 to
2f452ae
Compare
ad34c5c to
fa9360d
Compare
|
!build |
|
CI MESSAGE: [47558804]: BUILD STARTED |
|
CI MESSAGE: [47558804]: BUILD PASSED |
Signed-off-by: Marek Dabek <mdabek@nvidia.com>
|
!build |
|
CI MESSAGE: [47618654]: BUILD STARTED |
|
CI MESSAGE: [47618654]: BUILD PASSED |
Category:
New feature
Description:
Torchvision pad operator implementation
Additional information:
Affected modules and functionalities:
Key points relevant for the review:
Tests:
Checklist
Documentation
DALI team only
Requirements
REQ IDs: N/A
JIRA TASK: N/A