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

Add op(upsample nearst1/2/3d) | feat(torchlib) #1246

Merged
merged 17 commits into from
Feb 5, 2024

Conversation

xiaowuhu
Copy link
Contributor

@xiaowuhu xiaowuhu commented Jan 5, 2024

This function works well in FullGraph mode, but failed in Eager mode. Something wrong?

Copy link

codecov bot commented Jan 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (670dbfa) 78.88% compared to head (221d313) 79.00%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1246      +/-   ##
==========================================
+ Coverage   78.88%   79.00%   +0.11%     
==========================================
  Files         119      119              
  Lines       15715    15762      +47     
  Branches     2482     2486       +4     
==========================================
+ Hits        12397    12452      +55     
+ Misses       2910     2902       -8     
  Partials      408      408              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

github-actions bot commented Jan 5, 2024

Test Results

     24 files  ±  0      24 suites  ±0   1h 42m 7s ⏱️ + 7m 39s
 11 406 tests +  4   8 438 ✅ + 7    2 954 💤  -   4   14 ❌ +1 
257 886 runs   - 277  58 798 ✅ +82  198 882 💤  - 360  206 ❌ +1 

For more details on these failures, see this check.

Results for commit 11101c9. ± Comparison against base commit 670dbfa.

This pull request removes 27 and adds 31 tests. Note that renamed tests count towards both.
onnxscript.function_libs.tools.torch_lib.deduce_type_constraints_test.TestDeduceTypeConstraints ‑ test_deduce_type_constraints_does_not_crash_for_onnx_function__aten_upsample_nearest2d_onnx
onnxscript.tests.function_libs.torch_lib.ops_test.TestFunctionValidity ‑ test_function_has_op_schema_331_aten_upsample_trilinear3d
onnxscript.tests.function_libs.torch_lib.ops_test.TestFunctionValidity ‑ test_function_has_op_schema_333_aten_ones_like
onnxscript.tests.function_libs.torch_lib.ops_test.TestFunctionValidity ‑ test_function_has_op_schema_334_aten_roll
onnxscript.tests.function_libs.torch_lib.ops_test.TestFunctionValidity ‑ test_function_has_op_schema_335_aten_roll_complex
onnxscript.tests.function_libs.torch_lib.ops_test.TestFunctionValidity ‑ test_function_has_op_schema_336_aten_scatter_reduce
onnxscript.tests.function_libs.torch_lib.ops_test.TestFunctionValidity ‑ test_function_has_op_schema_337_aten_slice_scatter
onnxscript.tests.function_libs.torch_lib.ops_test.TestFunctionValidity ‑ test_function_has_op_schema_338_aten_slice
onnxscript.tests.function_libs.torch_lib.ops_test.TestFunctionValidity ‑ test_function_has_op_schema_339_aten_stft
onnxscript.tests.function_libs.torch_lib.ops_test.TestFunctionValidity ‑ test_function_has_op_schema_340_aten_sum_dim_IntList
…
onnxscript.function_libs.tools.torch_lib.deduce_type_constraints_test.TestDeduceTypeConstraints ‑ test_deduce_type_constraints_does_not_crash_for_onnx_function__aten_upsample_nearest1d_scales
onnxscript.tests.function_libs.torch_lib.ops_test.TestFunctionValidity ‑ test_function_has_op_schema_331_aten_upsample_nearest1d
onnxscript.tests.function_libs.torch_lib.ops_test.TestFunctionValidity ‑ test_function_has_op_schema_333_aten_upsample_nearest3d
onnxscript.tests.function_libs.torch_lib.ops_test.TestFunctionValidity ‑ test_function_has_op_schema_334_aten_upsample_trilinear3d
onnxscript.tests.function_libs.torch_lib.ops_test.TestFunctionValidity ‑ test_function_has_op_schema_335_aten_ones_like
onnxscript.tests.function_libs.torch_lib.ops_test.TestFunctionValidity ‑ test_function_has_op_schema_336_aten_roll
onnxscript.tests.function_libs.torch_lib.ops_test.TestFunctionValidity ‑ test_function_has_op_schema_337_aten_roll_complex
onnxscript.tests.function_libs.torch_lib.ops_test.TestFunctionValidity ‑ test_function_has_op_schema_338_aten_scatter_reduce
onnxscript.tests.function_libs.torch_lib.ops_test.TestFunctionValidity ‑ test_function_has_op_schema_339_aten_slice_scatter
onnxscript.tests.function_libs.torch_lib.ops_test.TestFunctionValidity ‑ test_function_has_op_schema_340_aten_slice
…

♻️ This comment has been updated with latest results.

@justinchuby
Copy link
Collaborator

For some reason it seems size became a string. Was the input order correct in the test cases?

@justinchuby
Copy link
Collaborator

We may modify onnxscript\evaluator.py:484 to print out inputs as well when there is an error

@justinchuby justinchuby added the topic: torch_lib Related to the torch/aten function lib in development label Jan 18, 2024
@justinchuby justinchuby changed the title add op(upsample nearst1d) | feat(torchlib) Add op(upsample nearst1d) | feat(torchlib) Jan 18, 2024
@xiaowuhu xiaowuhu marked this pull request as draft January 22, 2024 10:57
@xiaowuhu xiaowuhu marked this pull request as ready for review January 25, 2024 11:31
@xiaowuhu xiaowuhu changed the title Add op(upsample nearst1d) | feat(torchlib) Add op(upsample nearst1/2/3d) | feat(torchlib) Jan 25, 2024
Copy link
Collaborator

@justinchuby justinchuby left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with comments addressed. Thanks!

onnxscript/function_libs/torch_lib/ops/nn.py Outdated Show resolved Hide resolved
onnxscript/function_libs/torch_lib/ops/nn.py Outdated Show resolved Hide resolved
onnxscript/function_libs/torch_lib/ops/nn.py Outdated Show resolved Hide resolved
onnxscript/function_libs/torch_lib/ops/nn.py Outdated Show resolved Hide resolved
onnxscript/tests/function_libs/torch_lib/ops_test_data.py Outdated Show resolved Hide resolved
onnxscript/tests/function_libs/torch_lib/ops_test_data.py Outdated Show resolved Hide resolved
onnxscript/tests/function_libs/torch_lib/ops_test_data.py Outdated Show resolved Hide resolved
onnxscript/tests/function_libs/torch_lib/ops_test_data.py Outdated Show resolved Hide resolved
onnxscript/tests/function_libs/torch_lib/ops_test_data.py Outdated Show resolved Hide resolved
@xiaowuhu xiaowuhu merged commit ce3eb4a into main Feb 5, 2024
30 of 35 checks passed
@xiaowuhu xiaowuhu deleted the xiaowu/addOp(upsample-nearst1d) branch February 5, 2024 07:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: torch_lib Related to the torch/aten function lib in development
Projects
Development

Successfully merging this pull request may close these issues.

2 participants