-
Notifications
You must be signed in to change notification settings - Fork 790
[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
Open
dm-vodopyanov
wants to merge
3
commits into
intel:sycl
Choose a base branch
from
dm-vodopyanov:syclbin-dump-tests
base: sycl
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+94
−14
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
// RUN: %clangxx --offload-new-driver -fsyclbin=input -fsycl-targets=spir64_gen -Xsycl-target-backend=spir64_gen "-device bmg-g21" -o %t.input_bmg_g21_gpu_device_arch.syclbin %s | ||
// RUN: %clangxx --offload-new-driver -fsyclbin=input -fsycl-targets=spir64_gen -Xsycl-target-backend=spir64_gen "-device *" -o %t.input_all_gpu_device_archs.syclbin %s | ||
// RUN: %clangxx --offload-new-driver -fsyclbin=object -fsycl-targets=spir64_gen -Xsycl-target-backend=spir64_gen "-device bmg-g21" -o %t.object_bmg_g21_gpu_device_arch.syclbin %s | ||
// RUN: %clangxx --offload-new-driver -fsyclbin=executable -fsycl-targets=spir64_gen -Xsycl-target-backend=spir64_gen "-device bmg-g21" -o %t.executable_bmg_g21_gpu_device_arch.syclbin %s | ||
// RUN: %clangxx --offload-new-driver -fsyclbin -fsycl-targets=spir64_gen -Xsycl-target-backend=spir64_gen "-device bmg-g21" -o %t.default_bmg_g21_gpu_device_arch.syclbin %s | ||
|
||
// RUN: syclbin-dump %t.input_bmg_g21_gpu_device_arch.syclbin | FileCheck %s --check-prefix CHECK-INPUT-BMG-G21-GPU-DEVICE-ARCH | ||
// RUN: syclbin-dump %t.input_all_gpu_device_archs.syclbin | FileCheck %s --check-prefix CHECK-INPUT-ALL-GPU-DEVICE-ARCHS | ||
// RUN: syclbin-dump %t.object_bmg_g21_gpu_device_arch.syclbin | FileCheck %s --check-prefix CHECK-OBJECT-BMG-G21-GPU-DEVICE-ARCH | ||
// RUN: syclbin-dump %t.executable_bmg_g21_gpu_device_arch.syclbin | FileCheck %s --check-prefix CHECK-EXECUTABLE-BMG-G21-GPU-DEVICE-ARCH | ||
// RUN: syclbin-dump %t.default_bmg_g21_gpu_device_arch.syclbin | FileCheck %s --check-prefix CHECK-EXECUTABLE-BMG-G21-GPU-DEVICE-ARCH | ||
|
||
// Checks the generated SYCLBIN contents of a simple SYCL free function kernel. | ||
|
||
#include <sycl/sycl.hpp> | ||
|
||
extern "C" { | ||
SYCL_EXT_ONEAPI_FUNCTION_PROPERTY( | ||
(sycl::ext::oneapi::experimental::single_task_kernel)) | ||
void TestKernel(int *Ptr, int Size) { | ||
for (size_t I = 0; I < Size; ++I) | ||
Ptr[I] = I; | ||
} | ||
} | ||
|
||
// CHECK-INPUT-BMG-G21-GPU-DEVICE-ARCH: Version: {{[1-9]+}} | ||
// CHECK-INPUT-BMG-G21-GPU-DEVICE-ARCH-NEXT: Global metadata: | ||
// CHECK-INPUT-BMG-G21-GPU-DEVICE-ARCH-NEXT: SYCLBIN/global metadata: | ||
// CHECK-INPUT-BMG-G21-GPU-DEVICE-ARCH-NEXT: state: 0 | ||
// CHECK-INPUT-BMG-G21-GPU-DEVICE-ARCH-NEXT: Number of Abstract Modules: 1 | ||
// CHECK-INPUT-BMG-G21-GPU-DEVICE-ARCH-NEXT: Abstract Module 0: | ||
// CHECK-INPUT-BMG-G21-GPU-DEVICE-ARCH-NEXT: Metadata: | ||
// CHECK-INPUT-BMG-G21-GPU-DEVICE-ARCH: Number of IR Modules: 0 | ||
// CHECK-INPUT-BMG-G21-GPU-DEVICE-ARCH-NEXT: Number of Native Device Code Images: 1 | ||
// CHECK-INPUT-BMG-G21-GPU-DEVICE-ARCH-NEXT: Native device code image 0: | ||
// CHECK-INPUT-BMG-G21-GPU-DEVICE-ARCH-NEXT: Metadata: | ||
// CHECK-INPUT-BMG-G21-GPU-DEVICE-ARCH-NEXT: SYCLBIN/native device code image metadata: | ||
// CHECK-INPUT-BMG-G21-GPU-DEVICE-ARCH-NEXT: arch:{{.*}} | ||
// CHECK-INPUT-BMG-G21-GPU-DEVICE-ARCH-NEXT: target:{{.*}}spir64_gen-unknown | ||
// CHECK-INPUT-BMG-G21-GPU-DEVICE-ARCH-NEXT: Raw native device code image bytes: <Binary blob of {{.*}} bytes> | ||
|
||
// CHECK-INPUT-ALL-GPU-DEVICE-ARCHS: Version: {{[1-9]+}} | ||
// CHECK-INPUT-ALL-GPU-DEVICE-ARCHS-NEXT: Global metadata: | ||
// CHECK-INPUT-ALL-GPU-DEVICE-ARCHS-NEXT: SYCLBIN/global metadata: | ||
// CHECK-INPUT-ALL-GPU-DEVICE-ARCHS-NEXT: state: 0 | ||
// CHECK-INPUT-ALL-GPU-DEVICE-ARCHS-NEXT: Number of Abstract Modules: 1 | ||
// CHECK-INPUT-ALL-GPU-DEVICE-ARCHS-NEXT: Abstract Module 0: | ||
// CHECK-INPUT-ALL-GPU-DEVICE-ARCHS-NEXT: Metadata: | ||
// CHECK-INPUT-ALL-GPU-DEVICE-ARCHS: Number of IR Modules: 0 | ||
// CHECK-INPUT-ALL-GPU-DEVICE-ARCHS-NEXT: Number of Native Device Code Images: 1 | ||
// CHECK-INPUT-ALL-GPU-DEVICE-ARCHS-NEXT: Native device code image 0: | ||
// CHECK-INPUT-ALL-GPU-DEVICE-ARCHS-NEXT: Metadata: | ||
// CHECK-INPUT-ALL-GPU-DEVICE-ARCHS-NEXT: SYCLBIN/native device code image metadata: | ||
// CHECK-INPUT-ALL-GPU-DEVICE-ARCHS-NEXT: arch:{{.*}} | ||
// CHECK-INPUT-ALL-GPU-DEVICE-ARCHS-NEXT: target:{{.*}}spir64_gen-unknown | ||
// CHECK-INPUT-ALL-GPU-DEVICE-ARCHS-NEXT: Raw native device code image bytes: <Binary blob of {{.*}} bytes> | ||
|
||
// CHECK-OBJECT-BMG-G21-GPU-DEVICE-ARCH: Version: {{[1-9]+}} | ||
// CHECK-OBJECT-BMG-G21-GPU-DEVICE-ARCH-NEXT: Global metadata: | ||
// CHECK-OBJECT-BMG-G21-GPU-DEVICE-ARCH-NEXT: SYCLBIN/global metadata: | ||
// CHECK-OBJECT-BMG-G21-GPU-DEVICE-ARCH-NEXT: state: 1 | ||
// CHECK-OBJECT-BMG-G21-GPU-DEVICE-ARCH-NEXT: Number of Abstract Modules: 1 | ||
// CHECK-OBJECT-BMG-G21-GPU-DEVICE-ARCH-NEXT: Abstract Module 0: | ||
// CHECK-OBJECT-BMG-G21-GPU-DEVICE-ARCH-NEXT: Metadata: | ||
// CHECK-OBJECT-BMG-G21-GPU-DEVICE-ARCH: Number of IR Modules: 0 | ||
// CHECK-OBJECT-BMG-G21-GPU-DEVICE-ARCH-NEXT: Number of Native Device Code Images: 1 | ||
// CHECK-OBJECT-BMG-G21-GPU-DEVICE-ARCH-NEXT: Native device code image 0: | ||
// CHECK-OBJECT-BMG-G21-GPU-DEVICE-ARCH-NEXT: Metadata: | ||
// CHECK-OBJECT-BMG-G21-GPU-DEVICE-ARCH-NEXT: SYCLBIN/native device code image metadata: | ||
// CHECK-OBJECT-BMG-G21-GPU-DEVICE-ARCH-NEXT: arch:{{.*}} | ||
// CHECK-OBJECT-BMG-G21-GPU-DEVICE-ARCH-NEXT: target:{{.*}}spir64_gen-unknown | ||
// CHECK-OBJECT-BMG-G21-GPU-DEVICE-ARCH-NEXT: Raw native device code image bytes: <Binary blob of {{.*}} bytes> | ||
|
||
// CHECK-EXECUTABLE-BMG-G21-GPU-DEVICE-ARCH: Version: {{[1-9]+}} | ||
// CHECK-EXECUTABLE-BMG-G21-GPU-DEVICE-ARCH-NEXT: Global metadata: | ||
// CHECK-EXECUTABLE-BMG-G21-GPU-DEVICE-ARCH-NEXT: SYCLBIN/global metadata: | ||
// CHECK-EXECUTABLE-BMG-G21-GPU-DEVICE-ARCH-NEXT: state: 2 | ||
// CHECK-EXECUTABLE-BMG-G21-GPU-DEVICE-ARCH-NEXT: Number of Abstract Modules: 1 | ||
// CHECK-EXECUTABLE-BMG-G21-GPU-DEVICE-ARCH-NEXT: Abstract Module 0: | ||
// CHECK-EXECUTABLE-BMG-G21-GPU-DEVICE-ARCH-NEXT: Metadata: | ||
// CHECK-EXECUTABLE-BMG-G21-GPU-DEVICE-ARCH: Number of IR Modules: 0 | ||
// CHECK-EXECUTABLE-BMG-G21-GPU-DEVICE-ARCH-NEXT: Number of Native Device Code Images: 1 | ||
// CHECK-EXECUTABLE-BMG-G21-GPU-DEVICE-ARCH-NEXT: Native device code image 0: | ||
// CHECK-EXECUTABLE-BMG-G21-GPU-DEVICE-ARCH-NEXT: Metadata: | ||
// 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> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
// RUN: syclbin-dump nonexistent.syclbin | FileCheck %s --check-prefix CHECK-NONEXISTENT-FILE | ||
// RUN: syclbin-dump Inputs/malformed.syclbin | FileCheck %s --check-prefix CHECK-MALFORMED-FILE | ||
|
||
// CHECK-NONEXISTENT-FILE: Failed to open or read file nonexistent.syclbin | ||
// CHECK-MALFORMED-FILE: Invalid data was encountered while parsing the file |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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