Skip to content

Commit

Permalink
[dynamo] Verify the default value is passed by kwargs
Browse files Browse the repository at this point in the history
  • Loading branch information
penguin-wwy committed Mar 11, 2024
1 parent 6b3a7d0 commit 0d50ec2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
8 changes: 1 addition & 7 deletions projects/pt1/e2e_testing/xfail_sets.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,9 +262,7 @@
"ElementwiseSubScalarFloatModule_basic",
"ElementwiseSubScalarIntModule_basic",

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

Expand All @@ -274,10 +272,6 @@
"TensorFloatModule_basic",
"TensorIntModule_basic",

# ERROR: Exception: Unsupported: missing default value for argument 0 in schema for aten.randn.generator
"RandnGeneratorF64Module_basic",
"RandnGeneratorModule_basic",

# START tests failing due to: complex floating point ops
# END tests failing due to: complex floating point ops

Expand Down
2 changes: 1 addition & 1 deletion projects/pt1/python/torch_mlir/_dynamo_fx_importer.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def _check_meta_val(node):
assert len(node.args) < len(node.target._schema.arguments)
for i, argument in enumerate(
node.target._schema.arguments[len(node.args):]):
if not argument.has_default_value():
if not argument.has_default_value() and argument.name not in node.kwargs:
raise Exception(
f"Unsupported: missing default value for argument {i} in schema for {node.target}"
)
Expand Down

0 comments on commit 0d50ec2

Please sign in to comment.