-
Notifications
You must be signed in to change notification settings - Fork 656
Unexperimentalize operators #6134
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
base: main
Are you sure you want to change the base?
Conversation
|
|
||
| def check_numba_compatibility_gpu(if_skip=True): | ||
| import nvidia.dali.plugin.numba.experimental as ex | ||
| def check_numba_compatibility_gpu(if_skip=True, use_experimental: bool = False): |
Check notice
Code scanning / CodeQL
Explicit returns mixed with implicit (fall through) returns Note test
|
!build |
|
CI MESSAGE: [40306038]: BUILD STARTED |
d372995 to
5aa731e
Compare
|
CI MESSAGE: [40306038]: BUILD FAILED |
e630529 to
51e599d
Compare
| # try importing cuda.core as it can be used later to check the compatibility | ||
| # it is okay to fail as it may not be installed, the check later can handle this | ||
| import cuda.core | ||
| except ImportError: |
Check notice
Code scanning / CodeQL
Empty except Note
|
!build |
|
CI MESSAGE: [40349534]: BUILD STARTED |
a3c3ac6 to
a424878
Compare
|
!build |
|
CI MESSAGE: [40350589]: BUILD STARTED |
Greptile Summary
Important Files Changed
Confidence score: 4/5
Sequence DiagramsequenceDiagram
participant User
participant Pipeline
participant OperatorRegistry
participant Schema
participant OperatorImpl
User->>Pipeline: "fn.debayer(image, blue_position=[0,0])"
Pipeline->>OperatorRegistry: "Lookup 'Debayer' operator"
OperatorRegistry->>Schema: "Get DALI_SCHEMA(Debayer)"
Schema-->>OperatorRegistry: "Return schema with args"
OperatorRegistry->>OperatorImpl: "Create DebayerCPU/DebayerGPU instance"
OperatorImpl-->>Pipeline: "Return operator instance"
Pipeline->>OperatorImpl: "SetupImpl()"
OperatorImpl-->>Pipeline: "Return output descriptor"
Pipeline->>OperatorImpl: "RunImpl()"
OperatorImpl-->>Pipeline: "Return processed output"
Pipeline-->>User: "Return debayered image"
|
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.
Additional Comments (6)
-
dali/operators/image/color/equalize.cc, line 37 (link)style: The docstring reference should use
:meth:nvidia.dali.fn.equalize`` for consistency with DALI's documentation standardsNote: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
-
dali/python/nvidia/dali/plugin/numba/__init__.pyi, line 35 (link)logic: Return type annotation may be incorrect - setup_fn appears to return None but the signature suggests it takes parameters and returns None
Should the setup_fn callable return type be None or should it return something else based on the actual implementation?
-
dali/python/nvidia/dali/plugin/numba/fn/__init__.pyi, line 36 (link)syntax: The
setup_fnparameter type annotation appears malformed - it hasNoneas a return type in the callable signature but should likely return something or be Optional[Callable[...]] without the trailing None -
dali/operators/generic/resize/tensor_resize_cpu.cc, line 49-62 (link)style: The deprecated schema definition duplicates parent metadata (NumInput, NumOutput, SupportVolumetric, AllowSequences) that is already inherited from "TensorResize". Since AddParent("TensorResize") inherits all properties, these redundant specifications are unnecessary.
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
-
dali/test/python/checkpointing/test_dali_stateless_operators.py, line 643-646 (link)logic: inconsistent with other tests - this test only uses fn.audio_resample but the decorator includes both experimental and non-experimental versions
-
dali/python/nvidia/dali/plugin/numba/__init__.py, line 187 (link)logic: Incorrect variable used: should be
num_insinstead ofnum_outsfor the input shapes calculation
25 files reviewed, 6 comments
a424878 to
d5291dc
Compare
|
!build |
|
CI MESSAGE: [40376844]: BUILD STARTED |
|
CI MESSAGE: [40376844]: BUILD FAILED |
|
CI MESSAGE: [40349534]: BUILD FAILED |
d5291dc to
e1c19f9
Compare
|
!build |
|
CI MESSAGE: [40397505]: BUILD STARTED |
e1c19f9 to
0d5e199
Compare
Signed-off-by: Michał Szołucha <[email protected]>
Signed-off-by: Michał Szołucha <[email protected]>
Signed-off-by: Michał Szołucha <[email protected]>
Signed-off-by: Michał Szołucha <[email protected]>
Signed-off-by: Michał Szołucha <[email protected]>
Signed-off-by: Michał Szołucha <[email protected]>
Signed-off-by: Michał Szołucha <[email protected]>
Signed-off-by: Michał Szołucha <[email protected]>
Signed-off-by: Michał Szołucha <[email protected]>
8ffd54c to
27a2895
Compare
|
!build |
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.
1 file reviewed, 1 comment
Additional Comments (1)
|
|
CI MESSAGE: [41659598]: BUILD STARTED |
|
CI MESSAGE: [41659598]: BUILD FAILED |
27a2895 to
93131c0
Compare
|
!build |
|
CI MESSAGE: [41717403]: BUILD STARTED |
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.
29 files reviewed, 15 comments
Signed-off-by: Michał Szołucha <[email protected]>
Signed-off-by: Michał Szołucha <[email protected]>
Signed-off-by: Michał Szołucha <[email protected]>
Signed-off-by: Michał Szołucha <[email protected]>
93131c0 to
114a2cf
Compare
|
!build |
|
CI MESSAGE: [41719186]: BUILD STARTED |
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.
Additional Comments (1)
-
dali/operators/image/color/debayer.cc, line 51 (link)style: Example in documentation still uses experimental namespace and should be updated to use
fn.debayerNote: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
29 files reviewed, 3 comments
| in_types: List[DALIDataType], | ||
| outs_ndim: List[int], | ||
| ins_ndim: List[int], | ||
| setup_fn: Optional[Callable[[Sequence[Sequence[Any]], Sequence[Sequence[Any]], None]]] = None, |
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.
logic: The setup_fn type annotation has an invalid callable signature with None as the third parameter type. Callable type parameters should only specify input argument types, not return types. Should be Optional[Callable[[Sequence[Sequence[Any]], Sequence[Sequence[Any]]], None]] if it returns None, or just Optional[Callable[[Sequence[Sequence[Any]], Sequence[Sequence[Any]]], Any]].
| setup_fn: Optional[Callable[[Sequence[Sequence[Any]], Sequence[Sequence[Any]], None]]] = None, | |
| setup_fn: Optional[Callable[[Sequence[Sequence[Any]], Sequence[Sequence[Any]]], None]] = None, |
| in_shapes_np = _get_shape_view(in_shapes_ptr, in_ndims_ptr, num_outs, num_samples) | ||
| setup_fn(out_shapes_np, in_shapes_np) |
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.
logic: Bug in parameter usage: should be num_ins instead of num_outs for input shapes.
| in_shapes_np = _get_shape_view(in_shapes_ptr, in_ndims_ptr, num_outs, num_samples) | |
| setup_fn(out_shapes_np, in_shapes_np) | |
| in_shapes_np = _get_shape_view(in_shapes_ptr, in_ndims_ptr, num_ins, num_samples) | |
| setup_fn(out_shapes_np, in_shapes_np) |
|
CI MESSAGE: [41717403]: BUILD FAILED |
|
CI MESSAGE: [41719186]: BUILD FAILED |
Category:
Refactoring (Redesign of existing code that doesn't affect functionality)
Description:
This PR takes out of
experimentalthe following operators:experimental.audio_resample
experimental.debayer
experimental.equalize
experimental.filter
experimental.tensor_resize
nvidia.dali.plugin.numba.fn.experimental.numba_function
The
experimentalflavours of the operators is kept to maintain backwards compatibility.Tests are configured to test both: experimental and regular flavours of the operators. Since the backwards compatibility is maintained, both of these operators need to be tested.
TODO:
experimentalflavours)decoders.videoAdditional information:
Affected modules and functionalities:
Key points relevant for the review:
Tests:
Checklist
Documentation
DALI team only
Requirements
REQ IDs: N/A
JIRA TASK: DALI-4504