Skip to content

Conversation

wlemkows
Copy link
Contributor

@wlemkows wlemkows commented Aug 24, 2023

  • We still need to set up our runners with the correct HW to run this workflow successfully.

@wlemkows wlemkows changed the title Test test [cts] Add adapters ignore lists for conformance tests Aug 24, 2023
Copy link
Contributor

@lukaszstolarczuk lukaszstolarczuk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please add some info in commit message? Explain a little why it's needed 😉

@@ -0,0 +1 @@
urContextCreateWithNativeHandleTest.Success/NVIDIA_CUDA_BACKEND___NVIDIA_GeForce_RTX_3060_
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

{{.*}} for device names? Same everywhere else.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@lukaszstolarczuk
Copy link
Contributor

@wlemkows, please use my latest workflow commit from: https://github.com/lukaszstolarczuk/unified-runtime/commits/adapters-hw-ci

@wlemkows wlemkows force-pushed the test-test branch 4 times, most recently from 9a69c46 to 2631607 Compare August 29, 2023 07:30
@wlemkows wlemkows marked this pull request as ready for review August 29, 2023 07:31
@wlemkows
Copy link
Contributor Author

@wlemkows, please use my latest workflow commit from: https://github.com/lukaszstolarczuk/unified-runtime/commits/adapters-hw-ci

Done.

@wlemkows
Copy link
Contributor Author

Can you please add some info in commit message? Explain a little why it's needed 😉

Done.

@@ -0,0 +1,31 @@
#! /usr/bin/env python3
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For now it's fine, but eventually, I'd like to see this script somehow merged with #810. They fulfill a similar role...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, we can plan such changes in the future.

args = parser.parse_args()
result = subprocess.Popen([args.test_command, '--gtest_brief=1'], stdout = subprocess.PIPE, text = True) # nosec B603

while True:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could be simplified to sth like:

for line in result.stdout.readlines():
...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

if (test_case[-1] == ","):
test_case = test_case[:len(test_case)-1]
print(test_case)
exit(0)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Possibly this exit is redundant, the script should exit with zero code at this point.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

print("is: " + input_line)
print("expected: " + match_line.strip())
sys.exit(1)
if optional_line is True:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As I understand, this makes optional lines hard to check for - they can contain literally anything and the test can pass. Can we make opt lines required given a certain test scenario or setup?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That would require us to somehow make the lines "conditional", so something like {{skip if compiler==clang}}. While that might be useful, it's imho out of scope for this work. And no, optional lines can't be anything - this continue here will only move forward the match file, not the input file, so if the line doesn't match either the optional line or the next one, it will fail.

if pat.search(line):
test_case = line.split(" ")[5]
if (test_case[-1] == ","):
test_case = test_case[:len(test_case)-1]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Try simpler test_case.rstrip(',')

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

test_case = test_case[:len(test_case)-1]
print(test_case)

output = result.communicate()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing output print?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At this point I do not intend to use this variable, I just want to call the communicate function. Removed.

wlemkows and others added 2 commits August 29, 2023 17:36
This change enables conformance tests on HW with adapters.
Tests that currently do not pass are ignored, but in the future,
when they are all fixed, tests should pass without using this functionality.
@pbalcer pbalcer merged commit 0ab28ff into oneapi-src:adapters Aug 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants