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

[dynamo] Verify the default value is passed by kwargs #2998

Merged
merged 2 commits into from
Apr 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 4 additions & 10 deletions projects/pt1/e2e_testing/xfail_sets.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,18 +252,14 @@
# ERROR: Exception: Unsupported: missing default value for argument 0 in schema for aten.div.Tensor_mode
"ElementwiseAtenFloorDivideScalarNegativeModule_basic",
"ElementwiseAtenFloorDivideScalarModule_basic",
"ElementwiseDivTensorRoundingModeFloorModule_basic",
"ElementwiseDivTensorRoundingModeTruncModule_basic",
"ElementwiseDivTensorRoundingModeFloorStaticModule_basic",
"ElementwiseDivTensorRoundingModeTruncStaticModule_basic",
"ElementwiseDivTensorRoundingModeFloorIntStaticModule_basic",
"ElementwiseDivTensorRoundingModeTruncIntStaticModule_basic",
"ElementwiseDivScalarRoundingModeFloorModule_basic",
"ElementwiseDivScalarRoundingModeTruncModule_basic",
"ElementwiseDivScalarRoundingModeFloorStaticModule_basic",
"ElementwiseDivScalarRoundingModeTruncStaticModule_basic",
"ElementwiseDivScalarRoundingModeFloorIntStaticModule_basic",
"ElementwiseDivScalarRoundingModeTruncIntStaticModule_basic",

# ERROR: 'torch.aten.mul.Tensor' op operand #1 must be Any Torch tensor type, but got '!torch.int'
"AdaptiveAvgPool1dStaticLargerOutput_basic",
"AdaptiveAvgPool1dGeneralDynamic_basic",
"AdaptiveAvgPool1dGeneralDynamicNoBatches_basic",
Expand All @@ -276,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 Expand Up @@ -343,8 +335,10 @@
"IntImplicitModule_basic",

# Others
"ExponentialModule_basic",
"GridSamplerBasic1_basic",
"GridSamplerBasic2_basic",
"GridSamplerBasic3_basic",
"FakeQuantizePerTensorAffineModule_basic",
"FakeQuantizePerTensorAffineDynamicShapeModule_basic",
"FakeQuantizePerTensorAffineRoundToEvenModule_basic",
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 @@ -78,7 +78,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
Loading