add support for Operators for Generic target needed in MAGIA (again)#195
add support for Operators for Generic target needed in MAGIA (again)#195marchioa wants to merge 12 commits into
Conversation
e869395 to
106771a
Compare
8f9ee82 to
11a95c2
Compare
|
Warning Review limit reached
Next review available in: 34 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThis PR adds Generic-target support for new ONNX operators, splits ConvTranspose into 1D/2D variants, hardens input handling for empty names and missing buffer types, and updates related kernels, templates, bindings, tests, and changelog entries. ChangesGeneric target operator support and robustness
Estimated code review effort: 4 (Complex) | ~75 minutes Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 9
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (3)
Deeploy/CommonExtensions/TypeCheckers/SignPropTypeChecker.py (1)
24-43: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick winGuard empty optional inputs before
lookup()
parseInputsskips empty-name tensors, but the checker still walks the rawnode.inputslist and callsctxt.lookup(inputNode.name)unconditionally in bothtypeCheckNodeInputsandtypeInferGlobalCtxt. An omitted optional input will still raiseKeyErrorhere.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@Deeploy/CommonExtensions/TypeCheckers/SignPropTypeChecker.py` around lines 24 - 43, The SignPropTypeChecker logic is still calling ctxt.lookup on raw node.inputs entries, so omitted optional inputs can raise KeyError even though parseInputs skips them. Update SignPropTypeChecker.typeInferGlobalCtxt (and the related input handling in the checker flow) to ignore inputs with empty/missing names before lookup, matching the filtering already used in parseInputs and the node.inputs iteration pattern.Deeploy/DeeployTypes.py (1)
1294-1340: 🩺 Stability & Availability | 🔴 Critical | ⚡ Quick winGuard absent optional inputs here and in
SignPropTypeChecker.typeInferGlobalCtxt
parseInputsskips empty-name ONNX optionals, but these loops still callctxt.lookup(inputNode.name)unconditionally. That will raise on any missing optional input; skip empty names before lookup.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@Deeploy/DeeployTypes.py` around lines 1294 - 1340, The optional-input handling in type checking is incomplete because typeCheckNodeInputs and SignPropTypeChecker.typeInferGlobalCtxt still call ctxt.lookup(inputNode.name) for every input, including skipped ONNX optionals with empty names. Update both loops to guard against empty input names before any lookup or annotation, and only run the existing VariableBuffer/ConstantBuffer logic for real named inputs.TargetLibraries/Generic/src/Layernorm_fp32.c (1)
45-91: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick winFix the LayerNorm gradient formula to sum
dy * scale.The current expression factors
scale[j]outside and averages rawgrad_in, which gives incorrectgrad_outwhenscalevaries across the normalized dimension.Proposed fix
- float32_t sum_dy, sum_dy_scaled; + float32_t sum_dy_scaled, sum_dy_scaled_centered; @@ - sum_dy = 0.0f; sum_dy_scaled = 0.0f; + sum_dy_scaled_centered = 0.0f; @@ - // RW: Calculate sum(dy) and sum(dy * scale * (x - mean) / std) + // RW: Calculate sum(dy * scale) and sum(dy * scale * (x - mean) / std) for (int j = 0; j < lastDimLength; j++) { - sum_dy += grad_in[j + i * lastDimLength]; centered_input = data_in[j + i * lastDimLength] - mean; - sum_dy_scaled += - grad_in[j + i * lastDimLength] * scale[j] * centered_input * inv_std; + float32_t dy_scaled = grad_in[j + i * lastDimLength] * scale[j]; + sum_dy_scaled += dy_scaled; + sum_dy_scaled_centered += dy_scaled * centered_input * inv_std; @@ grad_out[j + i * lastDimLength] = - inv_std * scale[j] * - (grad_in[j + i * lastDimLength] - - (sum_dy / (float32_t)lastDimLength) - - (centered_input * inv_std * inv_std / (float32_t)lastDimLength) * - sum_dy_scaled); + inv_std * + ((grad_in[j + i * lastDimLength] * scale[j]) - + (sum_dy_scaled / (float32_t)lastDimLength) - + (centered_input * inv_std / (float32_t)lastDimLength) * + sum_dy_scaled_centered);🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@TargetLibraries/Generic/src/Layernorm_fp32.c` around lines 45 - 91, The gradient computation in the LayerNorm backward pass is using the wrong reduction: `sum_dy` currently accumulates raw `grad_in` and `scale[j]` is applied outside the summed term, which breaks the formula when `scale` varies. Update the `Layernorm_fp32` gradient logic so the reduction term sums `grad_in[j + i * lastDimLength] * scale[j]` across the normalized dimension, then use that corrected aggregate in the `grad_out` expression while keeping the rest of the `mean`, `variance`, and `sum_dy_scaled` flow intact.
🧹 Nitpick comments (3)
Deeploy/Targets/Generic/Layers.py (1)
817-817: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueAmbiguous unicode multiplication sign in comment.
Ruff (RUF003) flags
×in the comment; consider using ASCIIxfor tooling/portability.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@Deeploy/Targets/Generic/Layers.py` at line 817, The comment in the layer shape annotation uses a Unicode multiplication symbol that triggers Ruff RUF003. Update the inline comment near the affected layer-shape notation to use plain ASCII x instead of × so the documentation remains tooling-friendly and portable.Source: Linters/SAST tools
Deeploy/Targets/Generic/Templates/FloatSeluTemplate.py (1)
9-23: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueConsolidate near-identical fp32 activation templates.
_SeluTemplate,_LeakyReluTemplate(FloatLeakyReluTemplate.py), and_EluTemplate(FloatEluTemplate.py) share identicalalignToContextbodies, differing only in the emitted kernel name and extra scalar args. Consider a shared base class (e.g._UnaryElementwiseTemplate) that computessize/type_widthonce, with subclasses only supplying the template string and any extra parameters.♻️ Suggested shared base
class _ElementwiseFPTemplateBase(NodeTemplate): def alignToContext(self, ctxt, operatorRepresentation): data_in = ctxt.lookup(operatorRepresentation['data_in']) operatorRepresentation['size'] = int(np.prod(data_in.shape)) operatorRepresentation['type_width'] = data_in._type.referencedType.typeWidth return ctxt, operatorRepresentation, []🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@Deeploy/Targets/Generic/Templates/FloatSeluTemplate.py` around lines 9 - 23, The fp32 activation templates duplicate the same alignToContext logic across _SeluTemplate, _LeakyReluTemplate, and _EluTemplate. Introduce a shared base such as _UnaryElementwiseTemplate or _ElementwiseFPTemplateBase in the relevant Float*Template modules to compute size and type_width once from the input lookup, then have each subclass keep only its kernel template string and any extra scalar arguments like alpha/gamma.Deeploy/DeeployTypes.py (1)
1923-1923: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueAdd
strict=tozip().Ruff (B905) flags the missing
strict=parameter; adding it guards against silent shape-count mismatches betweenvalidInputNodes + self.node.outputsand the computed shapes.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@Deeploy/DeeployTypes.py` at line 1923, The zip in the shape-mapping loop is missing the strict parameter, so update the iteration in the node shape assignment logic to use strict= when pairing validInputNodes + self.node.outputs with newInputShapes + newOutputShapes. This change belongs in the code path that processes the node’s input/output shapes, and it should ensure the two sequences must match exactly instead of allowing silent truncation.Source: Linters/SAST tools
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@Deeploy/Targets/Generic/Bindings.py`:
- Around line 330-359: Rename the comprehension variable used in the new
conv-transpose binding lists in BasicConvTranspose1DBindings and
BasicConvTranspose2DBindings from type to dtype (or similar) so it does not
shadow the Python builtin; update every PointerClass(...) reference in those
comprehensions to use the new name, and apply the same cleanup to the additional
affected binding comprehensions noted in the review.
In `@Deeploy/Targets/Generic/Parsers.py`:
- Around line 3349-3356: The helper _is_empty currently uses a parameter named
input, which shadows the built-in and triggers Ruff A002. Rename the parameter
in _is_empty to something non-conflicting, and update the internal isinstance
checks to use the new name while keeping the same behavior for gs.Constant,
gs.Variable, and None.
- Around line 3328-3335: The Col2Im mapper currently indexes data_out.shape[1]
before validating the output rank, so malformed outputs with rank below 2 can
raise IndexError instead of failing cleanly. Update the Col2Im parsing logic in
the branch that computes N and C from data_out.shape to first check that
data_out has at least 2 dimensions, then proceed with the existing shape checks
using data_in, data_out, block_shape, and image_shape so the mapper returns
False for invalid ranks.
- Around line 2798-2867: In the ConvTranspose parser logic, add explicit channel
validation and reset stale optional state before populating
operatorRepresentation. Use the existing ConvTranspose parsing block that
inspects data_in, weight, and data_out to verify weight.shape[0] matches the
input channels and data_out.shape[1] matches weight.shape[1] * rep['group'].
Also guard the optional bias path so empty third inputs are ignored instead of
calling ctxt.lookup("") and ensure rep does not retain a previous 'bias' entry
when len(node.inputs) != 3. Keep the final rep['has_bias'] assignment in sync
with the presence of a valid bias.
- Around line 3373-3390: The Resize parser currently accepts unsupported options
that the C kernel does not handle, so tighten the validation in the Resize
parsing logic to reject them up front. In the parser method that populates
operatorRepresentation for Resize, disallow mode values like cubic and
coord_mode values like tf_crop_and_resize, and also reject any non-default
antialias setting instead of silently accepting it. Keep the existing
allowed-value checks in the same validation block so unsupported combinations
fail before reaching the backend.
- Around line 3231-3258: The Scatter parser in Parsers.py accepts axis and shape
metadata without validating the node contract, so add explicit checks in the
Scatter parsing path before storing values in operatorRepresentation. In the
parser method that reads axis/reduction and in parseNodeCtxt, verify axis is
within the rank of data_in and that data_out and updates shapes are compatible
with the Scatter/ScatterElements semantics for the selected reduction, returning
False when the contract is invalid. Keep the validation close to the existing
lookups of data_in, indices, updates, and data_out so malformed nodes are
rejected before code generation.
In `@Deeploy/Targets/Generic/TypeCheckers.py`:
- Around line 56-64: The sign-consistency check in
ConcatChecker._inferSignedness is incorrect because the second all() wraps the
comprehension in an extra list, so mixed signed inputs can slip through. Fix the
assert to evaluate the per-input booleans directly for both positive and
negative cases, and simplify the comparisons to use truthy/falsy checks instead
of == True/== False to satisfy Ruff E712.
In `@TargetLibraries/Generic/src/ConvTranspose_fp32.c`:
- Around line 7-82: The ConvTranspose kernels only handle the simple zero-pad,
unit-dilation, ungrouped case, so update the parser/validation path around
ConvTranspose1d_fp32 and ConvTranspose2d_fp32 to reject unsupported attribute
combinations instead of silently accepting them. Add explicit guards for
non-default pads, output_padding, dilations, and group values, or route these
attributes into the kernel if you intend to support them; make the checks in the
ConvTranspose parsing/template code that feeds these functions.
In `@TargetLibraries/Generic/src/Scatter.c`:
- Around line 16-42: The Scatter implementation in Scatter.c is using a
scalar-only index/update loop that matches ScatterElements, not ONNX Scatter, so
trailing-slice updates are handled incorrectly. Update the Scatter kernel entry
point and the main loop so Scatter is either restricted to the ScatterElements
path or routed to a separate slice-update implementation; use the existing
stride/index logic around indices_size, stride_data, stride_idx, and the fi loop
to locate the code that needs to be split.
---
Outside diff comments:
In `@Deeploy/CommonExtensions/TypeCheckers/SignPropTypeChecker.py`:
- Around line 24-43: The SignPropTypeChecker logic is still calling ctxt.lookup
on raw node.inputs entries, so omitted optional inputs can raise KeyError even
though parseInputs skips them. Update SignPropTypeChecker.typeInferGlobalCtxt
(and the related input handling in the checker flow) to ignore inputs with
empty/missing names before lookup, matching the filtering already used in
parseInputs and the node.inputs iteration pattern.
In `@Deeploy/DeeployTypes.py`:
- Around line 1294-1340: The optional-input handling in type checking is
incomplete because typeCheckNodeInputs and
SignPropTypeChecker.typeInferGlobalCtxt still call ctxt.lookup(inputNode.name)
for every input, including skipped ONNX optionals with empty names. Update both
loops to guard against empty input names before any lookup or annotation, and
only run the existing VariableBuffer/ConstantBuffer logic for real named inputs.
In `@TargetLibraries/Generic/src/Layernorm_fp32.c`:
- Around line 45-91: The gradient computation in the LayerNorm backward pass is
using the wrong reduction: `sum_dy` currently accumulates raw `grad_in` and
`scale[j]` is applied outside the summed term, which breaks the formula when
`scale` varies. Update the `Layernorm_fp32` gradient logic so the reduction term
sums `grad_in[j + i * lastDimLength] * scale[j]` across the normalized
dimension, then use that corrected aggregate in the `grad_out` expression while
keeping the rest of the `mean`, `variance`, and `sum_dy_scaled` flow intact.
---
Nitpick comments:
In `@Deeploy/DeeployTypes.py`:
- Line 1923: The zip in the shape-mapping loop is missing the strict parameter,
so update the iteration in the node shape assignment logic to use strict= when
pairing validInputNodes + self.node.outputs with newInputShapes +
newOutputShapes. This change belongs in the code path that processes the node’s
input/output shapes, and it should ensure the two sequences must match exactly
instead of allowing silent truncation.
In `@Deeploy/Targets/Generic/Layers.py`:
- Line 817: The comment in the layer shape annotation uses a Unicode
multiplication symbol that triggers Ruff RUF003. Update the inline comment near
the affected layer-shape notation to use plain ASCII x instead of × so the
documentation remains tooling-friendly and portable.
In `@Deeploy/Targets/Generic/Templates/FloatSeluTemplate.py`:
- Around line 9-23: The fp32 activation templates duplicate the same
alignToContext logic across _SeluTemplate, _LeakyReluTemplate, and _EluTemplate.
Introduce a shared base such as _UnaryElementwiseTemplate or
_ElementwiseFPTemplateBase in the relevant Float*Template modules to compute
size and type_width once from the input lookup, then have each subclass keep
only its kernel template string and any extra scalar arguments like alpha/gamma.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: ef2b0826-312f-44da-8560-a69d4100ca0c
📒 Files selected for processing (70)
CHANGELOG.mdDeeploy/CommonExtensions/TypeCheckers/SignPropTypeChecker.pyDeeploy/DeeployTypes.pyDeeploy/Targets/Generic/Bindings.pyDeeploy/Targets/Generic/Layers.pyDeeploy/Targets/Generic/Parsers.pyDeeploy/Targets/Generic/Platform.pyDeeploy/Targets/Generic/Templates/Col2ImTemplate.pyDeeploy/Targets/Generic/Templates/ConvTransposeTemplate.pyDeeploy/Targets/Generic/Templates/FloatEluTemplate.pyDeeploy/Targets/Generic/Templates/FloatLeakyReluTemplate.pyDeeploy/Targets/Generic/Templates/FloatSeluTemplate.pyDeeploy/Targets/Generic/Templates/ResizeTemplate.pyDeeploy/Targets/Generic/Templates/ScatterTemplate.pyDeeploy/Targets/Generic/TypeCheckers.pyDeeployTest/Tests/Kernels/FP32/Col2Im/inputs.npzDeeployTest/Tests/Kernels/FP32/Col2Im/network.onnxDeeployTest/Tests/Kernels/FP32/Col2Im/outputs.npzDeeployTest/Tests/Kernels/FP32/ConvTranspose/Regular_1D/inputs.npzDeeployTest/Tests/Kernels/FP32/ConvTranspose/Regular_1D/network.onnxDeeployTest/Tests/Kernels/FP32/ConvTranspose/Regular_1D/outputs.npzDeeployTest/Tests/Kernels/FP32/ConvTranspose/Regular_2D/inputs.npzDeeployTest/Tests/Kernels/FP32/ConvTranspose/Regular_2D/network.onnxDeeployTest/Tests/Kernels/FP32/ConvTranspose/Regular_2D/outputs.npzDeeployTest/Tests/Kernels/FP32/Elu/inputs.npzDeeployTest/Tests/Kernels/FP32/Elu/network.onnxDeeployTest/Tests/Kernels/FP32/Elu/outputs.npzDeeployTest/Tests/Kernels/FP32/LeakyRelu/inputs.npzDeeployTest/Tests/Kernels/FP32/LeakyRelu/network.onnxDeeployTest/Tests/Kernels/FP32/LeakyRelu/outputs.npzDeeployTest/Tests/Kernels/FP32/Resize/inputs.npzDeeployTest/Tests/Kernels/FP32/Resize/network.onnxDeeployTest/Tests/Kernels/FP32/Resize/outputs.npzDeeployTest/Tests/Kernels/FP32/ScatterElements/inputs.npzDeeployTest/Tests/Kernels/FP32/ScatterElements/network.onnxDeeployTest/Tests/Kernels/FP32/ScatterElements/outputs.npzDeeployTest/Tests/Kernels/FP32/Selu/inputs.npzDeeployTest/Tests/Kernels/FP32/Selu/network.onnxDeeployTest/Tests/Kernels/FP32/Selu/outputs.npzDeeployTest/Tests/Kernels/Integer/Col2Im/inputs.npzDeeployTest/Tests/Kernels/Integer/Col2Im/network.onnxDeeployTest/Tests/Kernels/Integer/Col2Im/outputs.npzDeeployTest/Tests/Kernels/Integer/Resize/inputs.npzDeeployTest/Tests/Kernels/Integer/Resize/network.onnxDeeployTest/Tests/Kernels/Integer/Resize/outputs.npzDeeployTest/Tests/Kernels/Integer/ScatterElements/inputs.npzDeeployTest/Tests/Kernels/Integer/ScatterElements/network.onnxDeeployTest/Tests/Kernels/Integer/ScatterElements/outputs.npzDeeployTest/test_generic_config.pyTargetLibraries/Generic/inc/DeeployBasicMath.hTargetLibraries/Generic/inc/kernel/Col2Im.hTargetLibraries/Generic/inc/kernel/ConvTranspose1d_fp32.hTargetLibraries/Generic/inc/kernel/ConvTranspose_fp32.hTargetLibraries/Generic/inc/kernel/Elu.hTargetLibraries/Generic/inc/kernel/LeakyRelu.hTargetLibraries/Generic/inc/kernel/Resize.hTargetLibraries/Generic/inc/kernel/Scatter.hTargetLibraries/Generic/inc/kernel/Selu.hTargetLibraries/Generic/src/Col2Im.cTargetLibraries/Generic/src/ConvTranspose1d_fp32.cTargetLibraries/Generic/src/ConvTranspose_fp32.cTargetLibraries/Generic/src/Elu_fp32.cTargetLibraries/Generic/src/GlobalAveragePool_fp32.cTargetLibraries/Generic/src/GlobalMaxPool_fp32.cTargetLibraries/Generic/src/HardSwish_fp32.cTargetLibraries/Generic/src/Layernorm_fp32.cTargetLibraries/Generic/src/LeakyRelu_fp32.cTargetLibraries/Generic/src/Resize.cTargetLibraries/Generic/src/Scatter.cTargetLibraries/Generic/src/Selu_fp32.c
💤 Files with no reviewable changes (3)
- TargetLibraries/Generic/src/GlobalMaxPool_fp32.c
- TargetLibraries/Generic/inc/kernel/ConvTranspose1d_fp32.h
- TargetLibraries/Generic/src/ConvTranspose1d_fp32.c
There was a problem hiding this comment.
🧹 Nitpick comments (1)
Deeploy/Targets/Generic/Templates/FloatSqrtTemplate.py (1)
10-19: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueCollapse the Sqrt template override —
FloatSqrtTemplate.pysetsoperatorRepresentation['data_type'], but nothing in the Sqrt template path uses it and the template string never interpolates${data_type}. This can be simplified to_FloatUnaryTemplatelike the other unary templates unless a Sqrt-specific consumer is added later.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@Deeploy/Targets/Generic/Templates/FloatSqrtTemplate.py` around lines 10 - 19, The _SqrtTemplate.alignToContext override is only assigning operatorRepresentation['data_type'] and does not affect the Sqrt template output, so simplify this path by removing the Sqrt-specific override and relying on _FloatUnaryTemplate like the other unary templates. If you keep _SqrtTemplate, ensure there is a real Sqrt-specific consumer of data_type in the template or downstream logic; otherwise delete the unused lookup and assignment in alignToContext.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@Deeploy/Targets/Generic/Templates/FloatSqrtTemplate.py`:
- Around line 10-19: The _SqrtTemplate.alignToContext override is only assigning
operatorRepresentation['data_type'] and does not affect the Sqrt template
output, so simplify this path by removing the Sqrt-specific override and relying
on _FloatUnaryTemplate like the other unary templates. If you keep
_SqrtTemplate, ensure there is a real Sqrt-specific consumer of data_type in the
template or downstream logic; otherwise delete the unused lookup and assignment
in alignToContext.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 8f52b7bf-3a84-4d17-ba75-5701a9070f7c
📒 Files selected for processing (20)
Deeploy/CommonExtensions/TypeCheckers/SignPropTypeChecker.pyDeeploy/DeeployTypes.pyDeeploy/Targets/Generic/Bindings.pyDeeploy/Targets/Generic/Layers.pyDeeploy/Targets/Generic/Parsers.pyDeeploy/Targets/Generic/Templates/FloatCeilTemplate.pyDeeploy/Targets/Generic/Templates/FloatClipTemplate.pyDeeploy/Targets/Generic/Templates/FloatEluTemplate.pyDeeploy/Targets/Generic/Templates/FloatExpTemplate.pyDeeploy/Targets/Generic/Templates/FloatFloorTemplate.pyDeeploy/Targets/Generic/Templates/FloatHardSigmoidTemplate.pyDeeploy/Targets/Generic/Templates/FloatHardSwishTemplate.pyDeeploy/Targets/Generic/Templates/FloatLeakyReluTemplate.pyDeeploy/Targets/Generic/Templates/FloatSeluTemplate.pyDeeploy/Targets/Generic/Templates/FloatSigmoidTemplate.pyDeeploy/Targets/Generic/Templates/FloatSqrtTemplate.pyDeeploy/Targets/Generic/Templates/FloatSwishTemplate.pyDeeploy/Targets/Generic/Templates/FloatUnaryTemplate.pyDeeploy/Targets/Generic/TypeCheckers.pyTargetLibraries/Generic/src/Layernorm_fp32.c
✅ Files skipped from review due to trivial changes (1)
- Deeploy/Targets/Generic/Templates/FloatUnaryTemplate.py
🚧 Files skipped from review as they are similar to previous changes (6)
- Deeploy/CommonExtensions/TypeCheckers/SignPropTypeChecker.py
- Deeploy/DeeployTypes.py
- Deeploy/Targets/Generic/Bindings.py
- Deeploy/Targets/Generic/Layers.py
- Deeploy/Targets/Generic/Parsers.py
- Deeploy/Targets/Generic/TypeCheckers.py

This PR is a PR193 follow up that adds the support for Operators needed for MAGIA that are not available in the Generic target.
Added
fp32onlyfp32onlyfp32onlys8,u8, andfp32. Easily extendible to other standard datatypes as it is implemented with a define-based template.s8,u8, andfp32. Exactly as in ScatterElements, it is implemented with a define-based template supporting any standard datatype.s8,u8, andfp32. Easily extendible to other standard datatypes not because of a define-based template but because implemented with void pointers and simple helper functions depending on the data type.fp32only.Changed
DeeployTypes.py: I added the possibility for an onnx operator to have empty inputs (e.g., Resize). I simply added some guards in the input parsing, buffer allocation and initialization, etc. to skip those inputs that have no name or type.Fixed
PR Merge Checklist
develcommit and pointing todevel.CHANGELOG.mdfile has been updated.