Skip to content

Commit e1c672e

Browse files
author
wenyangwang
committed
[dynamo] Verify the default value is passed by kwargs
1 parent 6b3a7d0 commit e1c672e

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

Diff for: projects/pt1/e2e_testing/xfail_sets.py

+1-7
Original file line numberDiff line numberDiff line change
@@ -262,9 +262,7 @@
262262
"ElementwiseSubScalarFloatModule_basic",
263263
"ElementwiseSubScalarIntModule_basic",
264264

265-
# ERROR: Exception: Unsupported: missing default value for argument 0 in schema for aten.div.Tensor_mode
266-
"ElementwiseDivRoundingModeFloorModule_basic",
267-
"ElementwiseDivRoundingModeTruncModule_basic",
265+
# ERROR: 'torch.aten.mul.Tensor' op operand #1 must be Any Torch tensor type, but got '!torch.int'
268266
"AdaptiveAvgPool1dStaticLargerOutput_basic",
269267
"AdaptiveAvgPool1dGeneralDynamic_basic",
270268

@@ -274,10 +272,6 @@
274272
"TensorFloatModule_basic",
275273
"TensorIntModule_basic",
276274

277-
# ERROR: Exception: Unsupported: missing default value for argument 0 in schema for aten.randn.generator
278-
"RandnGeneratorF64Module_basic",
279-
"RandnGeneratorModule_basic",
280-
281275
# START tests failing due to: complex floating point ops
282276
# END tests failing due to: complex floating point ops
283277

Diff for: projects/pt1/python/torch_mlir/_dynamo_fx_importer.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ def _check_meta_val(node):
7777
assert len(node.args) < len(node.target._schema.arguments)
7878
for i, argument in enumerate(
7979
node.target._schema.arguments[len(node.args):]):
80-
if not argument.has_default_value():
80+
if not argument.has_default_value() and argument.name not in node.kwargs:
8181
raise Exception(
8282
f"Unsupported: missing default value for argument {i} in schema for {node.target}"
8383
)

0 commit comments

Comments
 (0)