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

Refactor builder out as an utility #1772

Merged
merged 6 commits into from
Aug 7, 2024
Merged

Refactor builder out as an utility #1772

merged 6 commits into from
Aug 7, 2024

Conversation

gramalingam
Copy link
Collaborator

Move the IR builder utility out as a separate utility.

TODO:

  • Should this be moved into the ir folder?
  • Should Builder be merged with the Tape class?
  • Eventually, merge this with trace-mode onnxscript and expose it to end users.

Copy link

codecov bot commented Aug 2, 2024

Codecov Report

Attention: Patch coverage is 97.22222% with 1 line in your changes missing coverage. Please review.

Project coverage is 75.08%. Comparing base (3b95a44) to head (7c7f738).

Files Patch % Lines
onnxscript/ir/_tape.py 96.87% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1772      +/-   ##
==========================================
- Coverage   75.08%   75.08%   -0.01%     
==========================================
  Files         245      245              
  Lines       26509    26507       -2     
  Branches     4831     4830       -1     
==========================================
- Hits        19904    19902       -2     
  Misses       5675     5675              
  Partials      930      930              

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

Copy link

github-actions bot commented Aug 2, 2024

Test Results

     24 files  ±     0      24 suites  ±0   3h 32m 32s ⏱️ + 13m 28s
 15 759 tests +   464  13 562 ✅ +  644    2 165 💤  -    180   31 ❌  - 1  1 🔥 +1 
467 281 runs  +18 182  97 435 ✅ +2 632  369 576 💤 +15 550  269 ❌  - 1  1 🔥 +1 

For more details on these failures and errors, see this check.

Results for commit 4f1e85c. ± Comparison against base commit 35a35db.

This pull request removes 993 and adds 1457 tests. Note that renamed tests count towards both.
onnxscript.backend.onnx_export_test.TestOnnxBackEnd ‑ test_export2python_produces_correct_onnx_script_model_0289_test_convtranspose_kernel_shape
onnxscript.backend.onnx_export_test.TestOnnxBackEnd ‑ test_export2python_produces_correct_onnx_script_model_0290_test_convtranspose_output_shape
onnxscript.backend.onnx_export_test.TestOnnxBackEnd ‑ test_export2python_produces_correct_onnx_script_model_0291_test_convtranspose_pad
onnxscript.backend.onnx_export_test.TestOnnxBackEnd ‑ test_export2python_produces_correct_onnx_script_model_0292_test_convtranspose_pads
onnxscript.backend.onnx_export_test.TestOnnxBackEnd ‑ test_export2python_produces_correct_onnx_script_model_0293_test_conv_with_autopad_same
onnxscript.backend.onnx_export_test.TestOnnxBackEnd ‑ test_export2python_produces_correct_onnx_script_model_0294_test_conv_with_strides_and_asymmetric_padding
onnxscript.backend.onnx_export_test.TestOnnxBackEnd ‑ test_export2python_produces_correct_onnx_script_model_0295_test_conv_with_strides_no_padding
onnxscript.backend.onnx_export_test.TestOnnxBackEnd ‑ test_export2python_produces_correct_onnx_script_model_0296_test_conv_with_strides_padding
onnxscript.backend.onnx_export_test.TestOnnxBackEnd ‑ test_export2python_produces_correct_onnx_script_model_0297_test_cos
onnxscript.backend.onnx_export_test.TestOnnxBackEnd ‑ test_export2python_produces_correct_onnx_script_model_0298_test_cosh
…
tests.ir.serde_roundtrip_test.SerdeTest ‑ test_serialization_deserialization_produces_same_model_0001_attn_stable_diffusion_unet_0_attn_stable_diffusion_unet_0_onnx
tests.ir.serde_roundtrip_test.SerdeTest ‑ test_serialization_deserialization_produces_same_model_0003_attn_stable_diffusion_unet_without_encoder_hidden_states_1_attn_stable_diffusion_unet_without_encoder_hidden_states_1_onnx
tests.ir.serde_roundtrip_test.SerdeTest ‑ test_serialization_deserialization_produces_same_model_0004_geglu_stable_diffusion_unet_3_geglu_stable_diffusion_unet_3_onnx
tests.ir.serde_roundtrip_test.SerdeTest ‑ test_serialization_deserialization_produces_same_model_0005_geglu_stable_diffusion_unet_0_geglu_stable_diffusion_unet_0_onnx
tests.ir.serde_roundtrip_test.SerdeTest ‑ test_serialization_deserialization_produces_same_model_0007_attn_phi_1_5_0_attn_phi_1_5_0_onnx
tests.ir.serde_roundtrip_test.SerdeTest ‑ test_serialization_deserialization_produces_same_model_0008_geglu_stable_diffusion_unet_2_geglu_stable_diffusion_unet_2_onnx
tests.ir.serde_roundtrip_test.SerdeTest ‑ test_serialization_deserialization_produces_same_model_0009_gelu_phi_1_5_0_gelu_phi_1_5_0_onnx
tests.ir.serde_roundtrip_test.SerdeTest ‑ test_serialization_deserialization_produces_same_model_0010_attn_phi_1_5_1_attn_phi_1_5_1_onnx
tests.ir.serde_roundtrip_test.SerdeTest ‑ test_serialization_deserialization_produces_same_model_0011_gelu_phi_1_5_3_gelu_phi_1_5_3_onnx
tests.ir.serde_roundtrip_test.SerdeTest ‑ test_serialization_deserialization_produces_same_model_0012_attn_phi_1_5_2_attn_phi_1_5_2_onnx
…
This pull request removes 223 skipped tests and adds 1 skipped test. Note that renamed tests count towards both.
onnxscript.backend.onnx_export_test.TestOnnxBackEnd ‑ test_export2python_produces_correct_onnx_script_model_0308_test_deform_conv_with_mask_bias
onnxscript.backend.onnx_export_test.TestOnnxBackEnd ‑ test_export2python_produces_correct_onnx_script_model_0309_test_deform_conv_with_multiple_offset_groups
onnxscript.backend.onnx_export_test.TestOnnxBackEnd ‑ test_export2python_produces_correct_onnx_script_model_0312_test_dequantizelinear
onnxscript.backend.onnx_export_test.TestOnnxBackEnd ‑ test_export2python_produces_correct_onnx_script_model_0313_test_dequantizelinear_axis
onnxscript.backend.onnx_export_test.TestOnnxBackEnd ‑ test_export2python_produces_correct_onnx_script_model_0314_test_dequantizelinear_blocked
onnxscript.backend.onnx_export_test.TestOnnxBackEnd ‑ test_export2python_produces_correct_onnx_script_model_0315_test_dequantizelinear_e4m3fn
onnxscript.backend.onnx_export_test.TestOnnxBackEnd ‑ test_export2python_produces_correct_onnx_script_model_0316_test_dequantizelinear_e4m3fn_float16
onnxscript.backend.onnx_export_test.TestOnnxBackEnd ‑ test_export2python_produces_correct_onnx_script_model_0317_test_dequantizelinear_e4m3fn_zero_point
onnxscript.backend.onnx_export_test.TestOnnxBackEnd ‑ test_export2python_produces_correct_onnx_script_model_0318_test_dequantizelinear_e5m2
onnxscript.backend.onnx_export_test.TestOnnxBackEnd ‑ test_export2python_produces_correct_onnx_script_model_0319_test_dequantizelinear_int16
…
tests.optimizer.test_models.ModelTest ‑ test_model_runs_and_matches_accuracy_after_optimization_1_torchscript_model
This pull request skips 43 and un-skips 1 tests.
onnxscript.backend.onnx_export_test.TestOnnxBackEnd ‑ test_export2python_produces_correct_onnx_script_model_0001_test_acos
onnxscript.backend.onnx_export_test.TestOnnxBackEnd ‑ test_export2python_produces_correct_onnx_script_model_0002_test_acosh
onnxscript.backend.onnx_export_test.TestOnnxBackEnd ‑ test_export2python_produces_correct_onnx_script_model_0003_test_acosh_example
onnxscript.backend.onnx_export_test.TestOnnxBackEnd ‑ test_export2python_produces_correct_onnx_script_model_0004_test_acos_example
onnxscript.backend.onnx_export_test.TestOnnxBackEnd ‑ test_export2python_produces_correct_onnx_script_model_0068_test_asin
onnxscript.backend.onnx_export_test.TestOnnxBackEnd ‑ test_export2python_produces_correct_onnx_script_model_0069_test_asinh
onnxscript.backend.onnx_export_test.TestOnnxBackEnd ‑ test_export2python_produces_correct_onnx_script_model_0070_test_asinh_example
onnxscript.backend.onnx_export_test.TestOnnxBackEnd ‑ test_export2python_produces_correct_onnx_script_model_0071_test_asin_example
onnxscript.backend.onnx_export_test.TestOnnxBackEnd ‑ test_export2python_produces_correct_onnx_script_model_0072_test_atan
onnxscript.backend.onnx_export_test.TestOnnxBackEnd ‑ test_export2python_produces_correct_onnx_script_model_0073_test_atanh
…
tests.function_libs.torch_lib.ops_test.TestOutputConsistencyEagerCPU ‑ test_output_match_opinfo__clamp_min_cpu_float16

♻️ This comment has been updated with latest results.

@justinchuby
Copy link
Collaborator

All sounds good!

@justinchuby justinchuby merged commit 2dd69db into main Aug 7, 2024
31 of 41 checks passed
@justinchuby justinchuby deleted the rama/ir-builder branch August 7, 2024 18:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

2 participants