[CI] Removes type2 in process_registration and fix Windows GPU Reduced Ops CI Pipeline (#16530)

### Description
Windows GPU Reduced Ops CI Pipeline is broken due to the introduction of
a second template type in registered kernels. The python code checking
the registration is broken due to that. This PR addresses this issue on
the python side by keeping only one type equal to the concatenation of
the two types.
This commit is contained in:
Xavier Dupré 2023-07-07 18:21:06 +02:00 committed by GitHub
parent 6be7b03e53
commit 47a0289ee6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 6 deletions

View file

@ -94,7 +94,6 @@ class RegistrationProcessor:
start_version: int,
end_version: typing.Optional[int] = None,
type: typing.Optional[str] = None,
type2: typing.Optional[str] = None,
):
"""
Process lines that contain a kernel registration.
@ -103,8 +102,7 @@ class RegistrationProcessor:
:param operator: Operator type
:param start_version: Start version
:param end_version: End version or None if unversioned registration
:param type: Type used in registration, if this is a typed registration
:param type2: Second type used in registration, if this is a typed registration
:param type: Type or types used in registration, if this is a typed registration
"""
pass
@ -218,7 +216,7 @@ def _process_lines(lines: typing.List[str], offset: int, registration_processor:
arg.strip() for arg in code_line[trim_at : -len(end_mark)].split(",")
)
registration_processor.process_registration(
lines_to_process, domain, op_type, int(start_version), None, type1, type2
lines_to_process, domain, op_type, int(start_version), None, type1 + ", " + type2
)
elif onnx_versioned_two_typed_op in code_line:
@ -229,7 +227,7 @@ def _process_lines(lines: typing.List[str], offset: int, registration_processor:
arg.strip() for arg in code_line[trim_at : -len(end_mark)].split(",")
)
registration_processor.process_registration(
lines_to_process, domain, op_type, int(start_version), int(end_version), type1, type2
lines_to_process, domain, op_type, int(start_version), int(end_version), type1 + ", " + type2
)
else:

View file

@ -60,7 +60,6 @@ class RegistrationValidator(op_registration_utils.RegistrationProcessor):
start_version: int,
end_version: typing.Optional[int] = None,
type: typing.Optional[str] = None,
type2: typing.Optional[str] = None,
):
self.all_registrations.append(
RegistrationInfo(