Skip to content

Commit ffae748

Browse files
committed
Update on "Create env to test with TORCHLIB_EXPERIMENTAL_PREFER_TRACING on | test(torchlib)"
### Changes - Create env to test with TORCHLIB_EXPERIMENTAL_PREFER_TRACING on - Test with Python 3.11 as well - Fixes #1061 [ghstack-poisoned]
2 parents 0e1b0e6 + ae2388e commit ffae748

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

onnxscript/tests/function_libs/torch_lib/ops_test_common.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,10 @@ def add_decorate_info(
161161
ops_mapping = {(info.name, info.variant_test_name): info for info in all_opinfos}
162162
for decorate_meta in skip_or_xfails:
163163
opinfo = ops_mapping.get((decorate_meta.op_name, decorate_meta.variant_name))
164+
if opinfo is None and not decorate_meta.enabled_if:
165+
# If the OpInfo doesn't exist and it is not enabled, we skip the OpInfo
166+
# because it could be an OpInfo that is in torch-nightly but not older versions.
167+
continue
164168
assert (
165169
opinfo is not None
166170
), f"Couldn't find OpInfo for {decorate_meta}. Did you need to specify variant_name?"

0 commit comments

Comments
 (0)