Repository navigation
[torchlib] Add aten::upsample_linear1d.vec - #3166
Open
Kyunggeun Lee (kyunggeunlee) wants to merge 1 commit into
Open
Kyunggeun Lee (kyunggeunlee) wants to merge 1 commit into
Kyunggeun Lee (kyunggeunlee) wants to merge 1 commit into
Conversation
Add a conversion rule for the .vec overload of upsample_linear1d, mirroring upsample_bilinear2d.vec, along with sample inputs, an OpInfo and a test entry. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: Kyunggeun Lee <kyunggeu@qti.qualcomm.com>
Author
|
@microsoft-github-policy-service agree company="Qualcomm" |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
resolves #3165
Summary
Adds the missing
aten::upsample_linear1d.vecoverload to torchlib.aten::upsample_linear1dwas already implemented, but the.vecoverload,upsample_linear1d.vec(Tensor input, SymInt[]? output_size, bool align_corners, float[]? scale_factors), was not.Changes
onnxscript/function_libs/torch_lib/ops/nn.py: addaten_upsample_linear1d_vec. It mirrorsaten_upsample_bilinear2d_vec:scale_factorsis given, it resizes via_aten_upsample_scales._aten_upsample_output_size, which requiresoutput_size.mode="linear", withalign_cornersmapped toalign_corners/half_pixelthrough_get_upsample_align_corners_mode.tests/function_libs/torch_lib/extra_opinfo.py: addsample_inputs_upsample_linear1d_vecand theops.aten.upsample_linear1d.vecOpInfo. Samples cover output sizes 3, 1 and 5, andscale_factorsof[1.7],[0.6]and[4.2], each withalign_cornersboth True and False.tests/function_libs/torch_lib/ops_test_data.py: registerops.aten.upsample_linear1d.vec.Testing
ops.aten.upsample_linear1d.vecoutput-match test passes on all samples, includingalign_corners=Falsewithscale_factors. No xfail is needed.ops.aten.upsample_linear1dtest is unchanged. It passes, and its knownalign_corners=Falsewithscalesxfail still applies.test_script_function_passes_checkertests are skipped for both ops, because trace-only functions have no function proto.🤖 Generated with Claude Code