Skip to content

[SYCL][Tests] Add more syclbin-dump tests #19272

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

Merged
merged 10 commits into from
Jul 9, 2025

Conversation

dm-vodopyanov
Copy link
Contributor

No description provided.

@dm-vodopyanov dm-vodopyanov requested a review from a team as a code owner July 2, 2025 15:31
@dm-vodopyanov dm-vodopyanov requested a review from slawekptak July 2, 2025 15:31
@@ -50,19 +50,6 @@ raw_ostream &operator<<(raw_ostream &OS, const ScopedIndent &) {
return OS.indent(CurrentIndentationLevel);
}

std::string_view StateToString(llvm::object::SYCLBIN::BundleState State) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed as it was not used and it was affecting the code coverage

Copy link
Contributor

Choose a reason for hiding this comment

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

Should we move this to an Inputs subfolder?

Copy link
Contributor

@steffenlarsen steffenlarsen left a comment

Choose a reason for hiding this comment

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

Overall I think this looks good!

// CHECK-EXECUTABLE-BMG-G21-GPU-DEVICE-ARCH-NEXT: SYCLBIN/native device code image metadata:
// CHECK-EXECUTABLE-BMG-G21-GPU-DEVICE-ARCH-NEXT: arch:{{.*}}
// CHECK-EXECUTABLE-BMG-G21-GPU-DEVICE-ARCH-NEXT: target:{{.*}}spir64_gen-unknown
// CHECK-EXECUTABLE-BMG-G21-GPU-DEVICE-ARCH-NEXT: Raw native device code image bytes: <Binary blob of {{.*}} bytes>
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it would be fine to have this in sycl/test instead.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Let's try, should work. Still investigating though why it doesn't work in CI - as it works locally. The binary now in the install folder, but still it didn't fix the issue, probably need to add to some other place in CMake files.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The only reason I see not putting it to sycl/test folder is that the test has a dependency on NEO - especially on ocloc binary, and sycl/test tests should be device-agnostic (no backend runtimes should be present in the environment)

Copy link
Contributor

Choose a reason for hiding this comment

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

Hmm, good point. Should it have //REQUIRES: ocloc?

Copy link
Contributor

Choose a reason for hiding this comment

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

Let's try, should work. Still investigating though why it doesn't work in CI - as it works locally. The binary now in the install folder, but still it didn't fix the issue, probably need to add to some other place in CMake files.

Maybe we need to do something like in https://github.com/intel/llvm/blob/sycl/sycl/test-e2e/lit.cfg.py#L627?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Let's try, should work. Still investigating though why it doesn't work in CI - as it works locally. The binary now in the install folder, but still it didn't fix the issue, probably need to add to some other place in CMake files.

Maybe we need to do something like in https://github.com/intel/llvm/blob/sycl/sycl/test-e2e/lit.cfg.py#L627?

Thanks! It works now :)

@dm-vodopyanov
Copy link
Contributor Author

Failed Tests (1):
SYCL :: Reduction/reduction_nd_lambda.cpp - not related to this patch - #19354

@dm-vodopyanov dm-vodopyanov merged commit fae4acc into intel:sycl Jul 9, 2025
23 of 24 checks passed
@sarnex
Copy link
Contributor

sarnex commented Jul 10, 2025

@dm-vodopyanov New failures in postcommit:

 Testing:  0.. 10.. 20.. 30..
FAIL: SYCL :: syclbin/input_files.cpp (726 of 1815)
******************** TEST 'SYCL :: syclbin/input_files.cpp' FAILED ********************
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 1
not syclbin-dump nonexistent.syclbin 2>&1 | FileCheck /__w/llvm/llvm/src/sycl/test/syclbin/input_files.cpp --check-prefix CHECK-NONEXISTENT-FILE
# executed command: not syclbin-dump nonexistent.syclbin
# note: command had no output on stdout or stderr
# executed command: FileCheck /__w/llvm/llvm/src/sycl/test/syclbin/input_files.cpp --check-prefix CHECK-NONEXISTENT-FILE
# note: command had no output on stdout or stderr
# RUN: at line 2
not syclbin-dump /__w/llvm/llvm/src/sycl/test/syclbin/Inputs/malformed.syclbin 2>&1 | FileCheck /__w/llvm/llvm/src/sycl/test/syclbin/input_files.cpp --check-prefix CHECK-MALFORMED-FILE
# executed command: not syclbin-dump /__w/llvm/llvm/src/sycl/test/syclbin/Inputs/malformed.syclbin
# note: command had no output on stdout or stderr
# executed command: FileCheck /__w/llvm/llvm/src/sycl/test/syclbin/input_files.cpp --check-prefix CHECK-MALFORMED-FILE
# .---command stderr------------
# | /__w/llvm/llvm/src/sycl/test/syclbin/input_files.cpp:5:26: error: CHECK-MALFORMED-FILE: expected string not found in input
# | // CHECK-MALFORMED-FILE: Invalid data was encountered while parsing the file
# |                          ^
# | <stdin>:1:1: note: scanning from here
# | Failed to parse SYCLBIN file.
# | ^
# | 
# | Input file: <stdin>
# | Check file: /__w/llvm/llvm/src/sycl/test/syclbin/input_files.cpp
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |          1: Failed to parse SYCLBIN file. 
# | check:5     X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1
 ********************
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90.. 
********************
Failed Tests (1):
  SYCL :: syclbin/input_files.cpp

Can you please fix ASAP or revert? Thx

@sarnex
Copy link
Contributor

sarnex commented Jul 11, 2025

@dm-vodopyanov Can you please comment on your plans to address the postcommit failures? Otherwise I will revert this PR

FYI @intel/llvm-gatekeepers

@uditagarwal97
Copy link
Contributor

@dm-vodopyanov Can you please comment on your plans to address the postcommit failures? Otherwise I will revert this PR

FYI @intel/llvm-gatekeepers

Should we disable the test for now, and @dm-vodopyanov can re-enable it after fixing?

@sarnex
Copy link
Contributor

sarnex commented Jul 11, 2025

Sure, will do

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