Skip to content

Commit 64e740a

Browse files
authored
Merge branch 'main' into justinchu/ser-initializer
2 parents 6388d95 + 9bae2b5 commit 64e740a

32 files changed

+1120
-697
lines changed

.github/workflows/lint.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
- main
77
- 'gh/**/base' # ghstack base branches
88
pull_request:
9-
types: [opened, synchronize, reopened, ready_for_review]
9+
merge_group:
1010

1111
concurrency:
1212
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}-${{ github.event_name == 'workflow_dispatch' }}

.github/workflows/main.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ on:
1313

1414
# Allows you to run this workflow manually from the Actions tab
1515
workflow_dispatch:
16+
merge_group:
1617

1718
concurrency:
1819
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}-${{ github.event_name == 'workflow_dispatch' }}

docs/tutorial/rewriter/examples/erfgelu.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ def erf_gelu_pattern_2(op, x):
8787

8888

8989
def gelu(op, x: ir.Value):
90-
return op.Gelu(x, domain="com.microsoft")
90+
return op.Gelu(x, _domain="com.microsoft")
9191

9292

9393
####################################

onnxscript/backend/onnx_export_test.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,10 @@ def skip(pattern: str | Pattern, reason: str, *, condition: bool = True):
100100
"cannot import module, import_module does not work",
101101
),
102102
skip("^test_bitwise_not_3d", "cannot import module, import_module does not work"),
103+
skip(
104+
"^test_resize_upsample_scales_linear_half_pixel_symmetric",
105+
"cannot import module, import_module does not work",
106+
),
103107
)
104108

105109

onnxscript/function_libs/torch_lib/graph_building/_graph_building_torch.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -459,8 +459,18 @@ def _add_attribute_to_torchscript_node(
459459
return node.fs_(key, list(value)) # type: ignore[arg-type]
460460
if isinstance(value[0], int):
461461
return node.is_(key, list(value)) # type: ignore[attr-defined]
462-
raise TypeError(f"Unsupported sequence type '{type(value)}' for attribute '{key}'")
463-
raise TypeError(f"Unsupported attribute type '{type(value)}' for attribute '{key}'")
462+
raise TypeError(
463+
f"Unsupported sequence type '{type(value)}' for attribute '{key}' in "
464+
f"node={node!r}, value is {value!r}"
465+
)
466+
if "TensorProtoDataType" in str(type(value)):
467+
# torch._C._onnx.TensorProtoDataType
468+
return node.i_(key, int(value))
469+
470+
raise TypeError(
471+
f"Unsupported attribute type '{type(value)}' for attribute '{key}' "
472+
f"in node={node!r}, value is {value!r}"
473+
)
464474

465475

466476
@runtime_typing.checked

0 commit comments

Comments
 (0)